diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index b3f1d7a5d516005bc4dbed0d53a53515ce9bf19b..1b7c67e40f9cd32f2a55985a0352277a9130b988 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -262,11 +262,11 @@ if ($action == 'setforcedate') } } -if ($action == 'set_FAC_AUTO_FILLJS') +if ($action == 'set_INVOICE_AUTO_FILLJS') { - $freetext = GETPOST('FAC_AUTO_FILLJS'); // No alpha here, we want exact string + $freetext = GETPOST('INVOICE_AUTO_FILLJS'); // No alpha here, we want exact string - $res = dolibarr_set_const($db, "FAC_AUTO_FILLJS",$freetext,'chaine',0,'',$conf->entity); + $res = dolibarr_set_const($db, "INVOICE_AUTO_FILLJS",$freetext,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; @@ -754,11 +754,11 @@ print '</form>'; $var=! $var; print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />'; -print '<input type="hidden" name="action" value="set_FAC_AUTO_FILLJS" />'; +print '<input type="hidden" name="action" value="set_INVOICE_AUTO_FILLJS" />'; print '<tr '.$bc[$var].'><td>'; print $langs->trans("JSOnPaimentBill"); print '</td><td width="60" align="center">'; -print $form->selectyesno("FAC_AUTO_FILLJS",$conf->global->FAC_AUTO_FILLJS,1); +print $form->selectyesno("INVOICE_AUTO_FILLJS",$conf->global->INVOICE_AUTO_FILLJS,1); print '</td><td align="right">'; print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />'; print "</td></tr>\n"; diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 72fd65d686b72cc8f0ba8354f2974afbd1f6b06b..37b6ebdc3eb6315b06164f2736558c9ef00d41bb 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -432,7 +432,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie '; print ' });'."\n"; - if(!empty($conf->global->FAC_AUTO_FILLJS)){ + if(!empty($conf->global->INVOICE_AUTO_FILLJS)){ //Add js for AutoFill print ' $(document).ready(function () {'; print ' $(".AutoFillAmout").on(\'click touchstart\', function(){ @@ -650,7 +650,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie if ($action != 'add_paiement') { - if(!empty($conf->global->FAC_AUTO_FILLJS)) + if(!empty($conf->global->INVOICE_AUTO_FILLJS)) print img_picto("Auto fill",'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $remaintopay)."'"); print '<input type=hidden class="remain" name="'.$nameRemain.'" value="'.$remaintopay.'">'; print '<input type="text" size="8" class="amount" name="'.$namef.'" value="'.$_POST[$namef].'">'; @@ -673,7 +673,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie if ($action != 'add_paiement') { - if(!empty($conf->global->FAC_AUTO_FILLJS)) + if(!empty($conf->global->INVOICE_AUTO_FILLJS)) print img_picto("Auto fill",'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $multicurrency_remaintopay)."'"); print '<input type=hidden class="multicurrency_remain" name="'.$nameRemain.'" value="'.$multicurrency_remaintopay.'">'; print '<input type="text" size="8" class="multicurrency_amount" name="'.$namef.'" value="'.$_POST[$namef].'">'; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index dd9d8fae87ff20cf38bad1c9bd80a99070047638..f82c8b6253043b36b7a8a94f026e0bba8b7a82c4 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -403,7 +403,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie $i = 0; print '<br>'; - if(!empty($conf->global->FAC_AUTO_FILLJS)){ + if(!empty($conf->global->INVOICE_AUTO_FILLJS)){ //Add js for AutoFill print "\n".'<script type="text/javascript" language="javascript">'; print ' $(document).ready(function () {'; @@ -469,7 +469,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print '<td align="center">'; $namef = 'amount_'.$objp->facid; - if(!empty($conf->global->FAC_AUTO_FILLJS)) + if(!empty($conf->global->INVOICE_AUTO_FILLJS)) print img_picto("Auto fill",'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($objp->total_ttc - $objp->am)."'"); print '<input type="text" size="8" name="'.$namef.'" value="'.GETPOST($namef).'">'; print "</td>"; @@ -479,7 +479,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie { print '<td align="center">'; $namef = 'multicurrency_amount_'.$objp->facid; - if(!empty($conf->global->FAC_AUTO_FILLJS)) + if(!empty($conf->global->INVOICE_AUTO_FILLJS)) print img_picto("Auto fill",'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($objp->multicurrency_total_ttc - $objp->multicurrency_am)."'"); print '<input type="text" size="8" class="multicurrency_amount" name="'.$namef.'" value="'.GETPOST($namef).'">'; print "</td>";