Merge pull request #22913 from atm-gauthier/NEW/can_edit_amount_on_tva_and_salaries_clone
NEW : Now we can edit amount on vat and salaries clone action
This commit is contained in:
commit
3f65af193e
@ -333,6 +333,10 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char
|
|||||||
$object->id = $object->ref = null;
|
$object->id = $object->ref = null;
|
||||||
$object->paye = 0;
|
$object->paye = 0;
|
||||||
|
|
||||||
|
if (GETPOST('amount', 'alphanohtml')) {
|
||||||
|
$object->amount = price2num(GETPOST('amount', 'alphanohtml'), 'MT', 2);
|
||||||
|
}
|
||||||
|
|
||||||
if (GETPOST('clone_label', 'alphanohtml')) {
|
if (GETPOST('clone_label', 'alphanohtml')) {
|
||||||
$object->label = GETPOST('clone_label', 'alphanohtml');
|
$object->label = GETPOST('clone_label', 'alphanohtml');
|
||||||
} else {
|
} 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_date_ech', 'label' => $langs->trans("Date"), 'value' => -1);
|
||||||
$formquestion[] = array('type' => 'date', 'name' => 'clone_period', 'label' => $langs->trans("PeriodEndDate"), '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);
|
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneVAT', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 240);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -381,6 +381,10 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->salaries-
|
|||||||
$object->paye = 0;
|
$object->paye = 0;
|
||||||
$object->id = $object->ref = null;
|
$object->id = $object->ref = null;
|
||||||
|
|
||||||
|
if (GETPOST('amount', 'alphanohtml')) {
|
||||||
|
$object->amount = price2num(GETPOST('amount', 'alphanohtml'), 'MT', 2);
|
||||||
|
}
|
||||||
|
|
||||||
if (GETPOST('clone_label', 'alphanohtml')) {
|
if (GETPOST('clone_label', 'alphanohtml')) {
|
||||||
$object->label = GETPOST('clone_label', 'alphanohtml');
|
$object->label = GETPOST('clone_label', 'alphanohtml');
|
||||||
} else {
|
} 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_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_start', 'label' => $langs->trans("DateStart"), 'value' => -1);
|
||||||
$formquestion[] = array('type' => 'date', 'name' => 'clone_date_end', 'label' => $langs->trans("DateEnd"), '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);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneSalary', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user