diff --git a/admin/_inc.php b/admin/_inc.php index 582e462..6b5906e 100644 --- a/admin/_inc.php +++ b/admin/_inc.php @@ -48,11 +48,11 @@ $tpl->register_function('money_fac', function (array $params) if (!isset($user)) { $user = false; - } + } if (!isset($name)) { - $name = 'prix[]'; + $name = 'prix[]'; } if (null !== $current_value && !$user) { @@ -62,7 +62,7 @@ $tpl->register_function('money_fac', function (array $params) if (null !== $current_value) { $current_value = htmlspecialchars($current_value, ENT_QUOTES, 'UTF-8'); } - + $currency = Config::getInstance()->get('monnaie'); return sprintf('%s', $name, $current_value, $currency); } diff --git a/templates/_form.tpl b/templates/_form.tpl index 3e6029d..93a0277 100644 --- a/templates/_form.tpl +++ b/templates/_form.tpl @@ -49,7 +49,7 @@
- + {input type="checkbox" name="reglee" value="1" label="Réglée" source=$doc data-types="t1"}
{input type="checkbox" name="archivee" value="1" label="Archivée" source=$doc disabled="disabled"} @@ -113,14 +113,14 @@ {button label="Enlever" title="Enlever la ligne" shape="minus" min="2" name="remove_line"} - {foreach from=$designations item=designation key=key} + {foreach from=$designations item=designation key=key} {money_fac value=$prix[$key] user=$from_user} {button label="Enlever" title="Enlever la ligne" shape="minus" min="2" name="remove_line"} {/foreach} - {else} + {else} {money_fac name="prix_tpl[]"} @@ -139,7 +139,7 @@ - +
Contenu
diff --git a/templates/_js.tpl b/templates/_js.tpl index 301ddae..5c63c5f 100644 --- a/templates/_js.tpl +++ b/templates/_js.tpl @@ -19,8 +19,8 @@ function plus(){ var newdiv = document.createElement('tr'); newdiv.innerHTML = document.getElementById('Line1').innerHTML; - newdiv.getElementsByTagName('textarea')[0].setAttribute('name', 'designation[]'); - newdiv.getElementsByTagName('input')[0].setAttribute('name', 'prix[]'); + newdiv.getElementsByTagName('textarea')[0].setAttribute('name', 'designation[]'); + newdiv.getElementsByTagName('input')[0].setAttribute('name', 'prix[]'); newdiv.querySelector('.fact_rm_line button').onclick = function(){ this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode); updateSum(); @@ -33,12 +33,12 @@ $('#ajouter_ligne').onclick = plus; - a = document.querySelectorAll('[name="remove_line"]'); + a = document.querySelectorAll('[name="remove_line"]'); l = a.length; for(i = 0; i < l; i++) { a[i].onclick = function(){ this.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode); - updateSum(); + updateSum(); }; } @@ -99,4 +99,4 @@ hideAllTypes(); {/literal} selectType({$radio.type}); - \ No newline at end of file + diff --git a/templates/clients.tpl b/templates/clients.tpl index f0b037b..9c40f2c 100644 --- a/templates/clients.tpl +++ b/templates/clients.tpl @@ -14,7 +14,7 @@ {/if} {if $key == 'siret'} -