Uniformise option name
This commit is contained in:
parent
34c197f268
commit
bc1b2d048b
@ -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++;
|
if (! $res > 0) $error++;
|
||||||
|
|
||||||
@ -754,11 +754,11 @@ print '</form>';
|
|||||||
$var=! $var;
|
$var=! $var;
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
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 '<tr '.$bc[$var].'><td>';
|
||||||
print $langs->trans("JSOnPaimentBill");
|
print $langs->trans("JSOnPaimentBill");
|
||||||
print '</td><td width="60" align="center">';
|
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 '</td><td align="right">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|||||||
@ -432,7 +432,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
';
|
';
|
||||||
|
|
||||||
print ' });'."\n";
|
print ' });'."\n";
|
||||||
if(!empty($conf->global->FAC_AUTO_FILLJS)){
|
if(!empty($conf->global->INVOICE_AUTO_FILLJS)){
|
||||||
//Add js for AutoFill
|
//Add js for AutoFill
|
||||||
print ' $(document).ready(function () {';
|
print ' $(document).ready(function () {';
|
||||||
print ' $(".AutoFillAmout").on(\'click touchstart\', 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 ($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 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=hidden class="remain" name="'.$nameRemain.'" value="'.$remaintopay.'">';
|
||||||
print '<input type="text" size="8" class="amount" name="'.$namef.'" value="'.$_POST[$namef].'">';
|
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 ($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 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=hidden class="multicurrency_remain" name="'.$nameRemain.'" value="'.$multicurrency_remaintopay.'">';
|
||||||
print '<input type="text" size="8" class="multicurrency_amount" name="'.$namef.'" value="'.$_POST[$namef].'">';
|
print '<input type="text" size="8" class="multicurrency_amount" name="'.$namef.'" value="'.$_POST[$namef].'">';
|
||||||
|
|||||||
@ -403,7 +403,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
if(!empty($conf->global->FAC_AUTO_FILLJS)){
|
if(!empty($conf->global->INVOICE_AUTO_FILLJS)){
|
||||||
//Add js for AutoFill
|
//Add js for AutoFill
|
||||||
print "\n".'<script type="text/javascript" language="javascript">';
|
print "\n".'<script type="text/javascript" language="javascript">';
|
||||||
print ' $(document).ready(function () {';
|
print ' $(document).ready(function () {';
|
||||||
@ -469,7 +469,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
$namef = 'amount_'.$objp->facid;
|
$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 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 '<input type="text" size="8" name="'.$namef.'" value="'.GETPOST($namef).'">';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
@ -479,7 +479,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
|||||||
{
|
{
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
$namef = 'multicurrency_amount_'.$objp->facid;
|
$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 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 '<input type="text" size="8" class="multicurrency_amount" name="'.$namef.'" value="'.GETPOST($namef).'">';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user