Skip to content

Commit

Permalink
Fix: compatibility with edit in place
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Feb 20, 2012
1 parent 4a4da9e commit 47eaaf5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions htdocs/fourn/paiement/fiche.php
Expand Up @@ -101,10 +101,10 @@
}
}

if ($action == 'setnum' && ! empty($_POST['num']))
if ($action == 'setnum' && ! empty($_POST['num_paiement']))
{
$object->fetch($id);
$res = $object->update_num($_POST['num']);
$res = $object->update_num($_POST['num_paiement']);
if ($res === 0)
{
$mesg = '<div class="ok">'.$langs->trans('PaymentNumberUpdateSucceeded').'</div>';
Expand All @@ -115,10 +115,10 @@
}
}

if ($action == 'setdate' && ! empty($_POST['dateday']))
if ($action == 'setdate' && ! empty($_POST['datepday']))
{
$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);
if ($res === 0)
{
Expand Down Expand Up @@ -182,16 +182,16 @@
print '</td></tr>';

// 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 $form->editfieldval("Date",'date',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'datepicker');
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",'datep',$object->date,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'datepicker','',null,$langs->trans('PaymentDateUpdateSucceeded'));
print '</td></tr>';

// Payment mode
print '<tr><td valign="top" colspan="2">'.$langs->trans('PaymentMode').'</td><td colspan="3">'.$object->type_libelle.'</td></tr>';

// 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 $form->editfieldval("Numero",'num',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string');
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_paiement',$object->numero,$object,$object->statut == 0 && $user->rights->fournisseur->facture->creer,'string','',null,$langs->trans('PaymentNumberUpdateSucceeded'));
print '</td></tr>';

// Amount
Expand All @@ -204,7 +204,7 @@

// 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 $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>';

// Bank account
Expand Down

0 comments on commit 47eaaf5

Please sign in to comment.