From 540713510e765eee847a458118732e05247e9f74 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Jan 2020 20:59:18 +0100 Subject: [PATCH 01/10] Fix load of segment prices not required for virtual stock change virtual stock must include production (WIP) --- htdocs/compta/facture/card-rec.php | 8 +-- htdocs/compta/facture/class/facture.class.php | 4 +- htdocs/core/class/html.form.class.php | 5 +- htdocs/product/class/product.class.php | 60 ++++++++++++------- 4 files changed, 48 insertions(+), 29 deletions(-) diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 07697ffd2d9..7d1f529bf82 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -44,7 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; // Load translation files required by the page -$langs->loadLangs(array('bills', 'compta', 'admin', 'other', 'products')); +$langs->loadLangs(array('bills', 'compta', 'admin', 'other', 'products', 'banks')); $action = GETPOST('action', 'alpha'); $massaction = GETPOST('massaction', 'alpha'); @@ -1030,6 +1030,8 @@ if ($action == 'create') // Only on template invoices $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = $langs->trans("DateNextInvoiceBeforeGen").' ('.$langs->trans("Example").': '.dol_print_date($object->date_when, 'dayhour').')'; $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = $langs->trans("DateNextInvoiceAfterGen").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree($object->date_when, $object->frequency, $object->unit_frequency), 'dayhour').')'; + $substitutionarray['__INVOICE_COUNTER_CURRENT__'] = $langs->trans("Count"); + $substitutionarray['__INVOICE_COUNTER_MAX__'] = $langs->trans("MaxPeriodNumber"); $htmltext = ''.$langs->trans("FollowingConstantsWillBeSubstituted").':
'; foreach ($substitutionarray as $key => $val) @@ -1446,8 +1448,6 @@ else print ''; // Bank Account - $langs->load('banks'); - print ''; print ''; // Model pdf - $langs->load('banks'); - print '"; - foreach ($arrayofpaymentmode as $key => $val) { print '
'; print $langs->trans('BankAccount'); @@ -1468,8 +1468,6 @@ else print '
'; print ''; print '
'; print $langs->trans('Model'); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 421e6b2e7d6..83f9706bcee 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -448,10 +448,12 @@ class Facture extends CommonInvoice $substitutionarray['__INVOICE_PREVIOUS_YEAR__'] = dol_print_date(dol_time_plus_duree($this->date, -1, 'y'), '%Y'); $substitutionarray['__INVOICE_YEAR__'] = dol_print_date($this->date, '%Y'); $substitutionarray['__INVOICE_NEXT_YEAR__'] = dol_print_date(dol_time_plus_duree($this->date, 1, 'y'), '%Y'); - // Only for tempalte invoice + // Only for template invoice $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = dol_print_date($originaldatewhen, 'dayhour'); $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = dol_print_date($nextdatewhen, 'dayhour'); $substitutionarray['__INVOICE_PREVIOUS_DATE_NEXT_INVOICE_AFTER_GEN__'] = dol_print_date($previousdaynextdatewhen, 'dayhour'); + $substitutionarray['__INVOICE_COUNTER_CURRENT__'] = $_facrec->nb_gen_done; + $substitutionarray['__INVOICE_COUNTER_MAX__'] = $_facrec->nb_gen_max; //var_dump($substitutionarray);exit; diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 0fe8c72220c..cba66729d8c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2361,6 +2361,7 @@ class Form $objp->price_ttc = price2num($objp->price_ttc, 'MU'); } } + $this->constructProductListOption($objp, $opt, $optJson, $price_level, $selected, $hidepriceinlabel, $filterkey); // Add new entry // "key" value of json key array is used by jQuery automatically as selected value @@ -2511,7 +2512,7 @@ class Form $sql .= " ORDER BY date_price DESC, rowid DESC"; // Warning DESC must be both on date_price and rowid. $sql .= " LIMIT 1"; - dol_syslog(get_class($this).'::constructProductListOption search price for level '.$price_level.'', LOG_DEBUG); + dol_syslog(get_class($this).'::constructProductListOption search price for product '.$objp->rowid.' AND level '.$price_level.'', LOG_DEBUG); $result2 = $this->db->query($sql); if ($result2) { @@ -2639,7 +2640,7 @@ class Form $langs->load("stocks"); $tmpproduct = new Product($this->db); - $tmpproduct->fetch($objp->rowid); + $tmpproduct->fetch($objp->rowid, '', '', '', 1, 1, 1); // Load product without lang and prices arrays (we just need to make ->virtual_stock() after) $tmpproduct->load_virtual_stock(); $virtualstock = $tmpproduct->stock_theorique; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 664388797fc..3e92772738f 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -2051,9 +2051,11 @@ class Product extends CommonObject * @param string $ref_ext Ref ext of product/service to load * @param string $barcode Barcode of product/service to load * @param int $ignore_expression Ignores the math expression for calculating price and uses the db value instead - * @return int <0 if KO, 0 if not found, >0 if OK + * @param int $ignore_price_load Load product without loading prices arrays (when we are sure we don't need them) + * @param int $ignore_lang_load Load product without loading language arrays (when we are sure we don't need them) + * @return int <0 if KO, 0 if not found, >0 if OK */ - public function fetch($id = '', $ref = '', $ref_ext = '', $barcode = '', $ignore_expression = 0) + public function fetch($id = '', $ref = '', $ref_ext = '', $barcode = '', $ignore_expression = 0, $ignore_price_load = 0, $ignore_lang_load = 0) { include_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -2182,12 +2184,12 @@ class Product extends CommonObject $this->fetch_optionals(); // multilangs - if (!empty($conf->global->MAIN_MULTILANGS)) { + if (!empty($conf->global->MAIN_MULTILANGS) && empty($ignore_lang_load)) { $this->getMultiLangs(); } // Load multiprices array - if (!empty($conf->global->PRODUIT_MULTIPRICES)) // prices per segment + if (!empty($conf->global->PRODUIT_MULTIPRICES) && empty($ignore_price_load)) // prices per segment { for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { @@ -2255,11 +2257,11 @@ class Product extends CommonObject } } } - elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) // prices per customers + elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES) && empty($ignore_price_load)) // prices per customers { // Nothing loaded by default. List may be very long. } - elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) // prices per quantity + elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) && empty($ignore_price_load)) // prices per quantity { $sql = "SELECT price, price_ttc, price_min, price_min_ttc,"; $sql .= " price_base_type, tva_tx, default_vat_code, tosell, price_by_qty, rowid"; @@ -2310,7 +2312,7 @@ class Product extends CommonObject return -1; } } - elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) // prices per customer and quantity + elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES) && empty($ignore_price_load)) // prices per customer and quantity { for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { @@ -2770,7 +2772,7 @@ class Product extends CommonObject // phpcs:enable global $conf, $user; - $sql = "SELECT COUNT(DISTINCT cf.fk_soc) as nb_customers, COUNT(DISTINCT cf.rowid) as nb,"; + $sql = "SELECT COUNT(DISTINCT cf.fk_soc) as nb_suppliers, COUNT(DISTINCT cf.rowid) as nb,"; $sql .= " COUNT(fd.rowid) as nb_rows, SUM(fd.qty) as qty"; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur_dispatch as fd"; $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as cf"; @@ -2791,7 +2793,7 @@ class Product extends CommonObject $result = $this->db->query($sql); if ($result) { $obj = $this->db->fetch_object($result); - $this->stats_reception['suppliers'] = $obj->nb_customers; + $this->stats_reception['suppliers'] = $obj->nb_suppliers; $this->stats_reception['nb'] = $obj->nb; $this->stats_reception['rows'] = $obj->nb_rows; $this->stats_reception['qty'] = $obj->qty ? $obj->qty : 0; @@ -4674,6 +4676,7 @@ class Product extends CommonObject $stock_commande_fournisseur = 0; $stock_sending_client = 0; $stock_reception_fournisseur = 0; + $stock_inproduction = 0; if (!empty($conf->commande->enabled)) { @@ -4699,34 +4702,49 @@ class Product extends CommonObject $result = $this->load_stats_commande_fournisseur(0, '1,2,3,4', 1); if ($result < 0) dol_print_error($this->db, $this->error); $stock_commande_fournisseur = $this->stats_commande_fournisseur['qty']; - + } + if (!empty($conf->fournisseur->enabled) && empty($conf->reception->enabled)) + { $result = $this->load_stats_reception(0, '4', 1); if ($result < 0) dol_print_error($this->db, $this->error); $stock_reception_fournisseur = $this->stats_reception['qty']; } + if (!empty($conf->fournisseur->enabled) && !empty($conf->reception->enabled)) + { + $result = $this->load_stats_reception(0, '4', 1); // Use same tables than when module reception is not used. + if ($result < 0) dol_print_error($this->db, $this->error); + $stock_reception_fournisseur = $this->stats_reception['qty']; + } + if (!empty($conf->mrp->enabled)) + { + // TODO + $stock_inproduction = 0; + } + + $this->stock_theorique = $this->stock_reel + $stock_inproduction; // Stock decrease mode if (!empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT) || !empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE)) { - $this->stock_theorique = $this->stock_reel - $stock_commande_client + $stock_sending_client; + $this->stock_theorique -= ($stock_commande_client - $stock_sending_client); } - if (!empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER)) { - $this->stock_theorique = $this->stock_reel; + elseif (!empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER)) { + $this->stock_theorique += 0; } - if (!empty($conf->global->STOCK_CALCULATE_ON_BILL)) { - $this->stock_theorique = $this->stock_reel - $stock_commande_client; + elseif (!empty($conf->global->STOCK_CALCULATE_ON_BILL)) { + $this->stock_theorique -= $stock_commande_client; } // Stock Increase mode if (!empty($conf->global->STOCK_CALCULATE_ON_RECEPTION) || !empty($conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) { - $this->stock_theorique += $stock_commande_fournisseur - $stock_reception_fournisseur; + $this->stock_theorique += ($stock_commande_fournisseur - $stock_reception_fournisseur); } - if (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) { - $this->stock_theorique += $stock_commande_fournisseur - $stock_reception_fournisseur; + elseif (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) { + $this->stock_theorique += ($stock_commande_fournisseur - $stock_reception_fournisseur); } - if (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER)) { + elseif (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER)) { $this->stock_theorique -= $stock_reception_fournisseur; } - if (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) { - $this->stock_theorique += $stock_commande_fournisseur - $stock_reception_fournisseur; + elseif (!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) { + $this->stock_theorique += ($stock_commande_fournisseur - $stock_reception_fournisseur); } if (!is_object($hookmanager)) { From 17f28189f9a1a77a2f38d19589e1f53fc8618847 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Jan 2020 14:51:45 +0100 Subject: [PATCH 02/10] Virtual stock must include Manufacturing Orders --- htdocs/langs/en_US/mrp.lang | 2 + htdocs/product/class/product.class.php | 95 +++++++++++++++++++++++++- htdocs/product/stock/product.php | 8 +++ 3 files changed, 103 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang index e4034426e9a..11c6915a25c 100644 --- a/htdocs/langs/en_US/mrp.lang +++ b/htdocs/langs/en_US/mrp.lang @@ -64,3 +64,5 @@ ConfirmProductionDesc=By clicking on '%s', you will validate the consumption and ProductionForRef=Production of %s AutoCloseMO=Close automatically the Manufacturing Order if quantities to consume and to produce are reached NoStockChangeOnServices=No stock change on services +ProductQtyToConsumeByMO=Product quantity still to consume by open MO +ProductQtyToProduceByMO=Product quentity still to produce by open MO diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 3e92772738f..5eb8ab904cc 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -318,6 +318,9 @@ class Product extends CommonObject public $stats_contrat = array(); public $stats_facture = array(); public $stats_commande_fournisseur = array(); + public $stats_reception = array(); + public $stats_mrptoconsume = array(); + public $stats_mrptoproduce = array(); public $multilangs = array(); @@ -2806,6 +2809,93 @@ class Product extends CommonObject } } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Charge tableau des stats commande client pour le produit/service + * + * @param int $socid Id societe pour filtrer sur une societe + * @param string $filtrestatut Id statut pour filtrer sur un statut + * @param int $forVirtualStock Ignore rights filter for virtual stock calculation. + * @return integer Array of stats in $this->stats_commande (nb=nb of order, qty=qty ordered), <0 if ko or >0 if ok + */ + public function load_stats_inproduction($socid = 0, $filtrestatut = '', $forVirtualStock = 0) + { + // phpcs:enable + global $conf, $user; + + $sql = "SELECT COUNT(DISTINCT m.fk_soc) as nb_customers, COUNT(DISTINCT m.rowid) as nb,"; + $sql .= " COUNT(mp.rowid) as nb_rows, SUM(mp.qty) as qty, role"; + $sql .= " FROM ".MAIN_DB_PREFIX."mrp_production as mp"; + $sql .= ", ".MAIN_DB_PREFIX."mrp_mo as m"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = m.fk_soc"; + if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) { + $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + } + $sql .= " WHERE m.rowid = mp.fk_mo"; + $sql .= " AND m.entity IN (".getEntity('mrp').")"; + $sql .= " AND mp.fk_product = ".$this->id; + if (!$user->rights->societe->client->voir && !$socid && !$forVirtualStock) { + $sql .= " AND m.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + } + if ($socid > 0) { + $sql .= " AND m.fk_soc = ".$socid; + } + if ($filtrestatut <> '') { + $sql .= " AND m.status in (".$filtrestatut.")"; + } + $sql .= " GROUP BY role"; + + $this->stats_mrptoconsume['customers'] = 0; + $this->stats_mrptoconsume['nb'] = 0; + $this->stats_mrptoconsume['rows'] = 0; + $this->stats_mrptoconsume['qty'] = 0; + $this->stats_mrptoproduce['customers'] = 0; + $this->stats_mrptoproduce['nb'] = 0; + $this->stats_mrptoproduce['rows'] = 0; + $this->stats_mrptoproduce['qty'] = 0; + + $result = $this->db->query($sql); + if ($result) { + while ($obj = $this->db->fetch_object($result)) { + if ($obj->role == 'toconsume') { + $this->stats_mrptoconsume['customers'] += $obj->nb_customers; + $this->stats_mrptoconsume['nb'] += $obj->nb; + $this->stats_mrptoconsume['rows'] += $obj->nb_rows; + $this->stats_mrptoconsume['qty'] += ($obj->qty ? $obj->qty : 0); + } + if ($obj->role == 'consumed') { + //$this->stats_mrptoconsume['customers'] += $obj->nb_customers; + //$this->stats_mrptoconsume['nb'] += $obj->nb; + //$this->stats_mrptoconsume['rows'] += $obj->nb_rows; + $this->stats_mrptoconsume['qty'] -= ($obj->qty ? $obj->qty : 0); + } + if ($obj->role == 'toproduce') { + $this->stats_mrptoproduce['customers'] += $obj->nb_customers; + $this->stats_mrptoproduce['nb'] += $obj->nb; + $this->stats_mrptoproduce['rows'] += $obj->nb_rows; + $this->stats_mrptoproduce['qty'] += ($obj->qty ? $obj->qty : 0); + } + if ($obj->role == 'produced') { + //$this->stats_mrptoproduce['customers'] += $obj->nb_customers; + //$this->stats_mrptoproduce['nb'] += $obj->nb; + //$this->stats_mrptoproduce['rows'] += $obj->nb_rows; + $this->stats_mrptoproduce['qty'] -= ($obj->qty ? $obj->qty : 0); + } + } + + // Clean data + if ($this->stats_mrptoconsume['qty'] < 0) $this->stats_mrptoconsume['qty'] = 0; + if ($this->stats_mrptoproduce['qty'] < 0) $this->stats_mrptoproduce['qty'] = 0; + + return 1; + } + else + { + $this->error = $this->db->error(); + return -1; + } + } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Charge tableau des stats contrat pour le produit/service @@ -4717,8 +4807,9 @@ class Product extends CommonObject } if (!empty($conf->mrp->enabled)) { - // TODO - $stock_inproduction = 0; + $result = $this->load_stats_inproduction(0, '1,2', 1); + if ($result < 0) dol_print_error($this->db, $this->error); + $stock_inproduction = $this->stats_mrptoproduce['qty'] - $this->stats_mrptoconsume['qty']; } $this->stock_theorique = $this->stock_reel + $stock_inproduction; diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 889084aa4be..5929a46edb8 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -689,6 +689,14 @@ if ($id > 0 || $ref) $helpondiff .= $langs->trans("ProductQtyInSuppliersShipmentAlreadyRecevied").': '.$object->stats_reception['qty']; } + // Number of product in production + if (!empty($conf->mrp->enabled)) { + if ($found) $helpondiff .= '
'; else $found = 1; + $helpondiff .= $langs->trans("ProductQtyToConsumeByMO").': '.$object->stats_mrptoconsume['qty'].'
'; + $helpondiff .= $langs->trans("ProductQtyToProduceByMO").': '.$object->stats_mrptoproduce['qty']; + } + + // Calculating a theorical value print '
'; print $form->textwithpicto($langs->trans("VirtualStock"), $langs->trans("VirtualStockDesc")); From 779cd94b0ec5598a84256fef5c2db094ea81d82b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Jan 2020 15:26:18 +0100 Subject: [PATCH 03/10] Debug cashfence feature --- .../compta/cashcontrol/cashcontrol_card.php | 5 ++-- htdocs/compta/cashcontrol/report.php | 25 ++++++++++++++----- htdocs/core/class/html.formfile.class.php | 4 +-- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index 0a7e2fa2d17..d98142a30b3 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -551,7 +551,9 @@ if (empty($action) || $action == "view") print '
'; print $langs->trans("Period"); print ''; - print $object->year_close."-".$object->month_close."-".$object->day_close; + print $object->year_close; + print ($object->month_close ? "-" : "").$object->month_close; + print ($object->day_close ? "-" : "").$object->day_close; print '
'; @@ -570,7 +572,6 @@ if (empty($action) || $action == "view") print '
'.$langs->trans("InitialBankBalance").' - '.$langs->trans("Cash").''; print price($object->opening, 0, $langs, 1, -1, -1, $conf->currency); print "
'.$langs->trans($val).''; diff --git a/htdocs/compta/cashcontrol/report.php b/htdocs/compta/cashcontrol/report.php index 2a2477fce5e..26023d47701 100644 --- a/htdocs/compta/cashcontrol/report.php +++ b/htdocs/compta/cashcontrol/report.php @@ -33,11 +33,11 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php'; $id = GETPOST('id', 'int'); $_GET['optioncss']="print"; -include_once 'class/cashcontrol.class.php'; $cashcontrol= new CashControl($db); $cashcontrol->fetch($id); @@ -243,12 +243,25 @@ if ($resql) print "
"; - $cash=$cash+$cashcontrol->opening; + $cash = $cash + $cashcontrol->opening; print "

"; - print $langs->trans("Cash").": ".price($cash)."

"; - print $langs->trans("PaymentTypeCB").": ".price($bank)."

"; - print $langs->trans("PaymentTypeCHQ").": ".price($cheque)."

"; - if ($other) print $langs->trans("Other").": ".price($other)."

"; + print $langs->trans("Cash").": ".price($cash); + if ($cash != $object->cash) { + print ' <> '.$langs->trans("Declared").': '.price($cashcontrol->cash).''; + } + print "

"; + print '
'; + print $langs->trans("PaymentTypeCHQ").": ".price($cheque); + if ($cash != $object->cheque) { + print ' <> '.$langs->trans("Declared").': '.price($cashcontrol->cheque).''; + } + print "

"; + print '
'; + print $langs->trans("PaymentTypeCB").": ".price($bank); + print "

"; + if ($other) { + print '
'.$langs->trans("Other").": ".price($other)."

"; + } print "

"; //save totals to DB diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index c78fe06693b..a3d73b627b7 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1712,8 +1712,8 @@ class FormFile if (count($filearray) == 0) { print ''; - if (empty($textifempty)) print $langs->trans("NoFileFound"); - else print $textifempty; + if (empty($textifempty)) print ''.$langs->trans("NoFileFound").''; + else print ''.$textifempty.''; print ''; } print ""; From 923e315daef17669d0f388a29f7290c6e8d5f642 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Jan 2020 15:59:36 +0100 Subject: [PATCH 04/10] Debug cashfence feature --- htdocs/compta/cashcontrol/report.php | 75 +++++++++++++++++++--------- 1 file changed, 52 insertions(+), 23 deletions(-) diff --git a/htdocs/compta/cashcontrol/report.php b/htdocs/compta/cashcontrol/report.php index 26023d47701..e8aea86681c 100644 --- a/htdocs/compta/cashcontrol/report.php +++ b/htdocs/compta/cashcontrol/report.php @@ -35,6 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php'; +$langs->load("bills"); + $id = GETPOST('id', 'int'); $_GET['optioncss']="print"; @@ -50,7 +52,8 @@ $arrayfields=array( 'b.dateo'=>array('label'=>$langs->trans("DateOperationShort"), 'checked'=>1), 'b.num_chq'=>array('label'=>$langs->trans("Number"), 'checked'=>1), 'ba.ref'=>array('label'=>$langs->trans("BankAccount"), 'checked'=>1), - 'b.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1, 'position'=>600), + 'cp.code'=>array('label'=>$langs->trans("PaymentMode"), 'checked'=>1), + 'b.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1, 'position'=>600), 'b.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1, 'position'=>605), ); @@ -128,7 +131,6 @@ if ($resql) $invoicetmp = new Facture($db); - print "

"; print $langs->trans("InitialBankBalance").' - '.$langs->trans("Cash")." : ".price($cashcontrol->opening); print "

"; @@ -136,13 +138,16 @@ if ($resql) print '
'; print ''."\n"; + $param = ''; + // Fields title print ''; print_liste_field_titre($arrayfields['b.rowid']['label'], $_SERVER['PHP_SELF'], 'b.rowid', '', $param, '', $sortfield, $sortorder); - print_liste_field_titre($arrayfields['b.dateo']['label'], $_SERVER['PHP_SELF'], 'b.dateo', '', $param, 'class="left"', $sortfield, $sortorder); - print_liste_field_titre($arrayfields['ba.ref']['label'], $_SERVER['PHP_SELF'], 'ba.ref', '', $param, 'class="right"', $sortfield, $sortorder); - print_liste_field_titre($arrayfields['b.debit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, 'class="right"', $sortfield, $sortorder); - print_liste_field_titre($arrayfields['b.credit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, 'class="right"', $sortfield, $sortorder); + print_liste_field_titre($arrayfields['b.dateo']['label'], $_SERVER['PHP_SELF'], 'b.dateo', '', $param, '"', $sortfield, $sortorder, 'center '); + print_liste_field_titre($arrayfields['ba.ref']['label'], $_SERVER['PHP_SELF'], 'ba.ref', '', $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre($arrayfields['cp.code']['label'], $_SERVER['PHP_SELF'], 'cp.code', '', $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre($arrayfields['b.debit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre($arrayfields['b.credit']['label'], $_SERVER['PHP_SELF'], 'b.amount', '', $param, '', $sortfield, $sortorder, 'right '); print "\n"; $posconciliatecol = 0; @@ -151,7 +156,9 @@ if ($resql) $sign = 1; $cash=$bank=$cheque=$other=0; - $totalarray=array(); + $totalarray = array(); + $cachebankaccount = array(); + $amountpertype = array(); while ($i < $num) { $objp = $db->fetch_object($resql); @@ -168,7 +175,9 @@ if ($resql) $bankaccount = $cachebankaccount[$objp->bankid]; } - /*if ($first == "yes") + $invoicetmp->fetch($objp->facid); + + /*if ($first == "yes") { print ''; print ''; @@ -181,12 +190,10 @@ if ($resql) // Ref print ''; if (! $i) $totalarray['nbfield']++; - // Date ope print '\n"; if (! $i) $totalarray['nbfield']++; - // Debit + // Type + print '\n"; + if (! $i) $totalarray['nbfield']++; + + // Debit print '\n"; if (! $i) $totalarray['nbfield']++; @@ -228,6 +247,7 @@ if ($resql) { print price($objp->amount); $totalarray['val']['totalcredfield'] += $objp->amount; + $amountpertype[$objp->code] -= $objp->amount; } print "\n"; if (! $i) $totalarray['nbfield']++; @@ -243,22 +263,31 @@ if ($resql) print "
'.$langs->trans("InitialBankBalance").' - '.$langs->trans("Cash").''; - $invoicetmp->fetch($objp->facid); print $invoicetmp->getNomUrl(1); print ''; print ''.dol_print_date($db->jdate($objp->do), "day").""; @@ -197,26 +204,38 @@ if ($resql) print ''; print $bankaccount->getNomUrl(1); if ($cashcontrol->posmodule=="takepos"){ - if ($conf->global->{'CASHDESK_ID_BANKACCOUNT_CASH'.$cashcontrol->posnumber}==$bankaccount->id) $cash+=$objp->amount; - elseif ($conf->global->{'CASHDESK_ID_BANKACCOUNT_CB'.$cashcontrol->posnumber}==$bankaccount->id) $bank+=$objp->amount; - elseif ($conf->global->{'CASHDESK_ID_BANKACCOUNT_CHEQUE'.$cashcontrol->posnumber}==$bankaccount->id) $cheque+=$objp->amount; - else $other+=$objp->amount; + $var1 = 'CASHDESK_ID_BANKACCOUNT_CASH'.$cashcontrol->posnumber; } else{ - if ($conf->global->CASHDESK_ID_BANKACCOUNT_CASH==$bankaccount->id) $cash+=$objp->amount; - elseif ($conf->global->CASHDESK_ID_BANKACCOUNT_CB==$bankaccount->id) $bank+=$objp->amount; - elseif ($conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE==$bankaccount->id) $cheque+=$objp->amount; - else $other+=$objp->amount; + $var1 = 'CASHDESK_ID_BANKACCOUNT_CASH'; + } + if ($objp->code == 'CHQ') { + $cheque += $objp->amount; + } elseif ($objp->code == 'CB') { + $bank += $objp->amount; + } else { + if ($conf->global->$var1 == $bankaccount->id) $cash += $objp->amount; + //elseif ($conf->global->$var2 == $bankaccount->id) $bank+=$objp->amount; + //elseif ($conf->global->$var3 == $bankaccount->id) $cheque+=$objp->amount; + else $other += $objp->amount; } print "'; + print $objp->code; + if (empty($amountpertype[$objp->code])) $amountpertype[$objp->code] = 0; + print "'; if ($objp->amount < 0) { print price($objp->amount * -1); $totalarray['val']['totaldebfield'] += $objp->amount; + $amountpertype[$objp->code] += $objp->amount; } print "
"; + //$cash = $amountpertype['LIQ'] + $cashcontrol->opening; $cash = $cash + $cashcontrol->opening; + print "

"; print $langs->trans("Cash").": ".price($cash); - if ($cash != $object->cash) { + if ($cash != $cashcontrol->cash) { print ' <> '.$langs->trans("Declared").': '.price($cashcontrol->cash).''; } print "

"; - print '
'; + + //print '
'; print $langs->trans("PaymentTypeCHQ").": ".price($cheque); - if ($cash != $object->cheque) { + if ($cheque != $cashcontrol->cheque) { print ' <> '.$langs->trans("Declared").': '.price($cashcontrol->cheque).''; } print "

"; - print '
'; + + //print '
'; print $langs->trans("PaymentTypeCB").": ".price($bank); + if ($bank != $cashcontrol->card) { + print ' <> '.$langs->trans("Declared").': '.price($cashcontrol->card).''; + } print "

"; + + // print '
'; if ($other) { print '
'.$langs->trans("Other").": ".price($other)."

"; } From 209ebfbe2f7ecefac26288434d5a875fe3f23ae1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Jan 2020 16:14:52 +0100 Subject: [PATCH 05/10] Fix trans --- htdocs/compta/cashcontrol/cashcontrol_card.php | 2 +- htdocs/compta/cashcontrol/class/cashcontrol.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index d98142a30b3..7958d107ec8 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -544,7 +544,7 @@ if (empty($action) || $action == "view") print $object->posmodule; print ""; - print ''.$langs->trans("CashDesk").' ID'; + print ''.$langs->trans("Terminal").''; print $object->posnumber; print ""; diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php index ad792db0826..32f7533b6c3 100644 --- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php +++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php @@ -59,7 +59,7 @@ class CashControl extends CommonObject 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>15), 'ref' =>array('type'=>'varchar(64)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>18), 'posmodule' =>array('type'=>'varchar(30)', 'label'=>'Module', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>19), - 'posnumber' =>array('type'=>'varchar(30)', 'label'=>'CashDesk', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>20), + 'posnumber' =>array('type'=>'varchar(30)', 'label'=>'Terminal', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>20, 'css'=>'center'), 'label' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>0, 'position'=>24), 'opening' =>array('type'=>'price', 'label'=>'Opening', 'enabled'=>1, 'visible'=>1, 'position'=>25), 'cash' =>array('type'=>'price', 'label'=>'Cash', 'enabled'=>1, 'visible'=>1, 'position'=>30), From de4183ea6552e917ac33f8416f784340966f2a8d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Jan 2020 17:30:46 +0100 Subject: [PATCH 06/10] Update logos --- htdocs/core/lib/security2.lib.php | 2 +- htdocs/langs/en_US/other.lang | 2 +- htdocs/main.inc.php | 2 +- htdocs/public/payment/newpayment.php | 61 +++++++++++------- htdocs/theme/common/dolibarr_logo_bw.png | Bin 791 -> 0 bytes .../{common => }/dolibarr_logo_256x256.png | Bin htdocs/theme/dolibarr_logo_bw.png | Bin 0 -> 646 bytes htdocs/theme/eldy/global.inc.php | 11 ++++ htdocs/theme/eldy/manifest.json.php | 2 +- 9 files changed, 51 insertions(+), 29 deletions(-) delete mode 100644 htdocs/theme/common/dolibarr_logo_bw.png rename htdocs/theme/{common => }/dolibarr_logo_256x256.png (100%) create mode 100644 htdocs/theme/dolibarr_logo_bw.png diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index c81ea9d98d7..26e97499482 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -283,7 +283,7 @@ if (! function_exists('dol_loginfunction')) // Set jquery theme $dol_loginmesg = (! empty($_SESSION["dol_loginmesg"])?$_SESSION["dol_loginmesg"]:''); - $favicon = DOL_URL_ROOT.'/theme/common/dolibarr_logo_256x256.png'; + $favicon = DOL_URL_ROOT.'/theme/dolibarr_logo_256x256.png'; if (! empty($mysoc->logo_squarred_mini)) $favicon = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL; diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 640199588ab..46424590f31 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -24,7 +24,7 @@ MessageOK=Message on the return page for a validated payment MessageKO=Message on the return page for a canceled payment ContentOfDirectoryIsNotEmpty=Content of this directory is not empty. DeleteAlsoContentRecursively=Check to delete all content recursively - +PoweredBy=Powered by YearOfInvoice=Year of invoice date PreviousYearOfInvoice=Previous year of invoice date NextYearOfInvoice=Following year of invoice date diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index c9def11e910..a6de7819237 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1224,7 +1224,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print ''."\n"; // Favicon - $favicon = DOL_URL_ROOT.'/theme/common/dolibarr_logo_256x256.png'; + $favicon = DOL_URL_ROOT.'/theme/dolibarr_logo_256x256.png'; if (!empty($mysoc->logo_squarred_mini)) $favicon = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); if (!empty($conf->global->MAIN_FAVICON_URL)) $favicon = $conf->global->MAIN_FAVICON_URL; if (empty($conf->dol_use_jmobile)) print ''."\n"; // Not required into an Android webview diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index c580fa2a6d3..80ed910ac70 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -717,7 +717,8 @@ if (!empty($conf->global->ONLINE_PAYMENT_CSS_URL)) $head = 'dol_hide_leftmenu) ? '
' : '').'
'; +llxHeader($head, $langs->trans("PaymentForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea); // Check link validity if ($source && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_ref', 'order_ref', ''))) @@ -753,27 +754,7 @@ print ''; print ''; print "\n"; -print ''."\n"; -print ''."\n"; -// Additionnal information for each payment system -if (!empty($conf->paypal->enabled)) -{ - print ''."\n"; - print ''."\n"; -} -if (!empty($conf->paybox->enabled)) -{ - print ''."\n"; -} -if (!empty($conf->stripe->enabled)) -{ - print ''."\n"; -} -print ''."\n"; -print ''."\n"; -print "\n"; -print ''."\n"; // Show logo (search order: logo defined by PAYMENT_LOGO_suffix, then PAYMENT_LOGO, then small company logo, large company logo, theme logo, common logo) $width = 0; @@ -803,13 +784,43 @@ elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$log // Output html code for logo if ($urllogo) { - print ''; - print ''; - print ''."\n"; + print '>'; + print ''; + if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { + print ''; + } + print ''; } + + + +print ''."\n"; +print ''."\n"; +// Additionnal information for each payment system +if (!empty($conf->paypal->enabled)) +{ + print ''."\n"; + print ''."\n"; +} +if (!empty($conf->paybox->enabled)) +{ + print ''."\n"; +} +if (!empty($conf->stripe->enabled)) +{ + print ''."\n"; +} +print ''."\n"; +print ''."\n"; +print "\n"; + +print '
'; + print '
'; + print '
'."\n"; + // Output introduction text $text = ''; if (!empty($conf->global->PAYMENT_NEWFORM_TEXT)) diff --git a/htdocs/theme/common/dolibarr_logo_bw.png b/htdocs/theme/common/dolibarr_logo_bw.png deleted file mode 100644 index 238a1899c00d9e74878a57a3efa53a1209315a24..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 791 zcmV+y1L*vTP)b2wb(kXB6erg z0EW2v#`*AKfyxMB!>sWElRY2!&P1(_ShX0i=TrrZB__8IgVVfcykYkIZN{{O-6Gau zw;i_`+kLoW9P+Fy>~>6>`Y>nB6$V{}{eH}~%~uUGru(T{sH25NM-0L3#qJgx{{)s# zcVYhwPNS&7Do+Wg@RVO_oGw+Wj4Y^(Xv2X@d3Nb&#Z1PvR~2StP9|q0Mnw{A)BWY* zTkO(}<<=$)RRvZg;o=N#v6o3rOS51Kj3nW5kP4H`x)@3gHj?lL+q|)PD3%yktbv9Tv7zEo1%i*ZXb2=_-*n9w+gkcS{=xXlZ@kzK;9(s5 zk=uLfb9(~}FFgE`<8kK?U%nLhrNnRCKb816j+f92jRy`h{$Ao=;q%LcFA0B+?+p{? z$(=%P2$PJx8HfH+Mi%&#mvpM|*9u?bPq2*qG~;7l(lOzmOZXChgNHP-z%ianf!FXg z{pKIj$O6M_nsu0Wi#cQcI6Z{Dj=!tN3hoc1JXQ?vO`dNb)7!rq`GH1x_}~6v`wK+| Vh4s`po4Wu2002ovPDHLkV1gedW?BFM diff --git a/htdocs/theme/common/dolibarr_logo_256x256.png b/htdocs/theme/dolibarr_logo_256x256.png similarity index 100% rename from htdocs/theme/common/dolibarr_logo_256x256.png rename to htdocs/theme/dolibarr_logo_256x256.png diff --git a/htdocs/theme/dolibarr_logo_bw.png b/htdocs/theme/dolibarr_logo_bw.png new file mode 100644 index 0000000000000000000000000000000000000000..50b1608847c3d5d0001b4e9334610b49ef41cf16 GIT binary patch literal 646 zcmV;10(t$3P)o7!U;rhDLhx0005`Nkl@nynh(h+!fv(uMfkQcQwoLgw5{jP0earlD{#-F2^CTUNIEzFyyM(LpiB|Rn0RW{Kzea zTopSg*Py|Wt6~e~5&?!>6;DvEAYBf=f)yJm7Z^BKTQQFdjd42g_R+~MEHKP?ImfBU gGlRx{;eYu20@~ literal 0 HcmV?d00001 diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 4b731808d2e..fb63a6d5a3b 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3663,6 +3663,17 @@ table.table-fiche-title { margin-bottom: 5px; } + +div.backgreypublicpayment { background-color: #f0f0f0; padding: 20px; border-bottom: 1px solid #ddd; } +.backgreypublicpayment a { color: #222 !important; } +.poweredbypublicpayment { + float: right; + top: 20px; + right: 20px; + position: absolute; + font-size: 0.8em; + color: #222; +} #dolpaymenttable { min-width: 320px; font-size: 16px; } /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */ #tablepublicpayment { border: 1px solid #CCCCCC !important; width: 100%; padding: 20px; } #tablepublicpayment .CTableRow1 { background-color: #F0F0F0 !important; } diff --git a/htdocs/theme/eldy/manifest.json.php b/htdocs/theme/eldy/manifest.json.php index 889b406ab3f..545f39b7896 100644 --- a/htdocs/theme/eldy/manifest.json.php +++ b/htdocs/theme/eldy/manifest.json.php @@ -46,7 +46,7 @@ if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_AP "name": "", "icons": [ { - "src": "", + "src": "", "sizes": "256x256", "type": "image/png" } From 5d7fa5575996e387c028377d6ee96e677c1180c1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Jan 2020 17:48:24 +0100 Subject: [PATCH 07/10] css --- htdocs/public/payment/newpayment.php | 2 +- htdocs/theme/eldy/global.inc.php | 5 +++-- htdocs/theme/eldy/theme_vars.inc.php | 2 +- htdocs/theme/md/style.css.php | 14 ++++++++++++++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 80ed910ac70..2e160139dec 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -791,7 +791,7 @@ if ($urllogo) print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print ''; + print ''; } print ''; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index fb63a6d5a3b..e2414e8ad85 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3668,11 +3668,12 @@ div.backgreypublicpayment { background-color: #f0f0f0; padding: 20px; border-bot .backgreypublicpayment a { color: #222 !important; } .poweredbypublicpayment { float: right; - top: 20px; - right: 20px; + top: 8px; + right: 8px; position: absolute; font-size: 0.8em; color: #222; + opacity: 0.3; } #dolpaymenttable { min-width: 320px; font-size: 16px; } /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */ #tablepublicpayment { border: 1px solid #CCCCCC !important; width: 100%; padding: 20px; } diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php index 2f8b7ac08e4..ccaac4471a9 100644 --- a/htdocs/theme/eldy/theme_vars.inc.php +++ b/htdocs/theme/eldy/theme_vars.inc.php @@ -53,7 +53,7 @@ $theme_bgcolor = array(hexdec('F4'), hexdec('F4'), hexdec('F4')); $theme_bgcoloronglet = array(hexdec('DE'), hexdec('E7'), hexdec('EC')); // Colors -$colorbackhmenu1 = '60,70,100'; // topmenu +$colorbackhmenu1 = '68,68,90'; // topmenu $colorbackvmenu1 = '250,250,250'; // vmenu $colortopbordertitle1 = '200,200,200'; // top border of title $colorbacktitle1 = '233,234,237'; // title of tables,list diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 98a6af8259f..b20982ccb67 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3780,6 +3780,20 @@ table.table-fiche-title .col-title div.titre{ line-height: 40px; } +div.backgreypublicpayment { background-color: #f0f0f0; padding: 20px; border-bottom: 1px solid #ddd; } +.backgreypublicpayment a { color: #222 !important; } +.poweredbypublicpayment { + float: right; + top: 8px; + right: 8px; + position: absolute; + font-size: 0.8em; + color: #222; + opacity: 0.3; +} +span.buttonpaymentsmall { + text-shadow: none; +} #dolpaymenttable { min-width: 320px; font-size: 16px; } /* Width must have min to make stripe input area visible. Lower than 320 makes input area crazy for credit card that need zip code */ #tablepublicpayment { border: 1px solid #CCCCCC !important; width: 100%; padding: 20px; } #tablepublicpayment .CTableRow1 { background-color: #F0F0F0 !important; } From 3a7c0b63f198de4ffe223c5db80e4aa4ae4f5dd6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Jan 2020 17:56:41 +0100 Subject: [PATCH 08/10] css --- htdocs/theme/eldy/dropdown.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/dropdown.inc.php b/htdocs/theme/eldy/dropdown.inc.php index 1258418b3ff..fb8856d4687 100644 --- a/htdocs/theme/eldy/dropdown.inc.php +++ b/htdocs/theme/eldy/dropdown.inc.php @@ -100,7 +100,7 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> } .side-nav-vert .user-menu .dropdown-menu > .user-header { - min-height: 175px; + min-height: 100px; padding: 10px; text-align: center; white-space: normal; From d5f2a793c0ad6ad41f87990ed64bd4ac5da057ca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Jan 2020 19:36:17 +0100 Subject: [PATCH 09/10] CSS --- htdocs/theme/eldy/info-box.inc.php | 2 +- htdocs/theme/md/info-box.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index 2ceaa70911a..268f1885327 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -153,7 +153,7 @@ a.info-box-text{ text-decoration: none;} include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $prefix=''; -$prefix = 'background-'; +//$prefix = 'background-'; if (! empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) $prefix = 'background-'; if (! isset($conf->global->THEME_AGRESSIVENESS_RATIO) && $prefix) $conf->global->THEME_AGRESSIVENESS_RATIO=-50; diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index 8effe7d62d6..fb011e63e69 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -98,7 +98,7 @@ a.info-box-text{ text-decoration: none;} -/* ICONS */ +/* ICONS INFO BOX */ .info-box-icon { color: #000 !important; } From 8f3f34e1c0e4eaaa4a3c77f30c0d69297b9eed6b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Jan 2020 20:11:07 +0100 Subject: [PATCH 10/10] Fix css --- htdocs/core/lib/functions.lib.php | 2 +- htdocs/theme/eldy/global.inc.php | 3 +++ htdocs/theme/md/style.css.php | 5 +++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index c5e4dfb0d6d..2e86e88460d 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1140,7 +1140,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab { $limittitle = 30; $out .= ''; - if ($picto) $out .= img_picto($title, ($pictoisfullpath ? '' : 'object_').$picto, '', $pictoisfullpath).' '; + if ($picto) $out .= img_picto($title, ($pictoisfullpath ? '' : 'object_').$picto, '', $pictoisfullpath, 0, 0, '', 'imgTabTitle').' '; $out .= ''.dol_trunc($title, $limittitle).''; $out .= ''; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index e2414e8ad85..bc00125301e 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2462,6 +2462,9 @@ a.tabTitle { text-decoration: none; white-space: nowrap; } +.imgTabTitle { + max-height: 14px; +} a.tabunactive { color: rgb() !important; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index b20982ccb67..0806cb47d1e 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2637,8 +2637,6 @@ div.popuptab { } a.tabTitle { -/* background: #657090; - color: white;*/ color:rgba(0,0,0,.5); margin-: 10px; text-shadow:1px 1px 1px #ffffff; @@ -2649,6 +2647,9 @@ a.tabTitle { text-decoration: none; white-space: nowrap; } +.imgTabTitle { + max-height: 14px; +} a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { font-family: ;