Merge branch 'develop' of ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
9e731a1c9f
@ -63,9 +63,10 @@ if((isset($_GET['field']) && ! empty($_GET['field']))
|
|||||||
if ($element == 'propal') $element = 'propale';
|
if ($element == 'propal') $element = 'propale';
|
||||||
else if ($element == 'fichinter') $element = 'ficheinter';
|
else if ($element == 'fichinter') $element = 'ficheinter';
|
||||||
|
|
||||||
if (($element == 'payment' && $user->rights->facture->paiement)
|
if ($user->rights->$element->lire || $user->rights->$element->read
|
||||||
|| $user->rights->$element->lire || $user->rights->$element->read
|
|| $user->rights->$element->$subelement->lire || $user->rights->$element->$subelement->read
|
||||||
|| $user->rights->$element->$subelement->lire || $user->rights->$element->$subelement->read)
|
|| ($element == 'payment' && $user->rights->facture->lire)
|
||||||
|
|| ($element == 'payment_supplier' && $user->rights->fournisseur->facture->lire))
|
||||||
{
|
{
|
||||||
if ($type == 'select')
|
if ($type == 'select')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -69,9 +69,10 @@ if((isset($_POST['field']) && ! empty($_POST['field']))
|
|||||||
if ($element == 'propal') $element = 'propale';
|
if ($element == 'propal') $element = 'propale';
|
||||||
else if ($element == 'fichinter') $element = 'ficheinter';
|
else if ($element == 'fichinter') $element = 'ficheinter';
|
||||||
|
|
||||||
if (($element == 'payment' && $user->rights->facture->paiement)
|
if ($user->rights->$element->creer || $user->rights->$element->write
|
||||||
|| $user->rights->$element->creer || $user->rights->$element->write
|
|| $user->rights->$element->$subelement->creer || $user->rights->$element->$subelement->write
|
||||||
|| $user->rights->$element->$subelement->creer || $user->rights->$element->$subelement->write)
|
|| ($element == 'payment' && $user->rights->facture->paiement)
|
||||||
|
|| ($element == 'payment_supplier' && $user->rights->fournisseur->facture->creer))
|
||||||
{
|
{
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$newvalue = trim($value);
|
$newvalue = trim($value);
|
||||||
|
|||||||
@ -36,9 +36,9 @@ $langs->load("suppliers");
|
|||||||
|
|
||||||
$mesg='';
|
$mesg='';
|
||||||
|
|
||||||
$id = GETPOST('id');
|
$id = GETPOST('id','int');
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action','alpha');
|
||||||
$confirm = GETPOST('confirm');
|
$confirm = GETPOST('confirm','alpha');
|
||||||
|
|
||||||
$object = new PaiementFourn($db);
|
$object = new PaiementFourn($db);
|
||||||
|
|
||||||
@ -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)
|
||||||
{
|
{
|
||||||
@ -141,7 +141,7 @@ $form = new Form($db);
|
|||||||
|
|
||||||
$h=0;
|
$h=0;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$id;
|
$head[$h][0] = $_SERVER['PHP_SELF'].'?id='.$id;
|
||||||
$head[$h][1] = $langs->trans('Card');
|
$head[$h][1] = $langs->trans('Card');
|
||||||
$hselected = $h;
|
$hselected = $h;
|
||||||
$h++;
|
$h++;
|
||||||
@ -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,'day');
|
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
|
||||||
@ -338,7 +338,7 @@ else
|
|||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
$db->close();
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
$db->close();
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue
Block a user