diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index b2d92dd55dc..6d0d1dedb2a 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004-2015 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -99,6 +99,13 @@ if ($socid > 0) $head = societe_prepare_head($objsoc); + + + print '
'; + print ''; + print ''; + print ''; + dol_fiche_head($head, 'relativediscount', $langs->trans("ThirdParty"),0,'company'); @@ -119,11 +126,6 @@ if ($socid > 0) print_fiche_titre($langs->trans("NewRelativeDiscount"),'',''); - print ''; - print ''; - print ''; - print ''; - print ''; // Nouvelle valeur @@ -136,6 +138,8 @@ if ($socid > 0) print "
"; + dol_fiche_end(); + print '
'; print ''; if (! empty($backtopage)) @@ -147,8 +151,6 @@ if ($socid > 0) print ""; - dol_fiche_end(); - print '
'; diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index a68e9d28c19..471232ef708 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -221,14 +221,14 @@ if ($socid > 0) */ $head = societe_prepare_head($objsoc); - dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"),0,'company'); - print '
'; print ''; print ''; print ''; + dol_fiche_head($head, 'absolutediscount', $langs->trans("ThirdParty"),0,'company'); + print ''; // Name @@ -278,6 +278,8 @@ if ($socid > 0) print "
"; + dol_fiche_end(); + print '
'; print ''; if (! empty($backtopage)) @@ -289,7 +291,6 @@ if ($socid > 0) print ''; - dol_fiche_end(); print '
'; @@ -329,8 +330,10 @@ if ($socid > 0) print ' '; print ''; + $showconfirminfo=array(); + $var = true; - $i = 0 ; + $i = 0; $num = $db->num_rows($resql); while ($i < $num) { @@ -382,24 +385,26 @@ if ($socid > 0) if ($_GET["action"]=='split' && $_GET['remid'] == $obj->rowid) { - print ""; - print ''; - $amount1=price2num($obj->amount_ttc/2,'MT'); - $amount2=($obj->amount_ttc-$amount1); - $formquestion=array( - 'text' => $langs->trans('TypeAmountOfEachNewDiscount'), - array('type' => 'text', 'name' => 'amount_ttc_1', 'label' => $langs->trans("AmountTTC").' 1', 'value' => $amount1, 'size' => '5'), - array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') - ); - $langs->load("dict"); - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$obj->rowid, $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($obj->amount_ttc),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); - print ''; - print ''; + $showconfirminfo['rowid']=$obj->rowid; + $showconfirminfo['amount_ttc']=$obj->amount_ttc; } $i++; } $db->free($resql); print ""; + + if (count($showconfirminfo)) + { + $amount1=price2num($showconfirminfo['amount_ttc']/2,'MT'); + $amount2=($showconfirminfo['amount_ttc']-$amount1); + $formquestion=array( + 'text' => $langs->trans('TypeAmountOfEachNewDiscount'), + array('type' => 'text', 'name' => 'amount_ttc_1', 'label' => $langs->trans("AmountTTC").' 1', 'value' => $amount1, 'size' => '5'), + array('type' => 'text', 'name' => 'amount_ttc_2', 'label' => $langs->trans("AmountTTC").' 2', 'value' => $amount2, 'size' => '5') + ); + $langs->load("dict"); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$objsoc->id.'&remid='.$showconfirminfo['rowid'], $langs->trans('SplitDiscount'), $langs->trans('ConfirmSplitDiscount',price($showconfirminfo['amount_ttc']),$langs->transnoentities("Currency".$conf->currency)), 'confirm_split', $formquestion, 0, 0); + } } else {