diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 91bf86e0249..2dc2acbcb6d 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -6,6 +6,7 @@ * Copyright (C) 2011 Fabrice CHERRIER * Copyright (C) 2013-2018 Philippe Grand * Copyright (C) 2015 Marcos García + * Copyright (C) 2018 Frédéric France * * 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 @@ -452,7 +453,7 @@ class pdf_strato extends ModelePDFContract else { $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0); - $this->_tab_signature($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, $outputlangs); + $this->tabSignature($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, $outputlangs); $bottomlasttab=$this->page_hauteur - $heightforfooter - $heightforfooter + 1; } @@ -545,7 +546,16 @@ class pdf_strato extends ModelePDFContract $this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height+3); // Rect prend une longueur en 3eme param et 4eme param } - function _tab_signature(&$pdf, $tab_top, $tab_height, $outputlangs) { + /** + * Show footer signature of page + * @param PDF $pdf Object PDF + * @param int $tab_top tab height position + * @param int $tab_height tab height + * @param Translate $outputlangs Object language for output + * @return void + */ + private function tabSignature(&$pdf, $tab_top, $tab_height, $outputlangs) + { $pdf->SetDrawColor(128,128,128); $posmiddle = $this->marge_gauche + round(($this->page_largeur - $this->marge_gauche - $this->marge_droite)/2); $posy = $tab_top + $tab_height + 3 + 3; diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 7e0d84e1026..4d7cc056f12 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -451,6 +451,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition } catch(OdfException $e) { + dol_syslog($e->getMessage(), LOG_INFO); } } } diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 1902473a0cd..44f8555bea7 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -96,7 +96,7 @@ class EmailCollector extends CommonObject 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1, 'help'=>'Example: My Email collector'), 'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>60, 'notnull'=>-1), 'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>100, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com'), - 'user' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myacount@gmail.com'), + 'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myacount@gmail.com'), 'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>1, 'comment'=>"IMAP password"), 'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>103, 'notnull'=>1, 'default' => 'Inbox', 'help'=>'Example: INBOX'), //'filter' => array('type'=>'text', 'label'=>'Filter', 'visible'=>1, 'enabled'=>1, 'position'=>105), @@ -161,7 +161,7 @@ class EmailCollector extends CommonObject public $host; - public $user; + public $login; public $password; public $source_directory; public $target_directory; @@ -829,7 +829,7 @@ class EmailCollector extends CommonObject $this->error=$langs->trans('ErrorFieldRequired', 'EMailHost'); return -1; } - if (empty($this->user)) + if (empty($this->login)) { $this->error=$langs->trans('ErrorFieldRequired', 'Login'); return -1; @@ -855,7 +855,7 @@ class EmailCollector extends CommonObject $connectstringsource = $connectstringserver.imap_utf7_encode($sourcedir); $connectstringtarget = $connectstringserver.imap_utf7_encode($targetdir); - $connection = imap_open($connectstringsource, $this->user, $this->password); + $connection = imap_open($connectstringsource, $this->login, $this->password); if (! $connection) { $this->error = 'Failed to open IMAP connection '.$connectstringsource; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 795c63be3df..080f22f6a61 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -2022,7 +2022,8 @@ class FactureFournisseur extends CommonInvoice * Statut validee ou abandonnee pour raison autre + non payee + aucun paiement + pas deja remplacee * * @param int $socid Id societe - * @return array Tableau des factures ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) + * @return array|int Tableau des factures ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) + * <0 if error */ function list_replacable_supplier_invoices($socid=0) { @@ -2050,9 +2051,11 @@ class FactureFournisseur extends CommonInvoice { while ($obj=$this->db->fetch_object($resql)) { - $return[$obj->rowid]=array( 'id' => $obj->rowid, - 'ref' => $obj->ref, - 'status' => $obj->fk_statut); + $return[$obj->rowid]=array( + 'id' => $obj->rowid, + 'ref' => $obj->ref, + 'status' => $obj->fk_statut + ); } //print_r($return); return $return; @@ -2071,7 +2074,8 @@ class FactureFournisseur extends CommonInvoice * (validee + paiement en cours) ou classee (payee completement ou payee partiellement) + pas deja remplacee + pas deja avoir * * @param int $socid Id societe - * @return array Tableau des factures ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>) + * @return array|int Tableau des factures ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>) + * <0 if error */ function list_qualified_avoir_supplier_invoices($socid=0) { diff --git a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql index c3e886df914..20b0a874879 100644 --- a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql +++ b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql @@ -159,7 +159,7 @@ CREATE TABLE llx_emailcollector_emailcollector( label varchar(255), description text, host varchar(255), - user varchar(128), + login varchar(128), password varchar(128), source_directory varchar(255) NOT NULL, target_directory varchar(255), diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql index 750c2b24e84..0f81df401dc 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql @@ -22,7 +22,7 @@ CREATE TABLE llx_emailcollector_emailcollector( label varchar(255), description text, host varchar(255), - user varchar(128), + login varchar(128), password varchar(128), source_directory varchar(255) NOT NULL, target_directory varchar(255), diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 4849a81a80e..58601201fbe 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -55,7 +55,7 @@ if (GETPOST('action','alpha') == 'set') $res = dolibarr_set_const($db,"CASHDESK_ID_WAREHOUSE",(GETPOST('CASHDESK_ID_WAREHOUSE','alpha') > 0 ? GETPOST('CASHDESK_ID_WAREHOUSE','alpha') : ''),'chaine',0,'',$conf->entity); $res = dolibarr_set_const($db,"CASHDESK_NO_DECREASE_STOCK",GETPOST('CASHDESK_NO_DECREASE_STOCK','alpha'),'chaine',0,'',$conf->entity); $res = dolibarr_set_const($db,"CASHDESK_SERVICES", GETPOST('CASHDESK_SERVICES','alpha'),'chaine',0,'',$conf->entity); - $res = dolibarr_set_const($db,"TAKEBOX", GETPOST('TAKEBOX','alpha'),'chaine',0,'',$conf->entity); + $res = dolibarr_set_const($db,"TAKEPOSCONNECTOR", GETPOST('TAKEPOSCONNECTOR','alpha'),'chaine',0,'',$conf->entity); $res = dolibarr_set_const($db,"TAKEPOS_BAR_RESTAURANT", GETPOST('TAKEPOS_BAR_RESTAURANT','alpha'),'chaine',0,'',$conf->entity); $res = dolibarr_set_const($db,"TAKEPOS_PRINT_SERVER", GETPOST('TAKEPOS_PRINT_SERVER','alpha'),'chaine',0,'',$conf->entity); $res = dolibarr_set_const($db,"TAKEPOS_ORDER_PRINTERS", GETPOST('TAKEPOS_ORDER_PRINTERS','alpha'),'chaine',0,'',$conf->entity); @@ -172,10 +172,10 @@ if (! empty($conf->service->enabled)) print ''; print $langs->trans("DolibarrReceiptPrinter").' ('.$langs->trans("TakeposConnectorNecesary").')'; print ''; -print $form->selectyesno("TAKEBOX",$conf->global->TAKEBOX,1); +print $form->selectyesno("TAKEPOSCONNECTOR",$conf->global->TAKEPOSCONNECTOR,1); print "\n"; -if ($conf->global->TAKEBOX){ +if ($conf->global->TAKEPOSCONNECTOR){ print ''; print $langs->trans("IPAddress").' ('.$langs->trans("TakeposConnectorNecesary").')'; print ''; @@ -190,7 +190,7 @@ print ''; print $form->selectyesno("TAKEPOS_BAR_RESTAURANT",$conf->global->TAKEPOS_BAR_RESTAURANT,1); print "\n"; -if ($conf->global->TAKEPOS_BAR_RESTAURANT and $conf->global->TAKEBOX){ +if ($conf->global->TAKEPOS_BAR_RESTAURANT and $conf->global->TAKEPOSCONNECTOR){ print ''; print $langs->trans("OrderPrinters").' ('.$langs->trans("Setup").')'; print ''; diff --git a/htdocs/takepos/floors.php b/htdocs/takepos/floors.php index 8dd6f729950..325e806af30 100644 --- a/htdocs/takepos/floors.php +++ b/htdocs/takepos/floors.php @@ -29,6 +29,8 @@ $_GET['theme']="md"; // Force theme. MD theme provides better look and feel to T require '../main.inc.php'; // Load $user and permissions +$langs->loadLangs(array("bills","orders","commercial","cashdesk")); + $floor=GETPOST('floor','alpha'); if ($floor=="") $floor=1; $id = GETPOST('id','int'); diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index d79b957e1a3..52d4864385f 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -151,7 +151,7 @@ if ($action=="updatereduction"){ $invoice->fetch($placeid); } -if ($action=="order"){ +if ($action=="order" and $placeid!=0){ require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; $headerorder='
'.$langs->trans('Place').' '.$place.'
'; $footerorder='
'.$langs->trans("Label").''.$langs->trans("Qty").'
'.dol_print_date(dol_now(), 'dayhour').'
'; @@ -281,7 +281,7 @@ print ': '.price($invoice->total_ttc, 1, '', 1, - 1, - 1, $conf->currency).'&nbs //} if ($action=="valid"){ print '

'.$invoice->facnumber." ".$langs->trans('BillShortStatusValidated').'

'; - if ($conf->global->TAKEBOX) print '
'; + if ($conf->global->TAKEPOSCONNECTOR) print '
'; else print '
'; } if ($action=="search"){ diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index e6c519e460a..e47ce27009d 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -101,11 +101,11 @@ $langs->loadLangs(array("main", "bills", "cashdesk")); - + - + @@ -114,7 +114,7 @@ $langs->loadLangs(array("main", "bills", "cashdesk")); - + diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index c84f283d9f2..44da2914fe8 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -355,7 +355,7 @@ if($conf->global->TAKEPOS_BAR_RESTAURANT){ 'action'=>'TakeposPrintingOrder();'); } } -if ($conf->global->TAKEBOX){ +if ($conf->global->TAKEPOSCONNECTOR){ $menus[$r++]=array('title'=>$langs->trans("DOL_OPEN_DRAWER"), 'action'=>'OpenDrawer();'); }