diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php index f17638a9966..1d890ab580f 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -182,7 +182,7 @@ if ($result > 0) if (empty($dn)) { $langs->load("errors"); - print ''.$langs->trans("ErrorModuleSetupNotComplete").''; + print ''.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Member")).''; } else { diff --git a/htdocs/cashdesk/index_verif.php b/htdocs/cashdesk/index_verif.php index 05117f5e7cb..bb0e037bf7d 100644 --- a/htdocs/cashdesk/index_verif.php +++ b/htdocs/cashdesk/index_verif.php @@ -79,16 +79,6 @@ if (! empty($conf->stock->enabled) && empty($conf->global->CASHDESK_NO_DECREASE_ } -/* -if (! empty($_POST['txtUsername']) && ! empty($conf->banque->enabled) && (empty($conf_fkaccount_cash) && empty($conf_fkaccount_cheque) && empty($conf_fkaccount_cb))) -{ - $langs->load("errors"); - $retour=$langs->trans("ErrorModuleSetupNotComplete"); - header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid); - exit; -} -*/ - // Check password $auth = new Auth($db); $retour = $auth->verif($username, $password); diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index 8da535f20f3..4230227717e 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -165,7 +165,7 @@ $langs->loadLangs(array("main","bills","cashdesk")); if (empty($_SESSION['CASHDESK_ID_BANKACCOUNT_CASH']) || $_SESSION['CASHDESK_ID_BANKACCOUNT_CASH'] < 0) { $langs->load("errors"); - print ''; + print 'transnoentitiesnoconv("CashDesk"))).'" />'; } else print ''; print ''; @@ -173,7 +173,7 @@ $langs->loadLangs(array("main","bills","cashdesk")); if (empty($_SESSION['CASHDESK_ID_BANKACCOUNT_CB']) || $_SESSION['CASHDESK_ID_BANKACCOUNT_CB'] < 0) { $langs->load("errors"); - print ''; + print 'transnoentitiesnoconv("CashDesk"))).'" />'; } else print ''; print ''; @@ -181,7 +181,7 @@ $langs->loadLangs(array("main","bills","cashdesk")); if (empty($_SESSION['CASHDESK_ID_BANKACCOUNT_CHEQUE']) || $_SESSION['CASHDESK_ID_BANKACCOUNT_CHEQUE'] < 0) { $langs->load("errors"); - print ''; + print 'transnoentitiesnoconv("CashDesk")).'" />'; } else print ''; print ''; diff --git a/htdocs/collab/index.php b/htdocs/collab/index.php index b0f1f5253c2..429e5398c5a 100644 --- a/htdocs/collab/index.php +++ b/htdocs/collab/index.php @@ -168,287 +168,8 @@ if ($action != 'preview' && $action != 'editcontent') $style=' margin-bottom: 5p //var_dump($objectpage);exit; print '
'; -if (count($object->records) > 0) -{ - // ***** Part for web sites - - print '
'; - print $langs->trans("WebSite").': '; - print '
'; - - // List of websites - print '
'; - $out=''; - $out.=''; - $out.=ajax_combobox('website'); - print $out; - print ''; - - if ($website) - { - $virtualurl=''; - $dataroot=DOL_DATA_ROOT.'/collab/'.$website; - if (! empty($object->virtualhost)) $virtualurl=$object->virtualhost; - } - - if ($website && $action == 'preview') - { - $disabled=''; - if (empty($user->rights->websites->write)) $disabled=' disabled="disabled"'; - - print '   '; - - //print ''; - print ''; - print ''; - print ''; - } - - print '
'; - - // Button for websites - print '
'; - - if ($action == 'preview') - { - print '
'; - print ''; - //print ''; - $htmltext=$langs->trans("SetHereVirtualHost", $dataroot); - print $form->textwithpicto('', $htmltext); - print '
'; - - $urlext=$virtualurl; - $urlint=$urlwithroot.'/public/collab/index.php?website='.$website; - //if (! empty($object->virtualhost)) - //{ - print 'transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $dataroot, $urlext)).'">'; - print $form->textwithpicto('', $langs->trans("PreviewSiteServedByWebServer", $langs->transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $dataroot, $urlext?$urlext:$langs->trans("VirtualHostUrlNotDefined")), 1, 'preview_ext'); - print ''; - //} - - print 'transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $urlint)).'">'; - print $form->textwithpicto('', $langs->trans("PreviewSiteServedByDolibarr", $langs->transnoentitiesnoconv("Site"), $langs->transnoentitiesnoconv("Site"), $urlint, $dataroot), 1, 'preview'); - print ''; - } - - if (in_array($action, array('editcss','editmenu','create'))) - { - if ($action != 'preview') print ''; - if (preg_match('/^create/', $action)) print ''; - if (preg_match('/^edit/', $action)) print ''; - } - - print '
'; - // ***** Part for pages - - if ($website) - { - print '
'; - - $array=$objectpage->fetchAll($object->id); - if (! is_array($array) && $array < 0) dol_print_error('', $objectpage->error, $objectpage->errors); - $atleastonepage=(is_array($array) && count($array) > 0); - - print '
'; - print '
'; - print $langs->trans("Page").': '; - print '
'; - print '
'; - - if ($action != 'add') - { - $out=''; - $out.=''; - $out.=ajax_combobox('pageid'); - print $out; - } - else - { - print $langs->trans("New"); - } - - print ''; - //print $form->selectarray('page', $array); - - if ($action == 'preview') - { - $disabled=''; - if (empty($user->rights->websites->write)) $disabled=' disabled="disabled"'; - - if ($pageid > 0) - { - print '   '; - - if ($object->fk_default_home > 0 && $pageid == $object->fk_default_home) print ''; - else print ''; - print ''; - print ''; - //print ''.dol_escape_htmltag($langs->trans("EditPageMeta")).''; - //print ''.dol_escape_htmltag($langs->trans("EditPageContent")).''; - print ''; - } - } - - print '
'; - print '
'; - print '
'; - - print '
'; - - if ($website && $pageid > 0 && $action == 'preview') - { - $websitepage = new WebSitePage($db); - $websitepage->fetch($pageid); - - $realpage=$urlwithroot.'/public/collab/index.php?website='.$website.'&page='.$pageid; - $pagealias = $websitepage->pageurl; - - print '
'; - print ''; - //print ''; - $htmltext=$langs->trans("WEBSITE_PAGENAME", $pagealias); - print $form->textwithpicto('', $htmltext); - print '
'; - - if (! empty($object->virtualhost)) - { - $urlext=$virtualurl.'/'.$pagealias.'.php'; - print 'transnoentitiesnoconv("Page"), $langs->transnoentitiesnoconv("Page"), $dataroot, $urlext)).'">'; - print $form->textwithpicto('', $langs->trans("PreviewSiteServedByWebServer", $langs->transnoentitiesnoconv("Page"), $langs->transnoentitiesnoconv("Page"), $dataroot, $urlext?$urlext:$langs->trans("VirtualHostUrlNotDefined")), 1, 'preview_ext'); - print ''; - } - else - { - print ''; - print $form->textwithpicto('', $langs->trans("PreviewSiteServedByWebServer", $langs->transnoentitiesnoconv("Page"), $langs->transnoentitiesnoconv("Page"), $dataroot, $urlext?$urlext:$langs->trans("VirtualHostUrlNotDefined")), 1, 'preview_ext'); - print ''; - } - - print 'transnoentitiesnoconv("Page"), $langs->transnoentitiesnoconv("Page"), $realpage)).'">'; - print $form->textwithpicto('', $langs->trans("PreviewSiteServedByDolibarr", $langs->transnoentitiesnoconv("Page"), $langs->transnoentitiesnoconv("Page"), $realpage, $dataroot), 1, 'preview'); - print ''; // View page in new Tab - //print ''; - - // TODO Add js to save alias like we save virtual host name and use dynamic virtual host for url of id=previewpageext - } - if (! in_array($action, array('editcss','editmenu','create'))) - { - if ($action != 'preview') print ''; - if (preg_match('/^create/', $action)) print ''; - if (preg_match('/^edit/', $action)) print ''; - } - - print '
'; - - if ($action == 'preview') - { - // Adding jquery code to change on the fly url of preview ext - if (! empty($conf->use_javascript_ajax)) - { - print ''; - } - } - } -} -else -{ - print '
'; - $langs->load("errors"); - print $langs->trans("ErrorModuleSetupNotComplete"); - print '
'; - $action=''; -} - - -print '
'; - -$head = array(); - -if ($action == 'editcontent') -{ - /* - * Editing global variables not related to a specific theme - */ - - $csscontent = @file_get_contents($filecss); - - $contentforedit = ''; - /*$contentforedit.=''."\n";*/ - $contentforedit .= $objectpage->content; - - require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor=new DolEditor('PAGE_CONTENT', $contentforedit, '', 500, 'Full', '', true, true, true, ROWS_5, '90%'); - $doleditor->Create(0, '', false); -} print "
\n\n"; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index a9746ca6f65..7a24fad83af 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -3506,7 +3506,7 @@ class Propal extends CommonObject else { $langs->load("errors"); - print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete"); + print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Proposal")); return ""; } } diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 6bb47f12a12..0fd061ac7ed 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -2591,7 +2591,7 @@ if ($action == 'create' && $user->rights->commande->creer) } } else { $langs->load("errors"); - print '
' . $langs->trans('CreateShipment') . '
'; + print '
transnoentitiesnoconv("Shipment"))) . '">' . $langs->trans('CreateShipment') . '
'; } } } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index a8b75341ed3..13bc74bc6f1 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -3452,7 +3452,7 @@ class Facture extends CommonInvoice else { $langs->load("errors"); - print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete"); + print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Invoice")); return ""; } } diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index d9a912ea50b..26e3f2792d6 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -489,7 +489,7 @@ class RemiseCheque extends CommonObject else { $langs->load("errors"); - print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete"); + print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Bank")); return ""; } } diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index a3c79d23602..614782c519b 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -1141,7 +1141,7 @@ class Paiement extends CommonObject else { $langs->load("errors"); - print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete"); + print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Invoice")); return ""; } } diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index d0c69fbe61b..ddbec62e413 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -78,7 +78,7 @@ if (empty($reshook)) // $conf->global->PRELEVEMENT_CODE_BANQUE and $conf->global->PRELEVEMENT_CODE_GUICHET should be empty $bprev = new BonPrelevement($db); $executiondate = dol_mktime(0, 0, 0, GETPOST('remonth'), (GETPOST('reday')+$conf->global->PRELEVEMENT_ADDDAYS), GETPOST('reyear')); - + $result = $bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET, $mode, $format, $executiondate); if ($result < 0) { @@ -116,7 +116,7 @@ llxHeader('', $langs->trans("NewStandingOrder")); if (prelevement_check_config() < 0) { $langs->load("errors"); - setEventMessages($langs->trans("ErrorModuleSetupNotComplete"), null, 'errors'); + setEventMessages($langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Withdraw")), null, 'errors'); } /*$h=0; diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index 4e2c4e2d3a5..1be716f8f61 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -58,7 +58,7 @@ llxHeader('', $langs->trans("CustomersStandingOrdersArea")); if (prelevement_check_config() < 0) { $langs->load("errors"); - setEventMessages($langs->trans("ErrorModuleSetupNotComplete"), null, 'errors'); + setEventMessages($langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Withdraw")), null, 'errors'); } print load_fiche_titre($langs->trans("CustomersStandingOrdersArea")); diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 147d31311d3..e81febde6df 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -245,7 +245,7 @@ class Contrat extends CommonObject else { $langs->load("errors"); - print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete"); + print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Contract")); return ""; } } diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 45ad69f6c64..b48fef9759a 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -701,7 +701,7 @@ class PaiementFourn extends Paiement else { $langs->load("errors"); - print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete"); + print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Supplier")); return ""; } } diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 8e4d42559a8..4c8e761da9a 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -90,7 +90,7 @@ ErrorSpecialCharNotAllowedForField=Special characters are not allowed for field ErrorNumRefModel=A reference exists into database (%s) and is not compatible with this numbering rule. Remove record or renamed reference to activate this module. ErrorQtyTooLowForThisSupplier=Quantity too low for this vendor or no price defined on this product for this vendor ErrorOrdersNotCreatedQtyTooLow=Some orders haven't been created because of too-low quantities -ErrorModuleSetupNotComplete=Setup of module looks to be uncomplete. Go on Home - Setup - Modules to complete. +ErrorModuleSetupNotComplete=Setup of module %s looks to be uncomplete. Go on Home - Setup - Modules to complete. ErrorBadMask=Error on mask ErrorBadMaskFailedToLocatePosOfSequence=Error, mask without sequence number ErrorBadMaskBadRazMonth=Error, bad reset value diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index 1cf435379cd..a223f936638 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -90,7 +90,7 @@ ErrorSpecialCharNotAllowedForField=Les caractères spéciaux ne sont pas admis p ErrorNumRefModel=Une référence existe en base (%s) et est incompatible avec cette numérotation. Supprimez la ligne ou renommez la référence pour activer ce module. ErrorQtyTooLowForThisSupplier=Quantité insuffisante pour ce fournisseur ou aucun tarif défini sur ce produit pour ce fournisseur ErrorOrdersNotCreatedQtyTooLow=Certaines commandes n'ont pas été créées en raison de quantités trop faibles -ErrorModuleSetupNotComplete=La configuration des modules semble incomplète. Aller sur la page Accueil - Configuration - Modules pour corriger. +ErrorModuleSetupNotComplete=La configuration du module '%s' semble incomplète. Aller sur la page Accueil - Configuration - Modules pour corriger. ErrorBadMask=Erreur sur le masque ErrorBadMaskFailedToLocatePosOfSequence=Erreur, masque sans numéro de séquence ErrorBadMaskBadRazMonth=Erreur, mauvais valeur de remise à zéro diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 0a967cb10a7..a9e712c92db 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1928,7 +1928,8 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment // JS Code for Stripe if (empty($stripearrayofkeys['publishable_key'])) { - print info_admin($langs->trans("ErrorModuleSetupNotComplete", "stripe"), 0, 0, 'error'); + $langs->load("errors"); + print info_admin($langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Stripe")), 0, 0, 'error'); } else { diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index c9275293bb2..964812a05a3 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -224,21 +224,25 @@ $object = new Societe($db); * Actions */ -if ($action=="change") +if ($action=="change") // Change customer for TakePOS { $idcustomer = GETPOST('idcustomer', 'int'); $place = (GETPOST('place', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant - $sql="UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".$idcustomer." where ref='(PROV-POS-".$place.")'"; + // @TODO Check if draft invoice already exists, if not create it or return a warning to ask to enter at least one line to have it created automatically + $sql="UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".$idcustomer." where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'"; $resql = $db->query($sql); - ?> - - + + load("errors"); - print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete"); + print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("SupplierProposal")); return ""; } } diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php index b952285747b..0a91e303a53 100644 --- a/htdocs/takepos/admin/terminal.php +++ b/htdocs/takepos/admin/terminal.php @@ -125,8 +125,8 @@ print ''; print ''.$langs->trans("Parameters").''.$langs->trans("Value").''; print "\n"; -print ''.$langs->trans("CashDeskThirdPartyForSell").''; -print ''; +print ''.$langs->trans("CashDeskThirdPartyForSell").''; +print ''; print $form->select_company($conf->global->{'CASHDESK_ID_THIRDPARTY'.$terminaltouse}, 'socid', '(s.client IN (1, 3) AND s.status = 1)', 1, 0, 0, array(), 0); print ''; @@ -134,23 +134,26 @@ $atleastonefound = 0; if (! empty($conf->banque->enabled)) { print ''.$langs->trans("CashDeskBankAccountForSell").''; - print ''; + print ''; $form->select_comptes($conf->global->{'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse}, 'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse, 0, "courant=2", 1); + if (! empty($conf->global->{'CASHDESK_ID_BANKACCOUNT_CASH'.$terminaltouse})) $atleastonefound++; print ''; print ''.$langs->trans("CashDeskBankAccountForCheque").''; - print ''; + print ''; $form->select_comptes($conf->global->{'CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminaltouse}, 'CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminaltouse, 0, "courant=1", 1); + if (! empty($conf->global->{'CASHDESK_ID_BANKACCOUNT_CHEQUE'.$terminaltouse})) $atleastonefound++; print ''; print ''.$langs->trans("CashDeskBankAccountForCB").''; - print ''; + print ''; $form->select_comptes($conf->global->{'CASHDESK_ID_BANKACCOUNT_CB'.$terminaltouse}, 'CASHDESK_ID_BANKACCOUNT_CB'.$terminaltouse, 0, "courant=1", 1); + if (! empty($conf->global->{'CASHDESK_ID_BANKACCOUNT_CB'.$terminaltouse})) $atleastonefound++; print ''; foreach($paiements as $modep) { - if (in_array($modep->code, array('LIQ', 'CB', 'CHQ'))) continue; + if (in_array($modep->code, array('LIQ', 'CB', 'CHQ'))) continue; // Already managed before $name="CASHDESK_ID_BANKACCOUNT_".$modep->code.$terminaltouse; print ''.$langs->trans("CashDeskBankAccountFor").' '.$langs->trans($modep->libelle).''; - print ''; + print ''; if (! empty($conf->global->$name)) $atleastonefound++; $cour=preg_match('/^LIQ.*/', $modep->code)?2:1; $form->select_comptes($conf->global->$name, $name, 0, "courant=".$cour, 1); @@ -162,7 +165,7 @@ if (! empty($conf->stock->enabled)) { print ''.$langs->trans("CashDeskDoNotDecreaseStock").''; // Force warehouse (this is not a default value) - print ''; + print ''; if (empty($conf->productbatch->enabled)) { print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK'.$terminal, $conf->global->{'CASHDESK_NO_DECREASE_STOCK'.$terminal}, 1); } @@ -180,7 +183,7 @@ if (! empty($conf->stock->enabled)) print ''.$langs->trans("CashDeskIdWareHouse").''; // Force warehouse (this is not a default value) - print ''; + print ''; if (! $disabled) { print $formproduct->selectWarehouses($conf->global->{'CASHDESK_ID_WAREHOUSE'.$terminal}, 'CASHDESK_ID_WAREHOUSE'.$terminal, '', 1, $disabled); @@ -195,7 +198,7 @@ if (! empty($conf->stock->enabled)) print ''; -if (empty($atleastonefound) && ! empty($conf->banque->enabled)) +if ($atleastonefound == 0 && ! empty($conf->banque->enabled)) { print info_admin($langs->trans("AtLeastOneDefaultBankAccountMandatory"), 0, 0, 'error'); } diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 79c7eee3d56..e09c31664cd 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -42,7 +42,7 @@ $langs->loadLangs(array("bills", "cashdesk")); $id = GETPOST('id', 'int'); $action = GETPOST('action', 'alpha'); $idproduct = GETPOST('idproduct', 'int'); -$place = (GETPOST('place', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant +$place = (GETPOST('place', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Bar or Restaurant /** * Abort invoice creationg with a given error message @@ -184,9 +184,21 @@ if (($action=="addline" || $action=="freezone") && $placeid == 0) $invoice->module_source = 'takepos'; $invoice->pos_source = $_SESSION["takeposterminal"]; - $placeid = $invoice->create($user); - $sql="UPDATE ".MAIN_DB_PREFIX."facture set ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")' where rowid=".$placeid; - $db->query($sql); + if ($invoice->socid <= 0) + { + $langs->load('errors'); + dol_htmloutput_errors($langs->trans("ErrorModuleSetupNotComplete", "TakePos"), null, 1); + } + else + { + $placeid = $invoice->create($user); + if ($placeid < 0) + { + dol_htmloutput_errors($invoice->error, $invoice->errors, 1); + } + $sql="UPDATE ".MAIN_DB_PREFIX."facture set ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")' where rowid=".$placeid; + $db->query($sql); + } } if ($action == "addline") diff --git a/htdocs/takepos/takepos.php b/htdocs/takepos/takepos.php index 702bb082714..dba42a105ae 100644 --- a/htdocs/takepos/takepos.php +++ b/htdocs/takepos/takepos.php @@ -352,7 +352,7 @@ function deleteline() { } function Customer() { - console.log("Open box to select the thirdparty"); + console.log("Open box to select the thirdparty place="+place); $.colorbox({href:"../societe/list.php?contextpage=poslist&nomassaction=1&place="+place, width:"90%", height:"80%", transition:"none", iframe:"true", title:"trans("Customer");?>"}); } @@ -619,7 +619,7 @@ $sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement"; $sql.= " WHERE entity IN (".getEntity('c_paiement').")"; $sql.= " AND active = 1"; $sql.= " ORDER BY libelle"; -print $sql; + $resql = $db->query($sql); $paiementsModes = array(); if ($resql){ @@ -634,7 +634,8 @@ if ($resql){ } } if (empty($paiementsModes)) { - setEventMessages($langs->trans("ErrorModuleSetupNotComplete"), null, 'errors'); + $langs->load('errors'); + setEventMessages($langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("TakePOS")), null, 'errors'); } if (count($maincategories)==0) { setEventMessages($langs->trans("TakeposNeedsCategories"), null, 'errors'); diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 46e42c351c7..2ad328b5a88 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -120,7 +120,7 @@ if ($id > 0) if (empty($conf->global->CLICKTODIAL_URL) && empty($object->clicktodial_url)) { $langs->load("errors"); - print ''.$langs->trans("ErrorModuleSetupNotComplete").''; + print ''.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("ClickToDial")).''; } else { @@ -161,7 +161,7 @@ if ($id > 0) if (empty($url)) { $langs->load("errors"); - print ''.$langs->trans("ErrorModuleSetupNotComplete").''; + print ''.$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("ClickToDial")).''; } else {