diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 1cd655603bc..c78b41ba274 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -333,6 +333,10 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char $object->id = $object->ref = null; $object->paye = 0; + if (GETPOST('amount', 'alphanohtml')) { + $object->amount = price2num(GETPOST('amount', 'alphanohtml'), 'MT', 2); + } + if (GETPOST('clone_label', 'alphanohtml')) { $object->label = GETPOST('clone_label', 'alphanohtml'); } else { @@ -540,6 +544,7 @@ if ($id > 0) { //$formquestion[] = array('type' => 'date', 'name' => 'clone_date_ech', 'label' => $langs->trans("Date"), 'value' => -1); $formquestion[] = array('type' => 'date', 'name' => 'clone_period', 'label' => $langs->trans("PeriodEndDate"), 'value' => -1); + $formquestion[] = array('type' => 'text', 'name' => 'amount', 'label' => $langs->trans("Amount"), 'value' => price($object->amount), 'morecss' => 'width100'); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneVAT', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 240); } diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index 966d04241cd..975d4d16200 100644 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -381,6 +381,10 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->salaries- $object->paye = 0; $object->id = $object->ref = null; + if (GETPOST('amount', 'alphanohtml')) { + $object->amount = price2num(GETPOST('amount', 'alphanohtml'), 'MT', 2); + } + if (GETPOST('clone_label', 'alphanohtml')) { $object->label = GETPOST('clone_label', 'alphanohtml'); } else { @@ -714,6 +718,7 @@ if ($id > 0) { //$formquestion[] = array('type' => 'date', 'name' => 'clone_date_ech', 'label' => $langs->trans("Date"), 'value' => -1); $formquestion[] = array('type' => 'date', 'name' => 'clone_date_start', 'label' => $langs->trans("DateStart"), 'value' => -1); $formquestion[] = array('type' => 'date', 'name' => 'clone_date_end', 'label' => $langs->trans("DateEnd"), 'value' => -1); + $formquestion[] = array('type' => 'text', 'name' => 'amount', 'label' => $langs->trans("Amount"), 'value' => price($object->amount), 'morecss' => 'width100'); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneSalary', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250); }