Fix: compatibility with edit in place
This commit is contained in:
parent
4a4da9ebbf
commit
47eaaf5905
@ -101,10 +101,10 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->fournisse
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'setnum' && ! empty($_POST['num']))
|
if ($action == 'setnum' && ! empty($_POST['num_paiement']))
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$res = $object->update_num($_POST['num']);
|
$res = $object->update_num($_POST['num_paiement']);
|
||||||
if ($res === 0)
|
if ($res === 0)
|
||||||
{
|
{
|
||||||
$mesg = '<div class="ok">'.$langs->trans('PaymentNumberUpdateSucceeded').'</div>';
|
$mesg = '<div class="ok">'.$langs->trans('PaymentNumberUpdateSucceeded').'</div>';
|
||||||
@ -115,10 +115,10 @@ if ($action == 'setnum' && ! empty($_POST['num']))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'setdate' && ! empty($_POST['dateday']))
|
if ($action == 'setdate' && ! empty($_POST['datepday']))
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$datepaye = dol_mktime(12, 0, 0, $_POST['datemonth'], $_POST['dateday'], $_POST['dateyear']);
|
$datepaye = dol_mktime(12, 0, 0, $_POST['datepmonth'], $_POST['datepday'], $_POST['datepyear']);
|
||||||
$res = $object->update_date($datepaye);
|
$res = $object->update_date($datepaye);
|
||||||
if ($res === 0)
|
if ($res === 0)
|
||||||
{
|
{
|
||||||
@ -182,16 +182,16 @@ if ($result > 0)
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date payment
|
// Date payment
|
||||||
print '<tr><td valign="top" colspan="2">'.$form->editfieldkey("Date",'date',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">';
|
print '<tr><td valign="top" colspan="2">'.$form->editfieldkey("Date",'datep',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">';
|
||||||
print $form->editfieldval("Date",'date',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'datepicker');
|
print $form->editfieldval("Date",'datep',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded'));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Payment mode
|
// Payment mode
|
||||||
print '<tr><td valign="top" colspan="2">'.$langs->trans('PaymentMode').'</td><td colspan="3">'.$object->type_libelle.'</td></tr>';
|
print '<tr><td valign="top" colspan="2">'.$langs->trans('PaymentMode').'</td><td colspan="3">'.$object->type_libelle.'</td></tr>';
|
||||||
|
|
||||||
// Payment numero
|
// Payment numero
|
||||||
print '<tr><td valign="top" colspan="2">'.$form->editfieldkey("Numero",'num',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">';
|
print '<tr><td valign="top" colspan="2">'.$form->editfieldkey("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer).'</td><td colspan="3">';
|
||||||
print $form->editfieldval("Numero",'num',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string');
|
print $form->editfieldval("Numero",'num_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded'));
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Amount
|
// Amount
|
||||||
@ -204,7 +204,7 @@ if ($result > 0)
|
|||||||
|
|
||||||
// Note
|
// Note
|
||||||
print '<tr><td valign="top"" colspan="2">'.$form->editfieldkey("Note",'note',$object->note,$object,$user->rights->fournisseur->facture->creer).'</td><td colspan="3">';
|
print '<tr><td valign="top"" colspan="2">'.$form->editfieldkey("Note",'note',$object->note,$object,$user->rights->fournisseur->facture->creer).'</td><td colspan="3">';
|
||||||
print $form->editfieldval("Note",'note',$object->note,$object,$user->rights->fournisseur->facture->creer,'text');
|
print $form->editfieldval("Note",'note',$object->note,$object,$user->rights->fournisseur->facture->creer,'textarea');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Bank account
|
// Bank account
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user