diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index e7c7678b818..eae2f17f4ec 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 5ba1b818137..66844d40f5b 100644 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -380,6 +380,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 { @@ -710,6 +714,7 @@ if ($id) { //$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); }