Merge remote-tracking branch 'origin/5.0' into 6.0
This commit is contained in:
commit
744f0ab198
@ -2,7 +2,7 @@
|
||||
/* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006-2007 Yannick Warnier <ywarnier@beeznest.org>
|
||||
* Copyright (C) 2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012-2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
@ -583,11 +583,11 @@ function tax_by_date($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire
|
||||
{
|
||||
$oldrowid=$assoc['rowid'];
|
||||
$list[$assoc['rate']]['totalht'] += $assoc['total_ht'];
|
||||
$list[$assoc['rate']]['vat'] += $assoc['total_vat'];
|
||||
$list[$assoc['rate']]['localtax1'] += $assoc['total_localtax1'];
|
||||
$list[$assoc['rate']]['localtax2'] += $assoc['total_localtax2'];
|
||||
}
|
||||
|
||||
$list[$assoc['rate']]['vat'] = $assoc['total_vat'];
|
||||
$list[$assoc['rate']]['dtotal_ttc'][] = $assoc['total_ttc'];
|
||||
$list[$assoc['rate']]['dtype'][] = 'ExpenseReportPayment';
|
||||
$list[$assoc['rate']]['datef'][] = $assoc['datef'];
|
||||
|
||||
@ -274,7 +274,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// Set supplier ref
|
||||
if ($action == 'setref_supplier' && $user->rights->fournisseur->commande->creer)
|
||||
if ($action == 'setref_supplier' && $user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
$object->ref_supplier = GETPOST('ref_supplier', 'alpha');
|
||||
|
||||
@ -302,13 +302,13 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
// payments conditions
|
||||
if ($action == 'setconditions' && $user->rights->fournisseur->commande->creer)
|
||||
if ($action == 'setconditions' && $user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
|
||||
}
|
||||
|
||||
// payment mode
|
||||
else if ($action == 'setmode' && $user->rights->fournisseur->commande->creer)
|
||||
else if ($action == 'setmode' && $user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id','int'));
|
||||
}
|
||||
@ -1996,8 +1996,8 @@ else
|
||||
|
||||
$morehtmlref='<div class="refidno">';
|
||||
// Ref supplier
|
||||
$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1);
|
||||
$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1);
|
||||
$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->facture->creer, 'string', '', 0, 1);
|
||||
$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->facture->creer, 'string', '', null, null, '', 1);
|
||||
// Thirdparty
|
||||
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||
// Project
|
||||
@ -2005,7 +2005,7 @@ else
|
||||
{
|
||||
$langs->load("projects");
|
||||
$morehtmlref.='<br>'.$langs->trans('Project') . ' ';
|
||||
if ($user->rights->fournisseur->commande->creer)
|
||||
if ($user->rights->fournisseur->facture->creer)
|
||||
{
|
||||
if ($action != 'classify')
|
||||
$morehtmlref.='<a href="' . $_SERVER['PHP_SELF'] . '?action=classify&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user