Merge pull request #16742 from frederic34/fix-php8-20210306

Fix php8
This commit is contained in:
Laurent Destailleur 2021-03-17 16:58:05 +01:00 committed by GitHub
commit 8829d42e1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 8 deletions

View File

@ -79,7 +79,7 @@ $permissiontoadd = $user->rights->asset->write; // Used by the include of action
$permissiontodelete = $user->rights->asset->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
$permissionnote = $user->rights->asset->write; // Used by the include of actions_setnotes.inc.php
$permissiondellink = $user->rights->asset->write; // Used by the include of actions_dellink.inc.php
$upload_dir = $conf->mymodule->multidir_output[isset($object->entity) ? $object->entity : 1];
$upload_dir = $conf->asset->multidir_output[isset($object->entity) ? $object->entity : 1];
/*

View File

@ -441,7 +441,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
* Draft purchase orders
*/
if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire) {
$sql = "SELECT cf.rowid, cf.ref, cf.ref_supplier, cf.total_ttc, cf.fk_statut as status";
$sql = "SELECT cf.rowid, cf.ref, cf.ref_supplier, cf.total_ht, cf.total_tva, cf.total_ttc, cf.fk_statut as status";
$sql .= ", s.rowid as socid, s.nom as name, s.name_alias";
$sql .= ", s.code_client, s.code_compta, s.client";
$sql .= ", s.code_fournisseur, s.code_compta_fournisseur, s.fournisseur";
@ -485,7 +485,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU
$supplierorderstatic->id = $obj->rowid;
$supplierorderstatic->ref = $obj->ref;
$supplierorderstatic->ref_supplier = $obj->ref_suppliert;
$supplierorderstatic->ref_supplier = $obj->ref_supplier;
$supplierorderstatic->total_ht = $obj->total_ht;
$supplierorderstatic->total_tva = $obj->total_tva;
$supplierorderstatic->total_ttc = $obj->total_ttc;
@ -882,7 +882,7 @@ if (!empty($conf->propal->enabled) && $user->rights->propal->lire) {
$filename = dol_sanitizeFileName($obj->ref);
$filedir = $conf->propal->multidir_output[$obj->entity].'/'.dol_sanitizeFileName($obj->ref);
$urlsource = $_SERVER['PHP_SELF'].'?id='.$obj->propalid;
//$urlsource = $_SERVER['PHP_SELF'].'?id='.$obj->propalid;
$warning = ($db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) ? img_warning($langs->trans("Late")) : '';
print '<tr class="oddeven">';
@ -998,7 +998,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
$filename = dol_sanitizeFileName($obj->ref);
$filedir = $conf->commande->dir_output.'/'.dol_sanitizeFileName($obj->ref);
$urlsource = $_SERVER['PHP_SELF'].'?id='.$obj->propalid;
//$urlsource = $_SERVER['PHP_SELF'].'?id='.$obj->propalid;
//$warning = ($db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) ? img_warning($langs->trans("Late")) : '';
print '<tr class="oddeven">';
@ -1013,7 +1013,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire) {
print '</td>';
print '<td class="nowrap">'.$companystatic->getNomUrl(1, 'customer', 44).'</td>';
print '<td class="right tddate">'.dol_print_date($db->jdate($obj->dp), 'day').'</td>';
print '<td class="right tddate">'.dol_print_date($db->jdate($obj->dv), 'day').'</td>';
print '<td class="right tdamount">'.price(!empty($conf->global->MAIN_DASHBOARD_USE_TOTAL_HT) ? $obj->total_ht : $obj->total_ttc).'</td>';
print '<td align="center" width="14">'.$orderstatic->LibStatut($obj->fk_statut, $obj->billed, 3).'</td>';

View File

@ -90,7 +90,7 @@ class box_services_contracts extends ModeleBoxes
$sql = "SELECT s.nom as name, s.rowid as socid, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,";
$sql .= " c.rowid, c.ref, c.statut as contract_status, c.ref_customer, c.ref_supplier,";
$sql .= " cd.rowid as cdid, cd.label, cd.description, cd.tms as datem, cd.statut as contractline_status, cd.product_type as type, cd.date_fin_validite as date_line,";
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as product_type, p.entity, p.tobuy, p.tosell";
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as product_type, p.entity as product_entity, p.tobuy, p.tosell";
$sql .= " FROM (".MAIN_DB_PREFIX."societe as s";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."contrat as c ON s.rowid = c.fk_soc";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."contratdet as cd ON c.rowid = cd.fk_contrat";
@ -155,7 +155,7 @@ class box_services_contracts extends ModeleBoxes
$productstatic->id = $objp->product_id;
$productstatic->type = $objp->product_type;
$productstatic->ref = $objp->product_ref;
$productstatic->entity = $objp->pentity;
$productstatic->entity = $objp->product_entity;
$productstatic->label = $objp->product_label;
$productstatic->status = $objp->tosell;
$productstatic->status_buy = $objp->tobuy;