mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
a67a8fbfe1
|
|
@ -1900,7 +1900,11 @@ if ($resql) {
|
|||
if (!$i) {
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht';
|
||||
}
|
||||
$totalarray['val']['p.total_ht'] += $obj->total_ht;
|
||||
if (empty($totalarray['val']['p.total_ht'])) {
|
||||
$totalarray['val']['p.total_ht'] = $obj->total_ht;
|
||||
} else {
|
||||
$totalarray['val']['p.total_ht'] += $obj->total_ht;
|
||||
}
|
||||
}
|
||||
// Amount VAT
|
||||
if (!empty($arrayfields['p.total_tva']['checked'])) {
|
||||
|
|
@ -1911,7 +1915,11 @@ if ($resql) {
|
|||
if (!$i) {
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 'p.total_tva';
|
||||
}
|
||||
$totalarray['val']['p.total_tva'] += $obj->total_tva;
|
||||
if (empty($totalarray['val']['p.total_tva'])) {
|
||||
$totalarray['val']['p.total_tva'] = $obj->total_tva;
|
||||
} else {
|
||||
$totalarray['val']['p.total_tva'] += $obj->total_tva;
|
||||
}
|
||||
}
|
||||
// Amount TTC
|
||||
if (!empty($arrayfields['p.total_ttc']['checked'])) {
|
||||
|
|
@ -1922,7 +1930,11 @@ if ($resql) {
|
|||
if (!$i) {
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 'p.total_ttc';
|
||||
}
|
||||
$totalarray['val']['p.total_ttc'] += $obj->total_ttc;
|
||||
if (empty($totalarray['val']['p.total_ttc'])) {
|
||||
$totalarray['val']['p.total_ttc'] = $obj->total_ttc;
|
||||
} else {
|
||||
$totalarray['val']['p.total_ttc'] += $obj->total_ttc;
|
||||
}
|
||||
}
|
||||
// Amount invoiced HT
|
||||
if (!empty($arrayfields['p.total_ht_invoiced']['checked'])) {
|
||||
|
|
@ -1933,7 +1945,11 @@ if ($resql) {
|
|||
if (!$i) {
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 'p.total_ht_invoiced';
|
||||
}
|
||||
$totalarray['val']['p.total_ht_invoiced'] += $totalInvoicedHT;
|
||||
if (empty($totalarray['val']['p.total_ht_invoiced'])) {
|
||||
$totalarray['val']['p.total_ht_invoiced'] = $totalInvoicedHT;
|
||||
} else {
|
||||
$totalarray['val']['p.total_ht_invoiced'] += $totalInvoicedHT;
|
||||
}
|
||||
}
|
||||
// Amount invoiced TTC
|
||||
if (!empty($arrayfields['p.total_invoiced']['checked'])) {
|
||||
|
|
@ -1944,7 +1960,11 @@ if ($resql) {
|
|||
if (!$i) {
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 'p.total_invoiced';
|
||||
}
|
||||
$totalarray['val']['p.total_invoiced'] += $totalInvoicedTTC;
|
||||
if (empty($totalarray['val']['p.total_invoiced'])) {
|
||||
$totalarray['val']['p.total_invoiced'] = $totalInvoicedTTC;
|
||||
} else {
|
||||
$totalarray['val']['p.total_invoiced'] += $totalInvoicedTTC;
|
||||
}
|
||||
}
|
||||
// Currency
|
||||
if (!empty($arrayfields['p.multicurrency_code']['checked'])) {
|
||||
|
|
|
|||
|
|
@ -612,7 +612,7 @@ class ChargeSociales extends CommonObject
|
|||
}
|
||||
|
||||
$linkclose = '';
|
||||
if (empty($notooltip) && $user->rights->facture->lire) {
|
||||
if (empty($notooltip) && $user->hasRight("facture", "read")) {
|
||||
if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) {
|
||||
$label = $langs->trans("SocialContribution");
|
||||
$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
|
||||
|
|
|
|||
|
|
@ -345,8 +345,8 @@ class Tva extends CommonObject
|
|||
$this->fk_user_creat = $obj->fk_user_creat;
|
||||
$this->fk_user_modif = $obj->fk_user_modif;
|
||||
$this->fk_account = $obj->fk_account;
|
||||
$this->fk_type = $obj->fk_type;
|
||||
$this->rappro = $obj->rappro;
|
||||
$this->fk_type = empty($obj->fk_type) ? "" : $obj->fk_type;
|
||||
$this->rappro = empty($obj->rappro) ? "" : $obj->rappro;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ $search_type = GETPOST('search_type', 'int');
|
|||
$search_account = GETPOST('search_account', 'int');
|
||||
$search_amount = GETPOST('search_amount', 'alpha');
|
||||
$search_status = GETPOST('search_status', 'int');
|
||||
$ltt = GETPOST("ltt", "int");
|
||||
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
|
|
@ -278,6 +279,13 @@ if (!empty($search_amount)) {
|
|||
if ($search_status != '' && $search_status != '-1') {
|
||||
$param .= '&search_status='.urlencode($search_status);
|
||||
}
|
||||
$arrayofmassactions = array(
|
||||
//'presend'=>img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("SendByMail"),
|
||||
//'builddoc'=>img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("PDFMerge"),
|
||||
);
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$moreforfilter = '';
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') {
|
||||
|
|
@ -294,7 +302,7 @@ $url = DOL_URL_ROOT.'/compta/tva/card.php?action=create';
|
|||
if (!empty($socid)) {
|
||||
$url .= '&socid='.$socid;
|
||||
}
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewVATPayment', ($ltt + 1)), '', 'fa fa-plus-circle', $url, '', $user->rights->tax->charges->creer);
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewVATPayment'), '', 'fa fa-plus-circle', $url, '', $user->rights->tax->charges->creer);
|
||||
print_barre_liste($langs->trans("VATDeclarations"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$varpage = empty($contextpage) ? $_SERVER['PHP_SELF'] : $contextpage;
|
||||
|
|
@ -429,6 +437,9 @@ print '</tr>';
|
|||
|
||||
$i = 0;
|
||||
$totalarray = array();
|
||||
$totalarray['nbfield'] = 0;
|
||||
$total = 0;
|
||||
|
||||
while ($i < min($num, $limit)) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
|
@ -523,7 +534,11 @@ while ($i < min($num, $limit)) {
|
|||
$totalarray['nbfield']++;
|
||||
}
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 'amount';
|
||||
$totalarray['val']['amount'] += $obj->amount;
|
||||
if (empty($totalarray['val']['amount'])) {
|
||||
$totalarray['val']['amount'] = $obj->amount;
|
||||
} else {
|
||||
$totalarray['val']['amount'] += $obj->amount;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($arrayfields['t.status']['checked'])) {
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ $langs->loadLangs(array('compta', 'bills'));
|
|||
$mode = GETPOST("mode", 'alpha');
|
||||
$year = GETPOST("year", 'int');
|
||||
$filtre = GETPOST("filtre", 'alpha');
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
if (!$year && $mode != 'tvaonly') {
|
||||
$year = date("Y", time());
|
||||
}
|
||||
|
|
@ -113,6 +114,8 @@ print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
|||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
|
||||
$center = '';
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy', 0, '', '', $limit);
|
||||
|
||||
if ($year) {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ function product_prepare_head($object)
|
|||
|
||||
if (!empty($object->status_buy) || (!empty($conf->margin->enabled) && !empty($object->status))) { // If margin is on and product on sell, we may need the cost price even if product os not on purchase
|
||||
if ((((isModEnabled("fournisseur") && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || isModEnabled("supplier_order") || isModEnabled("supplier_invoice")) && $user->rights->fournisseur->lire)
|
||||
|| (!empty($conf->margin->enabled) && $user->rights->margin->liretous)
|
||||
|| (!empty($conf->margin->enabled) && $user->hasRight("margin", "liretous"))
|
||||
) {
|
||||
if ($usercancreadprice) {
|
||||
$head[$h][0] = DOL_URL_ROOT."/product/fournisseurs.php?id=".$object->id;
|
||||
|
|
|
|||
|
|
@ -494,7 +494,9 @@ if ($action == 'create') {
|
|||
print '<tr>';
|
||||
print '<td class="tdtop">'.$langs->trans('NotePublic').'</td>';
|
||||
print '<td>';
|
||||
|
||||
if (!isset($note_public)) {
|
||||
$note_public = $object->getDefaultCreateValueFor('note_public');
|
||||
}
|
||||
$doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PUBLIC) ? 0 : 1, ROWS_3, '90%');
|
||||
print $doleditor->Create(1);
|
||||
print '</td></tr>';
|
||||
|
|
@ -504,7 +506,9 @@ if ($action == 'create') {
|
|||
print '<tr>';
|
||||
print '<td class="tdtop">'.$langs->trans('NotePrivate').'</td>';
|
||||
print '<td>';
|
||||
|
||||
if (!isset($note_private)) {
|
||||
$note_private = $object->getDefaultCreateValueFor('note_private');
|
||||
}
|
||||
$doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, empty($conf->global->FCKEDITOR_ENABLE_NOTE_PRIVATE) ? 0 : 1, ROWS_3, '90%');
|
||||
print $doleditor->Create(1);
|
||||
print '</td></tr>';
|
||||
|
|
@ -672,6 +676,7 @@ if (!empty($id) && $action == 'edit') {
|
|||
/* */
|
||||
/* ************************************************************ */
|
||||
if (!empty($id) && $action != 'edit') {
|
||||
$formconfirm = "";
|
||||
// Confirmation delete
|
||||
if ($action == 'delete') {
|
||||
$text = $langs->trans("ConfirmDeleteADonation");
|
||||
|
|
@ -802,7 +807,7 @@ if (!empty($id) && $action != 'edit') {
|
|||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0; $total = 0;
|
||||
$i = 0; $total = 0; $totalpaid = 0;
|
||||
print '<table class="noborder paymenttable centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("RefPayment").'</td>';
|
||||
|
|
@ -832,7 +837,7 @@ if (!empty($id) && $action != 'edit') {
|
|||
$remaintopay = $object->amount - $totalpaid;
|
||||
|
||||
print "<tr><td colspan=\"3\" class=\"right\">".$langs->trans("RemainderToPay")." :</td>";
|
||||
print '<td class="right'.($resteapayeraffiche ? ' amountremaintopay' : '').'">'.price($remaintopay)."</td></tr>\n";
|
||||
print '<td class="right'.(!empty($resteapayeraffiche) ? ' amountremaintopay' : '').'">'.price($remaintopay)."</td></tr>\n";
|
||||
}
|
||||
print "</table>";
|
||||
$db->free($resql);
|
||||
|
|
|
|||
|
|
@ -406,9 +406,9 @@ class Don extends CommonObject
|
|||
$sql .= ", ".((int) $user->id);
|
||||
$sql .= ", null";
|
||||
$sql .= ", '".$this->db->idate($this->date)."'";
|
||||
$sql .= ", '".$this->db->escape(trim($this->email))."'";
|
||||
$sql .= ", '".$this->db->escape(trim($this->phone))."'";
|
||||
$sql .= ", '".$this->db->escape(trim($this->phone_mobile))."'";
|
||||
$sql .= ", '".(!empty($this->email) ? $this->db->escape(trim($this->email)) : "")."'";
|
||||
$sql .= ", '".(!empty($this->phone) ? $this->db->escape(trim($this->phone)) : "")."'";
|
||||
$sql .= ", '".(!empty($this->phone_mobile) ? $this->db->escape(trim($this->phone_mobile)) : "")."'";
|
||||
$sql .= ")";
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
|
@ -989,7 +989,7 @@ class Don extends CommonObject
|
|||
$this->user_creation_id = $obj->fk_user_author;
|
||||
$this->user_validation_id = $obj->fk_user_valid;
|
||||
$this->date_creation = $this->db->jdate($obj->datec);
|
||||
$this->date_modification = $this->db->jdate($obj->tms);
|
||||
$this->date_modification = (!empty($obj->tms) ? $this->db->jdate($obj->tms) : "");
|
||||
}
|
||||
$this->db->free($result);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ if (!$sortfield) {
|
|||
$object = new Don($db);
|
||||
$object->fetch($id, $ref);
|
||||
|
||||
$upload_dir = $conf->don->dir_output.'/'.get_exdir($filename, 0, 0, 0, $object, 'donation').'/'.dol_sanitizeFileName($object->ref);
|
||||
$upload_dir = $conf->don->dir_output.'/'.get_exdir($id, 0, 0, 0, $object, 'donation').'/'.dol_sanitizeFileName($object->ref);
|
||||
$modulepart = 'don';
|
||||
|
||||
$permissiontoadd = $user->rights->don->creer; // Used by the include of actions_dellink.inc.php
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
|||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||
$type = GETPOST('type', 'aZ');
|
||||
if (empty($page) || $page == -1) {
|
||||
$page = 0;
|
||||
} // If $page is not defined, or '' or -1
|
||||
|
|
@ -61,7 +62,7 @@ $search_company = GETPOST('search_company', 'alpha');
|
|||
$search_name = GETPOST('search_name', 'alpha');
|
||||
$search_amount = GETPOST('search_amount', 'alpha');
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
|
||||
$moreforfilter = GETPOST('moreforfilter', 'alpha');
|
||||
if (!$user->rights->don->lire) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
|
@ -198,7 +199,7 @@ if ($resql) {
|
|||
}
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
print '<table class="tagtable liste'.(!empty($moreforfilter) ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
// Filters lines
|
||||
print '<tr class="liste_titre_filter">';
|
||||
|
|
|
|||
|
|
@ -155,6 +155,9 @@ $permissiontoadd = $user->rights->expensereport->creer; // Used by the include o
|
|||
/*
|
||||
* Actions
|
||||
*/
|
||||
$value_unit_ht = price2num(GETPOST('value_unit_ht', 'alpha'), 'MU');
|
||||
$value_unit = price2num(GETPOST('value_unit', 'alpha'), 'MU');
|
||||
$qty = price2num(GETPOST('qty', 'alpha'));
|
||||
|
||||
$parameters = array('socid' => $socid);
|
||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
|
@ -2370,14 +2373,14 @@ if ($action == 'create') {
|
|||
print '</td>';
|
||||
|
||||
// VAT
|
||||
$selectedvat = price2num($line->vatrate).($line->vat_src_code ? ' ('.$line->vat_src_code.')' : '');
|
||||
$selectedvat = price2num($line->vatrate).(!empty($line->vat_src_code) ? ' ('.$line->vat_src_code.')' : '');
|
||||
print '<td class="right">';
|
||||
print $form->load_tva('vatrate', (GETPOSTISSET("vatrate") ? GETPOST("vatrate") : $selectedvat), $mysoc, '', 0, 0, '', false, 1);
|
||||
print '</td>';
|
||||
|
||||
// Unit price
|
||||
print '<td class="right">';
|
||||
print '<input type="text" min="0" class="right maxwidth50" id="value_unit_ht" name="value_unit_ht" value="'.dol_escape_htmltag(price2num($line->value_unit_ht)).'"'.$taxlessUnitPriceDisabled.' />';
|
||||
print '<input type="text" min="0" class="right maxwidth50" id="value_unit_ht" name="value_unit_ht" value="'.dol_escape_htmltag(price2num((!empty($line->value_unit_ht) ? $line->value_unit_ht : ""))).'"'.$taxlessUnitPriceDisabled.' />';
|
||||
print '</td>';
|
||||
|
||||
// Unit price with tax
|
||||
|
|
@ -2521,19 +2524,19 @@ if ($action == 'create') {
|
|||
|
||||
// Select date
|
||||
print '<td class="center inputdate">';
|
||||
print $form->selectDate($date ? $date : -1, 'date', 0, 0, 0, '', 1, 1);
|
||||
print $form->selectDate(!empty($date) ? $date : -1, 'date', 0, 0, 0, '', 1, 1);
|
||||
print '</td>';
|
||||
|
||||
// Select project
|
||||
if (isModEnabled('project')) {
|
||||
print '<td class="inputproject">';
|
||||
$formproject->select_projects(-1, $fk_project, 'fk_project', 0, 0, $projectRequired ? 0 : 1, -1, 0, 0, 0, '', 0, 0, 'maxwidth300');
|
||||
$formproject->select_projects(-1, !empty($fk_project) ? $fk_project : 0, 'fk_project', 0, 0, $projectRequired ? 0 : 1, -1, 0, 0, 0, '', 0, 0, 'maxwidth300');
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
// Select type
|
||||
print '<td class="center inputtype">';
|
||||
print $formexpensereport->selectTypeExpenseReport($fk_c_type_fees, 'fk_c_type_fees', 1);
|
||||
print $formexpensereport->selectTypeExpenseReport(!empty($fk_c_type_fees) ? $fk_c_type_fees : "", 'fk_c_type_fees', 1);
|
||||
print '</td>';
|
||||
|
||||
if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) {
|
||||
|
|
@ -2545,7 +2548,7 @@ if ($action == 'create') {
|
|||
|
||||
// Add comments
|
||||
print '<td class="inputcomment">';
|
||||
print '<textarea class="flat_ndf centpercent" name="comments" rows="'.ROWS_2.'">'.dol_escape_htmltag($comments, 0, 1).'</textarea>';
|
||||
print '<textarea class="flat_ndf centpercent" name="comments" rows="'.ROWS_2.'">'.dol_escape_htmltag(!empty($comments) ? $comments : "", 0, 1).'</textarea>';
|
||||
print '</td>';
|
||||
|
||||
// Select VAT
|
||||
|
|
@ -2554,22 +2557,22 @@ if ($action == 'create') {
|
|||
if (!empty($conf->global->EXPENSEREPORT_NO_DEFAULT_VAT)) {
|
||||
$conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS = 'none';
|
||||
}
|
||||
print $form->load_tva('vatrate', ($vatrate != '' ? $vatrate : $defaultvat), $mysoc, '', 0, 0, '', false, 1);
|
||||
print $form->load_tva('vatrate', (!empty($vatrate) ? $vatrate : $defaultvat), $mysoc, '', 0, 0, '', false, 1);
|
||||
print '</td>';
|
||||
|
||||
// Unit price net
|
||||
print '<td class="right inputpricenet">';
|
||||
print '<input type="text" class="right maxwidth50" id="value_unit_ht" name="value_unit_ht" value="'.dol_escape_htmltag($value_unit_ht).'"'.$taxlessUnitPriceDisabled.' />';
|
||||
print '<input type="text" class="right maxwidth50" id="value_unit_ht" name="value_unit_ht" value="'.dol_escape_htmltag((!empty($value_unit_ht) ? $value_unit_ht : 0)).'"'.$taxlessUnitPriceDisabled.' />';
|
||||
print '</td>';
|
||||
|
||||
// Unit price with tax
|
||||
print '<td class="right inputtax">';
|
||||
print '<input type="text" class="right maxwidth50" id="value_unit" name="value_unit" value="'.dol_escape_htmltag($value_unit).'">';
|
||||
print '<input type="text" class="right maxwidth50" id="value_unit" name="value_unit" value="'.dol_escape_htmltag((!empty($value_unit) ? $value_unit : 0)).'">';
|
||||
print '</td>';
|
||||
|
||||
// Quantity
|
||||
print '<td class="right inputqty">';
|
||||
print '<input type="text" min="0" class=" input_qty right maxwidth50" name="qty" value="'.dol_escape_htmltag($qty ? $qty : 1).'">'; // We must be able to enter decimal qty
|
||||
print '<input type="text" min="0" class=" input_qty right maxwidth50" name="qty" value="'.dol_escape_htmltag(!empty($qty) ? $qty : 1).'">'; // We must be able to enter decimal qty
|
||||
print '</td>';
|
||||
|
||||
// Picture
|
||||
|
|
|
|||
|
|
@ -771,6 +771,7 @@ class ExpenseReport extends CommonObject
|
|||
$sql .= " f.date_valid as datev,";
|
||||
$sql .= " f.date_approve as datea,";
|
||||
$sql .= " f.fk_user_creat as fk_user_creation,";
|
||||
$sql .= " f.fk_user_author as fk_user_author,";
|
||||
$sql .= " f.fk_user_modif as fk_user_modification,";
|
||||
$sql .= " f.fk_user_valid,";
|
||||
$sql .= " f.fk_user_approve";
|
||||
|
|
|
|||
|
|
@ -836,7 +836,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
|
||||
$label = '';
|
||||
|
||||
if ($user->rights->fournisseur->commande->lire) {
|
||||
if ($user->hasRight("fournisseur", "commande", "read")) {
|
||||
$label = '<u class="paddingrightonly">'.$langs->trans("SupplierOrder").'</u>';
|
||||
if (isset($this->statut)) {
|
||||
$label .= ' '.$this->getLibStatut(5);
|
||||
|
|
|
|||
|
|
@ -74,7 +74,9 @@ if (empty($user->rights->margins->liretous)) {
|
|||
$invoicestatic = new Facture($db);
|
||||
|
||||
$form = new Form($db);
|
||||
|
||||
$totalMargin = 0;
|
||||
$marginRate = 0;
|
||||
$markRate = 0;
|
||||
if ($id > 0 || !empty($ref)) {
|
||||
$result = $object->fetch($id, $ref);
|
||||
|
||||
|
|
@ -136,7 +138,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
print dol_get_fiche_end();
|
||||
|
||||
|
||||
if ($user->rights->facture->lire) {
|
||||
if ($user->hasRight("facture", "read")) {
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid, s.code_client,";
|
||||
$sql .= " f.rowid as facid, f.ref, f.total_ht,";
|
||||
$sql .= " f.datef, f.paye, f.fk_statut as statut, f.type,";
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ if ($user->socid) {
|
|||
$socid = $user->socid;
|
||||
}
|
||||
|
||||
if (empty($user->rights->fournisseur->lire)) {
|
||||
if (empty($user->rights->fournisseur->lire) && (empty($conf->margin->enabled) && !$user->hasRight("margin", "liretous"))) {
|
||||
accessforbidden();
|
||||
}
|
||||
|
||||
|
|
@ -919,7 +919,7 @@ END;
|
|||
|
||||
print "</div>\n";
|
||||
|
||||
if ($user->rights->fournisseur->lire) { // Duplicate ? this check is already in the head of this file
|
||||
if ($user->hasRight("fournisseur", "read")) { // Duplicate ? this check is already in the head of this file
|
||||
$param = '';
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
||||
$param .= '&contextpage='.urlencode($contextpage);
|
||||
|
|
|
|||
|
|
@ -1016,7 +1016,7 @@ if ($resql) {
|
|||
// Type ent
|
||||
if (!empty($arrayfields['typent.code']['checked'])) {
|
||||
print '<td class="center">';
|
||||
if (count($typenArray) == 0) {
|
||||
if (empty($typenArray) || !is_array($typenArray) || count($typenArray) == 0) {
|
||||
$typenArray = $formcompany->typent_array(1);
|
||||
}
|
||||
print $typenArray[$obj->typent_code];
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ parameters:
|
|||
- %currentWorkingDirectory%/htdocs/core/lib/donation.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/ecm.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/emailing.lib.php
|
||||
#- %currentWorkingDirectory%/htdocs/core/lib/eventorganization.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/expedition.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/expensereport.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/fichinter.lib.php
|
||||
|
|
@ -110,13 +111,17 @@ parameters:
|
|||
- %currentWorkingDirectory%/htdocs/core/lib/fiscalyear.lib.php
|
||||
#- %currentWorkingDirectory%/htdocs/core/lib/format_cards.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/fourn.lib.php
|
||||
#- %currentWorkingDirectory%/htdocs/core/lib/ftp.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/functions.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/functions2.lib.php
|
||||
#- %currentWorkingDirectory%/htdocs/core/lib/functions_ch.lib.php
|
||||
#- %currentWorkingDirectory%/htdocs/core/lib/functionsnumtoword.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/geturl.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/holiday.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/hrm.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/images.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/import.lib.php
|
||||
#- %currentWorkingDirectory%/htdocs/core/lib/intracommreport.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/invoice.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/invoice2.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/json.lib.php
|
||||
|
|
@ -132,11 +137,13 @@ parameters:
|
|||
- %currentWorkingDirectory%/htdocs/core/lib/parsemd.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/payments.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/pdf.lib.php
|
||||
#- %currentWorkingDirectory%/htdocs/core/lib/phpsessionindb.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/prelevement.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/price.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/product.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/project.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/propal.lib.php
|
||||
#- %currentWorkingDirectory%/htdocs/core/lib/receiptprinter.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/reception.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/report.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/resource.lib.php
|
||||
|
|
@ -155,6 +162,7 @@ parameters:
|
|||
- %currentWorkingDirectory%/htdocs/core/lib/usergroups.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/vat.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/website.lib.php
|
||||
#- %currentWorkingDirectory%/htdocs/core/lib/website2.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/ws.lib.php
|
||||
- %currentWorkingDirectory%/htdocs/core/lib/xcal.lib.php
|
||||
featureToggles:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user