diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 251d0dcbfc6..6c498d30867 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1522,6 +1522,10 @@ if ($id) $key=$langs->trans("PaymentType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "PaymentType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); } + elseif ($fieldlist[$field]=='type' && $tabname[$id]==MAIN_DB_PREFIX.'c_paiement') { + $payment_type_list = array(0=>$langs->trans('PaymentTypeCustomer'), 1=>$langs->trans('PaymentTypeSupplier'), 2=>$langs->trans('PaymentTypeBoth')); + $valuetoshow = $payment_type_list[$valuetoshow]; + } elseif ($fieldlist[$field]=='label' && $tabname[$id]==MAIN_DB_PREFIX.'c_input_reason') { $key=$langs->trans("DemandReasonType".strtoupper($obj->code)); $valuetoshow=($obj->code && $key != "DemandReasonType".strtoupper($obj->code)?$key:$obj->{$fieldlist[$field]}); @@ -1888,6 +1892,13 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print $type.''; print ''; } + elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX.'c_paiement') + { + print ''; + $select_list = array(0=>$langs->trans('PaymentTypeCustomer'), 1=>$langs->trans('PaymentTypeSupplier'), 2=>$langs->trans('PaymentTypeBoth')); + print $form->selectarray($fieldlist[$field], $select_list, (! empty($obj->{$fieldlist[$field]})?$obj->{$fieldlist[$field]}:'2')); + print ''; + } elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'type_cdr' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') { if ($fieldlist[$field] == 'type_cdr') print ''; else print ''; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 57032a8eae2..09d3351fb4d 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2136,6 +2136,8 @@ class Facture extends CommonInvoice if ($this->paye != 1) { $this->db->begin(); + + $now=dol_now(); dol_syslog(get_class($this)."::set_paid rowid=".$this->id, LOG_DEBUG); @@ -2144,6 +2146,8 @@ class Facture extends CommonInvoice if (! $close_code) $sql.= ', paye=1'; if ($close_code) $sql.= ", close_code='".$this->db->escape($close_code)."'"; if ($close_note) $sql.= ", close_note='".$this->db->escape($close_note)."'"; + $sql.= ', fk_user_closing = '.$user->id; + $sql.= ", date_closing = '".$this->db->idate($now)."'"; $sql.= ' WHERE rowid = '.$this->id; $resql = $this->db->query($sql); @@ -2195,7 +2199,9 @@ class Facture extends CommonInvoice $this->db->begin(); $sql = 'UPDATE '.MAIN_DB_PREFIX.'facture'; - $sql.= ' SET paye=0, fk_statut='.self::STATUS_VALIDATED.', close_code=null, close_note=null'; + $sql.= ' SET paye=0, fk_statut='.self::STATUS_VALIDATED.', close_code=null, close_note=null,'; + $sql.= ' date_closing=null,'; + $sql.= ' fk_user_closing=null'; $sql.= ' WHERE rowid = '.$this->id; dol_syslog(get_class($this)."::set_unpaid", LOG_DEBUG); @@ -3521,7 +3527,8 @@ class Facture extends CommonInvoice public function info($id) { $sql = 'SELECT c.rowid, datec, date_valid as datev, tms as datem,'; - $sql.= ' fk_user_author, fk_user_valid'; + $sql.= ' date_closing as dateclosing,'; + $sql.= ' fk_user_author, fk_user_valid, fk_user_closing'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture as c'; $sql.= ' WHERE c.rowid = '.$id; @@ -3536,7 +3543,7 @@ class Facture extends CommonInvoice { $cuser = new User($this->db); $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; + $this->user_creation = $cuser; } if ($obj->fk_user_valid) { @@ -3544,9 +3551,17 @@ class Facture extends CommonInvoice $vuser->fetch($obj->fk_user_valid); $this->user_validation = $vuser; } + if ($obj->fk_user_closing) + { + $cluser = new User($this->db); + $cluser->fetch($obj->fk_user_closing); + $this->user_closing = $cluser; + } + $this->date_creation = $this->db->jdate($obj->datec); $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); // Should be in log table + $this->date_validation = $this->db->jdate($obj->datev); + $this->date_closing = $this->db->jdate($obj->dateclosing); } $this->db->free($result); } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 0fe0d00832b..c11d5796109 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -181,6 +181,7 @@ $arrayfields=array( 'rtp'=>array('label'=>"Rest", 'checked'=>0), 'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), 'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), + 'f.date_closing'=>array('label'=>"DateClosing", 'checked'=>0, 'position'=>500), 'f.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), ); @@ -382,7 +383,7 @@ $sql.= ' f.rowid as id, f.ref, f.ref_client, f.type, f.note_private, f.note_publ $sql.= ' f.localtax1 as total_localtax1, f.localtax2 as total_localtax2,'; $sql.= ' f.datef as df, f.date_lim_reglement as datelimite,'; $sql.= ' f.paye as paye, f.fk_statut,'; -$sql.= ' f.datec as date_creation, f.tms as date_update,'; +$sql.= ' f.datec as date_creation, f.tms as date_update, f.date_closing as date_closing,'; if($conf->global->INVOICE_USE_SITUATION && $conf->global->INVOICE_USE_SITUATION_RETAINED_WARRANTY) { $sql.= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final,f.situation_cycle_ref,f.situation_counter,'; @@ -497,7 +498,7 @@ if (! $sall) $sql.= ' f.localtax1, f.localtax2,'; $sql.= ' f.datef, f.date_lim_reglement,'; $sql.= ' f.paye, f.fk_statut,'; - $sql.= ' f.datec, f.tms,'; + $sql.= ' f.datec, f.tms, f.date_closing,'; $sql.= ' s.rowid, s.nom, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur,'; $sql.= ' typent.code,'; $sql.= ' state.code_departement, state.nom,'; @@ -866,6 +867,12 @@ if ($resql) print ''; print ''; } + if (! empty($arrayfields['f.date_closing']['checked'])) + { + print ''; + print ''; + } + // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -932,6 +939,7 @@ if ($resql) print $hookmanager->resPrint; if (! empty($arrayfields['f.datec']['checked'])) print_liste_field_titre($arrayfields['f.datec']['label'], $_SERVER["PHP_SELF"], "f.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER["PHP_SELF"], "f.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); + if (! empty($arrayfields['f.date_closing']['checked'])) print_liste_field_titre($arrayfields['f.date_closing']['label'], $_SERVER["PHP_SELF"], "f.date_closing", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "f.fk_statut,f.paye,f.type,dynamount_payed", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); print "\n"; @@ -1262,6 +1270,14 @@ if ($resql) print ''; if (! $i) $totalarray['nbfield']++; } + // Date closing + if (! empty($arrayfields['f.date_closing']['checked'])) + { + print ''; + print dol_print_date($db->jdate($obj->date_closing), 'dayhour', 'tzuser'); + print ''; + if (! $i) $totalarray['nbfield']++; + } // Status if (! empty($arrayfields['f.fk_statut']['checked'])) { diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 5d8a9f8521a..fc110d4a396 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -267,6 +267,7 @@ $sql.= " state.code_departement, state.nom"; // Add fields from extrafields if (! empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : ''); +} // Add where from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListGroupBy', $parameters); // Note that $action and $object may have been modified by hook diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index 44445e7d5de..84defbfd163 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -334,6 +334,7 @@ class Ccountry // extends CommonObject return 1; } } + /** * Return a link to the object card (with optionaly the picto) * @@ -344,7 +345,7 @@ class Ccountry // extends CommonObject * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ - function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) + public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) { global $langs; return $langs->trans($this->label); diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index 80b06c56534..f7aae5eb5a6 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -93,7 +93,8 @@ ALTER TABLE llx_extrafields ADD COLUMN printable boolean DEFAULT FALSE; ALTER TABLE llx_facture ADD COLUMN retained_warranty real DEFAULT NULL after situation_final; ALTER TABLE llx_facture ADD COLUMN retained_warranty_date_limit date DEFAULT NULL after retained_warranty; ALTER TABLE llx_facture ADD COLUMN retained_warranty_fk_cond_reglement integer DEFAULT NULL after retained_warranty_date_limit; - +ALTER TABLE llx_facture ADD COLUMN date_closing datetime DEFAULT NULL after date_valid; +ALTER TABLE llx_facture ADD COLUMN fk_user_closing integer DEFAULT NULL after fk_user_valid; ALTER TABLE llx_c_shipment_mode ADD COLUMN entity integer DEFAULT 1 NOT NULL; @@ -226,6 +227,7 @@ INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, m INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('IN-REPUBLICDAY', 0, 117, '', 0, 1, 26, 1); INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('IN-GANDI', 0, 117, '', 0, 10, 2, 1); + create table llx_c_socialnetworks ( rowid integer AUTO_INCREMENT PRIMARY KEY, @@ -277,15 +279,18 @@ ALTER TABLE llx_societe ADD COLUMN socialnetworks text DEFAULT NULL AFTER email; ALTER TABLE llx_socpeople ADD COLUMN socialnetworks text DEFAULT NULL AFTER email; ALTER TABLE llx_user ADD COLUMN socialnetworks text DEFAULT NULL AFTER personal_email; +ALTER TABLE llx_product ADD COLUMN net_measure float; +ALTER TABLE llx_product ADD COLUMN net_measure_units tinyint; + create table llx_adherent_type_lang ( - rowid integer AUTO_INCREMENT PRIMARY KEY, - fk_type integer DEFAULT 0 NOT NULL, - lang varchar(5) DEFAULT 0 NOT NULL, - label varchar(255) NOT NULL, - description text, - email text, - import_key varchar(14) DEFAULT NULL + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_type integer DEFAULT 0 NOT NULL, + lang varchar(5) DEFAULT 0 NOT NULL, + label varchar(255) NOT NULL, + description text, + email text, + import_key varchar(14) DEFAULT NULL )ENGINE=innodb; create table llx_fichinter_rec diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index 2247010fe7a..3b49ef04010 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -41,6 +41,7 @@ create table llx_facture date_pointoftax date DEFAULT NULL, -- date point of tax (for GB) date_valid date, -- date validation tms timestamp, -- date creation/modification + date_closing datetime, -- date de cloture paye smallint DEFAULT 0 NOT NULL, amount double(24,8) DEFAULT 0 NOT NULL, remise_percent real DEFAULT 0, -- remise relative @@ -62,7 +63,8 @@ create table llx_facture fk_user_author integer, -- user making creation fk_user_modif integer, -- user making last change fk_user_valid integer, -- user validating - + fk_user_closing integer, -- user closing + module_source varchar(32), -- name of module when invoice generated by a dedicated module (POS, ...) pos_source varchar(32), -- name of POS station when invoice is generated by a POS module fk_fac_rec_source integer, -- facture rec source diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index 858c89e8d2e..e8e7bb1233c 100755 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -69,6 +69,8 @@ create table llx_product accountancy_code_sell_export varchar(32), -- Selling accountancy code for vat export accountancy_code_buy varchar(32), -- Buying accountancy code partnumber varchar(32), -- Part/Serial number. TODO To use it into screen if not a duplicate of barcode. + net_measure float DEFAULT NULL, + net_measure_units tinyint DEFAULT NULL, weight float DEFAULT NULL, weight_units tinyint DEFAULT NULL, length float DEFAULT NULL, diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index a4ab22d47c5..31b0634f579 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -438,5 +438,6 @@ PaymentTypeCustomer=Payment Type - Customer PaymentTermsCustomer=Payment Terms - Customer PaymentTypeSupplier=Payment Type - Vendor PaymentTermsSupplier=Payment Term - Vendor +PaymentTypeBoth=Payment Type - Customer and Vendor MulticurrencyUsed=Use Multicurrency -MulticurrencyCurrency=Currency \ No newline at end of file +MulticurrencyCurrency=Currency diff --git a/htdocs/langs/en_US/margins.lang b/htdocs/langs/en_US/margins.lang index d4545b8e75f..1d90f389e9b 100644 --- a/htdocs/langs/en_US/margins.lang +++ b/htdocs/langs/en_US/margins.lang @@ -36,7 +36,7 @@ CostPrice=Cost price UnitCharges=Unit charges Charges=Charges AgentContactType=Commercial agent contact type -AgentContactTypeDetails=Define what contact type (linked on invoices) will be used for margin report per sale representative +AgentContactTypeDetails=Define what contact type (linked on invoices) will be used for margin report per sale representative. Note that reading statistics on a sale representative as a contact is not reliable since in most cases the contact may not be defined explicitely on the invoices. rateMustBeNumeric=Rate must be a numeric value markRateShouldBeLesserThan100=Mark rate should be lower than 100 ShowMarginInfos=Show margin infos diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 75c0190ddcd..2d612f5808d 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1224,13 +1224,24 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print ''."\n"; // Favicon - $favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico', 1); + $favicon = DOL_MAIN_URL_ROOT . '/theme/'.$conf->theme.'/img/favicon.ico'; 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 //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; + // Mobile appli like icon + $manifest = DOL_MAIN_URL_ROOT . '/theme/'.$conf->theme.'/manifest.json.php'; + if(!empty($manifest)){ + print ''."\n"; + } + + if(!empty($conf->global->THEME_ELDY_TOPMENU_BACK1)) { + // TODO: use auto theme color switch + print '' . "\n"; + } + // Auto refresh page if (GETPOST('autorefresh', 'int') > 0) print ''; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 89631953595..1b46a656511 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -257,6 +257,8 @@ class Product extends CommonObject public $url; //! Unites de mesure + public $net_measure; + public $net_measure_units; public $weight; public $weight_units; public $length; @@ -806,6 +808,8 @@ class Product extends CommonObject $this->label = trim($this->label); $this->description = trim($this->description); $this->note = (isset($this->note) ? trim($this->note) : null); + $this->net_measure = price2num($this->net_measure); + $this->net_measure_units = trim($this->net_measure_units); $this->weight = price2num($this->weight); $this->weight_units = trim($this->weight_units); $this->length = price2num($this->length); @@ -952,6 +956,8 @@ class Product extends CommonObject $sql.= ", tobuy = " . (int) $this->status_buy; $sql.= ", tobatch = " . ((empty($this->status_batch) || $this->status_batch < 0) ? '0' : (int) $this->status_batch); $sql.= ", finished = " . ((! isset($this->finished) || $this->finished < 0) ? "null" : (int) $this->finished); + $sql.= ", net_measure = " . ($this->net_measure!='' ? "'".$this->db->escape($this->net_measure)."'" : 'null'); + $sql.= ", net_measure_units = " . ($this->net_measure_units!='' ? "'".$this->db->escape($this->net_measure_units)."'": 'null'); $sql.= ", weight = " . ($this->weight!='' ? "'".$this->db->escape($this->weight)."'" : 'null'); $sql.= ", weight_units = " . ($this->weight_units!='' ? "'".$this->db->escape($this->weight_units)."'": 'null'); $sql.= ", length = " . ($this->length!='' ? "'".$this->db->escape($this->length)."'" : 'null'); @@ -2044,7 +2050,7 @@ class Product extends CommonObject $sql = "SELECT rowid, ref, ref_ext, label, description, url, note as note_private, customcode, fk_country, price, price_ttc,"; $sql.= " price_min, price_min_ttc, price_base_type, cost_price, default_vat_code, tva_tx, recuperableonly as tva_npr, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, tosell,"; - $sql.= " tobuy, fk_product_type, duration, fk_default_warehouse, seuil_stock_alerte, canvas, weight, weight_units,"; + $sql.= " tobuy, fk_product_type, duration, fk_default_warehouse, seuil_stock_alerte, canvas, net_measure, net_measure_units, weight, weight_units,"; $sql.= " length, length_units, width, width_units, height, height_units,"; $sql.= " surface, surface_units, volume, volume_units, barcode, fk_barcode_type, finished,"; $sql.= " accountancy_code_buy, accountancy_code_sell, accountancy_code_sell_intra, accountancy_code_sell_export, stock, pmp,"; @@ -2108,6 +2114,8 @@ class Product extends CommonObject $this->duration_value = substr($obj->duration, 0, dol_strlen($obj->duration)-1); $this->duration_unit = substr($obj->duration, -1); $this->canvas = $obj->canvas; + $this->net_measure = $obj->net_measure; + $this->net_measure_units = $obj->net_measure_units; $this->weight = $obj->weight; $this->weight_units = $obj->weight_units; $this->length = $obj->length; @@ -3364,7 +3372,10 @@ class Product extends CommonObject if (!$user->rights->societe->client->voir && !$socid) { $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; } - $sql.= " WHERE c.rowid = d.fk_contrat"; + + $sql.= " WHERE c.entity IN (".getEntity('contract').")"; + $sql.= " AND c.rowid = d.fk_contrat"; + if ($this->id > 0) { $sql.= " AND d.fk_product =".$this->id; } else { @@ -3374,7 +3385,7 @@ class Product extends CommonObject $sql.= " AND p.rowid = d.fk_product AND p.fk_product_type =".$filteronproducttype; } $sql.= " AND c.fk_soc = s.rowid"; - $sql.= " AND c.entity IN (".getEntity('contract').")"; + if (!$user->rights->societe->client->voir && !$socid) { $sql.= " AND c.fk_soc = sc.fk_soc AND sc.fk_user = " .$user->id; } diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 0b0a598167b..00ef201aa9f 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -328,6 +328,7 @@ if (! empty($arrayfields['t.tobill']['checked']) || ! empty($arrayfields['t.bill // Add fields from extrafields if (! empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : ''); + } } $sql.= $db->order($sortfield, $sortorder); diff --git a/htdocs/theme/common/dolibarr_logo_256x256.png b/htdocs/theme/common/dolibarr_logo_256x256.png new file mode 100644 index 00000000000..970f841001b Binary files /dev/null and b/htdocs/theme/common/dolibarr_logo_256x256.png differ diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index dbbed3bc274..d900459e22f 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2063,16 +2063,16 @@ img.login, img.printer, img.entity { background-size: contain; } img.userphoto { /* size for user photo in lists */ - border-radius: 9px; - width: 18px; - height: 18px; + border-radius: 0.75em; + width: 1.5em; + height: 1.5em; background-size: contain; vertical-align: middle; } img.userphotosmall { /* size for user photo in lists */ - border-radius: 6px; - width: 1em; - height: 1em; + border-radius: 0.6em; + width: 1.2em; + height: 1.2em; background-size: contain; vertical-align: middle; background-color: #FFF; diff --git a/htdocs/theme/eldy/manifest.json.php b/htdocs/theme/eldy/manifest.json.php new file mode 100644 index 00000000000..72465fea2a3 --- /dev/null +++ b/htdocs/theme/eldy/manifest.json.php @@ -0,0 +1,57 @@ + + * Copyright (C) 2006 Rodolphe Quiedeville + * Copyright (C) 2007-2017 Regis Houssin + * Copyright (C) 2011 Philippe Grand + * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2018 Ferran Marcet + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FI8TNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/theme/eldy/manifest.json.php + * \brief File for The Web App + */ + +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url. +if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations +if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1); +if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); +if (! defined('NOLOGIN')) define('NOLOGIN', 1); // File must be accessed by logon page so without login +//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); // We need top menu content +if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1); +if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); + +require_once __DIR__.'/../../main.inc.php'; + +$appli=constant('DOL_APPLICATION_TITLE'); +if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE; + +?> +{ + "name": "", + "icons": [ + { + "src": "", + "sizes": "256x256", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} \ No newline at end of file diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 5960142dfc9..851829e89df 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2181,16 +2181,16 @@ img.login, img.printer, img.entity { background-color: #FFF; } img.userphoto { /* size for user photo in lists */ - border-radius: 9px; - width: 18px; - height: 18px; + border-radius: 0.75em; + width: 1.5em; + height: 1.5em; background-size: contain; vertical-align: middle; } img.userphotosmall { /* size for user photo in lists */ - border-radius: 6px; - width: 12px; - height: 12px; + border-radius: 0.6em; + width: 1.2em; + height: 1.2em; background-size: contain; vertical-align: middle; } diff --git a/test/phpunit/AllTests.php b/test/phpunit/AllTests.php index ccf8d205daa..09c075c1083 100644 --- a/test/phpunit/AllTests.php +++ b/test/phpunit/AllTests.php @@ -155,6 +155,9 @@ class AllTests require_once dirname(__FILE__).'/DiscountTest.php'; $suite->addTestSuite('DiscountTest'); + require_once dirname(__FILE__).'/BOMTest.php'; + $suite->addTestSuite('BOMTest'); + require_once dirname(__FILE__).'/ContratTest.php'; $suite->addTestSuite('ContratTest'); @@ -253,6 +256,9 @@ class AllTests $suite->addTestSuite('FormAdminTest'); + require_once dirname(__FILE__).'/PaypalTest.php'; + $suite->addTestSuite('PaypalTest'); + return $suite; } } diff --git a/test/phpunit/BankAccountTest.php b/test/phpunit/BankAccountTest.php index 33103f1059b..48e2a8ddb65 100644 --- a/test/phpunit/BankAccountTest.php +++ b/test/phpunit/BankAccountTest.php @@ -108,6 +108,7 @@ class BankAccountTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } + /** * End phpunit tests * diff --git a/test/phpunit/UtilsTest.php b/test/phpunit/UtilsTest.php index e98ef2e8a61..a1b9eafa45e 100644 --- a/test/phpunit/UtilsTest.php +++ b/test/phpunit/UtilsTest.php @@ -145,7 +145,7 @@ class UtilsTest extends PHPUnit\Framework\TestCase $this->assertEquals($result['error'], ''); //$this->assertEquals(preg_match('/phpunit/', $result['output']), 1); - print __METHOD__." result=".$result."\n"; + print __METHOD__." result=".$result['result']."\n"; return $result; } }