From b66ec5bc64809795ae38ad95ecbe14a3e0b2384c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 23 Dec 2020 23:16:27 +0100 Subject: [PATCH] Fix css --- htdocs/compta/facture/prelevement.php | 2 +- htdocs/fourn/facture/card.php | 40 ++++++++++----------------- htdocs/fourn/facture/contact.php | 2 +- htdocs/fourn/facture/document.php | 2 +- htdocs/fourn/facture/index.php | 2 +- htdocs/fourn/facture/info.php | 2 +- htdocs/fourn/facture/note.php | 2 +- 7 files changed, 21 insertions(+), 31 deletions(-) diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 7e852846d5c..d50813cbea4 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -213,7 +213,7 @@ if ($object->id > 0) $head = facture_prepare_head($object); } - print dol_get_fiche_head($head, 'standingorders', $title, -1, 'bill'); + print dol_get_fiche_head($head, 'standingorders', $title, -1, ($type == 'bank-transfer' ? 'supplier_invoice' : 'bill')); // Invoice content if ($type == 'bank-transfer') { diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index b439e5cad45..c615817e36f 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -115,6 +115,8 @@ $permissiondellink = $usercancreate; // Used by the include of actions_dellink.i $permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php $permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$error = 0; + /* * Actions @@ -183,8 +185,7 @@ if (empty($reshook)) } // Check parameters - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) - { + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) { $langs->load("stocks"); if (!$idwarehouse || $idwarehouse == -1) { @@ -194,11 +195,9 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { $result = $object->validate($user, '', $idwarehouse); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } else { // Define output language @@ -220,8 +219,7 @@ if (empty($reshook)) } } } - } elseif ($action == 'confirm_delete' && $confirm == 'yes') - { + } elseif ($action == 'confirm_delete' && $confirm == 'yes') { $object->fetch($id); $object->fetch_thirdparty(); @@ -280,15 +278,13 @@ if (empty($reshook)) } elseif ($action == 'confirm_paid' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); $result = $object->set_paid($user); - if ($result < 0) - { + if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } // Set supplier ref - if ($action == 'setref_supplier' && $usercancreate) - { + if ($action == 'setref_supplier' && $usercancreate) { $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); if ($object->update($user) < 0) { @@ -315,8 +311,7 @@ if (empty($reshook)) } // payments conditions - if ($action == 'setconditions' && $usercancreate) - { + if ($action == 'setconditions' && $usercancreate) { $object->fetch($id); $object->cond_reglement_code = 0; // To clean property $object->cond_reglement_id = 0; // To clean property @@ -1680,20 +1675,17 @@ if ($action == 'create') $currency_code = $conf->currency; $societe = ''; - if (GETPOST('socid') > 0) - { + if (GETPOST('socid') > 0) { $societe = new Societe($db); $societe->fetch(GETPOST('socid', 'int')); if (!empty($conf->multicurrency->enabled) && !empty($societe->multicurrency_code)) $currency_code = $societe->multicurrency_code; } - if (!empty($origin) && !empty($originid)) - { + if (!empty($origin) && !empty($originid)) { // Parse element/subelement (ex: project_task) $element = $subelement = $origin; - if ($element == 'project') - { + if ($element == 'project') { $projectid = $originid; $element = 'projet'; } @@ -2204,8 +2196,7 @@ if ($action == 'create') // Show origin lines - if (is_object($objectsrc)) - { + if (is_object($objectsrc)) { print '
'; $title = $langs->trans('ProductsAndServices'); @@ -2218,8 +2209,7 @@ if ($action == 'create') print ''; } } else { - if ($id > 0 || !empty($ref)) - { + if ($id > 0 || !empty($ref)) { /* *************************************************************************** */ /* */ /* Fiche en mode visu ou edition */ @@ -2275,7 +2265,7 @@ if ($action == 'create') $head = facturefourn_prepare_head($object); $titre = $langs->trans('SupplierInvoice'); - print dol_get_fiche_head($head, 'card', $titre, -1, 'bill'); + print dol_get_fiche_head($head, 'card', $titre, -1, 'supplier_invoice'); $formconfirm = ''; diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index 99010c977dc..357abd029fa 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -134,7 +134,7 @@ if ($id > 0 || !empty($ref)) $head = facturefourn_prepare_head($object); - print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'bill'); + print dol_get_fiche_head($head, 'contact', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); $linkback = ''.$langs->trans("BackToList").''; diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index d57abc67644..36f5a45b25e 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -90,7 +90,7 @@ llxHeader('', $title, $helpurl); if ($object->id > 0) { $head = facturefourn_prepare_head($object); - print dol_get_fiche_head($head, 'documents', $langs->trans('SupplierInvoice'), -1, 'bill'); + print dol_get_fiche_head($head, 'documents', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); $totalpaye = $object->getSommePaiement(); diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php index 494f5d2aa03..131b34bbe39 100644 --- a/htdocs/fourn/facture/index.php +++ b/htdocs/fourn/facture/index.php @@ -51,7 +51,7 @@ $maxOpenCount = empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->globa llxHeader("", $langs->trans("SupplierInvoicesArea"), 'EN:Suppliers_Invoices|FR:FactureFournisseur|ES:Facturas_de_proveedores'); -print load_fiche_titre($langs->trans("SupplierInvoicesArea"), '', 'bill'); +print load_fiche_titre($langs->trans("SupplierInvoicesArea"), '', 'supplier_invoice'); print '
'; diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php index f8522722e64..656cd3c5553 100644 --- a/htdocs/fourn/facture/info.php +++ b/htdocs/fourn/facture/info.php @@ -65,7 +65,7 @@ $alreadypaid = $object->getSommePaiement(); $head = facturefourn_prepare_head($object); $titre = $langs->trans('SupplierInvoice'); -print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'bill'); +print dol_get_fiche_head($head, 'info', $langs->trans('SupplierInvoice'), -1, 'supplier_invoice'); $linkback = ''.$langs->trans("BackToList").''; diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index c72e7b72710..c98ad3ba1d8 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -82,7 +82,7 @@ if ($object->id > 0) $head = facturefourn_prepare_head($object); $titre = $langs->trans('SupplierInvoice'); - print dol_get_fiche_head($head, 'note', $titre, -1, 'bill'); + print dol_get_fiche_head($head, 'note', $titre, -1, 'supplier_invoice'); // Supplier invoice card