From 865fb59f95dba41fa3ec4c819fb3ae6447be515f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Oct 2024 22:45:51 +0200 Subject: [PATCH 01/17] CSS --- htdocs/hrm/evaluation_card.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/hrm/evaluation_card.php b/htdocs/hrm/evaluation_card.php index 75746483858f1..14daf73f21186 100644 --- a/htdocs/hrm/evaluation_card.php +++ b/htdocs/hrm/evaluation_card.php @@ -605,11 +605,11 @@ $sk->fetch($t->skill_id); print ''; - print ' ' . Skill::typeCodeToLabel($t->skill_type) . ''; - print ' ' . $sk->getNomUrl(1) . ''; - print ' ' . $t->description . ''; - print ' ' . $t->userRankForSkill . ''; - print ' ' . $t->required_rank . ''; + print ' ' . dolPrintHTML(Skill::typeCodeToLabel($t->skill_type)) . ''; + print ' ' . $sk->getNomUrl(1) . ''; + print ' ' . dolPrintHTML($t->description) . ''; + print ' ' . $t->userRankForSkill . ''; + print ' ' . $t->required_rank . ''; print ' ' . $t->result . ''; print ''; } From dd680a85fd6118fee7b84f23dcc3bec9162ce71a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 18 Oct 2024 23:14:31 +0200 Subject: [PATCH 02/17] Fix delete project when mrp module never enabled --- htdocs/projet/class/project.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 99e27f816ce2b..375e75df425f1 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1014,7 +1014,7 @@ public function delete($user, $notrigger = 0) 'fichinter' => 'fk_projet', 'don' => array('field' => 'fk_projet', 'module' => 'don'), 'actioncomm' => 'fk_project', - 'mrp_mo' => 'fk_project', + 'mrp_mo' => array('field' => 'fk_project', 'module' => 'mrp'), 'entrepot' => 'fk_project', ); foreach ($listoftables as $key => $value) { From cc02bff277e105ce100b243980a21849b1d10d7d Mon Sep 17 00:00:00 2001 From: Florian Mortgat <50440633+atm-florianm@users.noreply.github.com> Date: Sat, 19 Oct 2024 01:02:21 +0200 Subject: [PATCH 03/17] NEW 21.0 - tab on recurring invoice card to see the list of generated invoices (#31463) * NEW 21.0 - tab on recurring invoice card to see the list of invoices generated from this recurring invoice (customer and supplier invoices) * tab on recurring invoice card: missing url param in $param * tab on recurring invoice card: stronger typing for phpstan compliance * tab on recurring invoice card: wrong typing in phpdoc of supplier_invoice_rec_prepare_head --- htdocs/compta/facture/list.php | 15 +++++++++++++++ htdocs/core/lib/invoice.lib.php | 12 +++++++++++- htdocs/fourn/facture/list.php | 16 ++++++++++++++++ htdocs/langs/en_US/bills.lang | 1 + 4 files changed, 43 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 0f528b32b1a83..7c13b8a44fbd4 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -148,6 +148,7 @@ $search_categ_cus = GETPOST("search_categ_cus", 'intcomma'); $search_product_category = GETPOST('search_product_category', 'intcomma'); $search_fac_rec_source_title = GETPOST("search_fac_rec_source_title", 'alpha'); +$search_fk_fac_rec_source = GETPOST('search_fk_fac_rec_source', 'int'); $search_option = GETPOST('search_option'); if ($search_option == 'late') { @@ -871,6 +872,9 @@ if (!empty($search_fac_rec_source_title)) { $sql .= natural_search('facrec.titre', $search_fac_rec_source_title); } +if ($search_fk_fac_rec_source) { + $sql .= ' AND f.fk_fac_rec_source = ' . (int) $search_fk_fac_rec_source; +} // Search on user if ($search_user > 0) { $sql .= " AND EXISTS ("; @@ -1015,6 +1019,14 @@ llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'bodyforlist'); +if ($search_fk_fac_rec_source) { + $object = new FactureRec($db); + $object->id = (int) $search_fk_fac_rec_source; + $head = invoice_rec_prepare_head($object); + print dol_get_fiche_head($head, 'generated', $langs->trans('InvoicesGeneratedFromRec'), -1, 'bill'); // Add a div +} + + $param = '&socid='.urlencode((string) ($socid)); if (!empty($mode)) { $param .= '&mode='.urlencode($mode); @@ -1196,6 +1208,9 @@ if (!empty($search_fac_rec_source_title)) { $param .= '&search_fac_rec_source_title='.urlencode($search_fac_rec_source_title); } +if ($search_fk_fac_rec_source) { + $param .= '&search_fk_fac_rec_source=' . (int) $search_fk_fac_rec_source; +} // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; diff --git a/htdocs/core/lib/invoice.lib.php b/htdocs/core/lib/invoice.lib.php index 24dc64a36a884..ef3ef705cb44d 100644 --- a/htdocs/core/lib/invoice.lib.php +++ b/htdocs/core/lib/invoice.lib.php @@ -262,6 +262,11 @@ function invoice_rec_prepare_head($object) $head[$h][2] = 'card'; $h++; + $head[$h][0] = DOL_URL_ROOT . '/compta/facture/list.php?search_fk_fac_rec_source=' . $object->id; + $head[$h][1] = $langs->trans('InvoicesGeneratedFromRec'); + $head[$h][2] = 'generated'; + $h++; + $head[$h][0] = DOL_URL_ROOT.'/compta/facture/agenda-rec.php?id='.$object->id; $head[$h][1] = $langs->trans("Events"); if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) { @@ -310,7 +315,7 @@ function invoice_rec_prepare_head($object) /** * Return array head with list of tabs to view object information. * - * @param Facture $object Invoice object + * @param FactureFournisseurRec $object Invoice object * @return array Array of tabs to show */ function supplier_invoice_rec_prepare_head($object) @@ -325,6 +330,11 @@ function supplier_invoice_rec_prepare_head($object) $head[$h][2] = 'card'; $h++; + $head[$h][0] = DOL_URL_ROOT . '/fourn/facture/list.php?search_fk_fac_rec_source=' . $object->id; + $head[$h][1] = $langs->trans('InvoicesGeneratedFromRec'); + $head[$h][2] = 'generated'; + $h++; + // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 99d1636f84174..48734fde2184c 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -106,6 +106,7 @@ $search_datelimit_end = dol_mktime(23, 59, 59, $search_datelimit_endmonth, $search_datelimit_endday, $search_datelimit_endyear); $search_categ_sup = GETPOST("search_categ_sup", 'intcomma'); $search_product_category = GETPOST('search_product_category', 'intcomma'); +$search_fk_fac_rec_source = GETPOST('search_fk_fac_rec_source', 'int'); $option = GETPOST('search_option'); if ($option == 'late') { @@ -645,6 +646,9 @@ if ($search_label) { $sql .= natural_search('f.libelle', $search_label); } +if ($search_fk_fac_rec_source) { + $sql .= " AND f.fk_fac_rec_source = ".(int) $search_fk_fac_rec_source; +} // Search on sale representative if ($search_sale && $search_sale != '-1') { if ($search_sale == -2) { @@ -817,6 +821,15 @@ llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'bodyforlist mod-fourn-facture page-list'); +if ($search_fk_fac_rec_source) { + require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture-rec.class.php'; + require_once DOL_DOCUMENT_ROOT . '/core/lib/invoice.lib.php'; + $object = new FactureFournisseurRec($db); + $object->id = (int) $search_fk_fac_rec_source; + $head = supplier_invoice_rec_prepare_head($object); + print dol_get_fiche_head($head, 'generated', $langs->trans('InvoicesGeneratedFromRec'), -1, 'bill'); // Add a div +} + if ($socid) { $soc = new Societe($db); $soc->fetch($socid); @@ -949,6 +962,9 @@ if ($search_type_thirdparty != '' && $search_type_thirdparty > 0) { $param .= '&search_type_thirdparty='.$search_type_thirdparty; } +if ($search_fk_fac_rec_source) { + $param .= '&search_fk_fac_rec_source=' . (int) $search_fk_fac_rec_source; +} // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 337a7fa49b8fe..a8e7cd2e5f6b3 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -169,6 +169,7 @@ BillTo=To ShippingTo=Shipping to ActionsOnBill=Actions on invoice ActionsOnBillRec=Actions on recurring invoice +InvoicesGeneratedFromRec=Generated invoices RecurringInvoiceTemplate=Template / Recurring invoice NoQualifiedRecurringInvoiceTemplateFound=No recurring template invoice qualified for generation. FoundXQualifiedRecurringInvoiceTemplate=%s recurring template invoice(s) qualified for generation. From 3b172d90205f00fd1a4dab1f607db00595cf3d48 Mon Sep 17 00:00:00 2001 From: Norbert Penel Date: Sat, 19 Oct 2024 01:04:45 +0200 Subject: [PATCH 04/17] Update functions.lib.php (#31461) Help for developers who doesn't understand the changes in getElementProperties --- htdocs/core/lib/functions.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 4dd7669e5499a..f51d74db42507 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -13301,6 +13301,7 @@ function fetchObjectByElement($element_id, $element_type, $element_ref = '', $us return $objecttmp; // returned an object without fetch } } else { + dol_syslog($element_prop['classname'].' doesn not exists in '.'/'.$element_prop['classpath'].'/'.$element_prop['classfile'].'.class.php'); return -1; } } From 5ca499057958d398662107659d6fad00bd570eae Mon Sep 17 00:00:00 2001 From: jyhere Date: Sat, 19 Oct 2024 01:11:22 +0200 Subject: [PATCH 05/17] FIX : Shippable tooltip virtual stock may be wrong (#31458) Bug since the dawn of time in the order list Shippable column ! :) --- htdocs/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 5cb172ba9e5bd..c2fc44797dc72 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -2748,7 +2748,7 @@ $productstat_cachevirtual[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_theorique; } else { $generic_product->stock_reel = $productstat_cache[$generic_commande->lines[$lig]->fk_product]['stock_reel']; - $generic_product->stock_theorique = $productstat_cachevirtual[$generic_commande->lines[$lig]->fk_product]['stock_reel'] = $generic_product->stock_theorique; + $generic_product->stock_theorique = $productstat_cachevirtual[$generic_commande->lines[$lig]->fk_product]['stock_reel']; } if ($reliquat > $generic_product->stock_reel) { From 03fa5617da3263ad2a060e790120f433f310576e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 19 Oct 2024 01:14:20 +0200 Subject: [PATCH 06/17] move trigger into line class (#31457) * move trigger into line class * move trigger into line class * fix --- .../expensereport/class/expensereport.class.php | 11 +---------- .../class/expensereportline.class.php | 16 +++++++++++----- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 8511cdba691f3..3941e22a3b0a7 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -2314,20 +2314,11 @@ public function updateline($rowid, $type_fees_id, $projet_id, $vatrate, $comment $this->applyOffset(); $this->checkRules(); - $result = $this->line->update($user); + $result = $this->line->update($user, $notrigger); if ($result < 0) { $error++; } - if (!$error && !$notrigger) { - // Call triggers - $result = $this->call_trigger('EXPENSE_REPORT_DET_MODIFY', $user); - if ($result < 0) { - $error++; - } - // End call triggers - } - if (!$error) { $this->db->commit(); return 1; diff --git a/htdocs/expensereport/class/expensereportline.class.php b/htdocs/expensereport/class/expensereportline.class.php index 7271de4098ad0..52f3ce8819085 100644 --- a/htdocs/expensereport/class/expensereportline.class.php +++ b/htdocs/expensereport/class/expensereportline.class.php @@ -373,7 +373,6 @@ public function insert($notrigger = 0, $fromaddline = false) if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'expensereport_det'); - if (!$error && !$notrigger) { // Call triggers $result = $this->call_trigger('EXPENSE_REPORT_DET_CREATE', $user); @@ -383,7 +382,6 @@ public function insert($notrigger = 0, $fromaddline = false) // End call triggers } - if (!$fromaddline) { $tmpparent = new ExpenseReport($this->db); $tmpparent->fetch($this->fk_expensereport); @@ -457,9 +455,10 @@ public function getExpAmount(ExpenseReportRule $rule, $fk_user, $mode = 'day') * Update line * * @param User $user User + * @param int $notrigger 1=No trigger * @return int Return integer <0 if KO, >0 if OK */ - public function update(User $user) + public function update(User $user, $notrigger = 0) { global $langs; @@ -530,6 +529,15 @@ public function update(User $user) dol_print_error($this->db); } + if (!$error && !$notrigger) { + // Call triggers + $result = $this->call_trigger('EXPENSE_REPORT_DET_MODIFY', $user); + if ($result < 0) { + $error++; + } + // End call triggers + } + if (!$error) { $this->db->commit(); return 1; @@ -540,6 +548,4 @@ public function update(User $user) return -2; } } - - // ajouter ici comput_ ... } From 7c94d086a107a82f2d73884f634db3d05093e375 Mon Sep 17 00:00:00 2001 From: Yoan Mollard Date: Sat, 19 Oct 2024 01:16:51 +0200 Subject: [PATCH 07/17] Allow to set ReplyTo header in e-mailings (#31454) --- htdocs/comm/mailing/card.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index cc46110e17c9d..e38175127886e 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -531,7 +531,7 @@ $trackid = 'emailing-test'; $upload_dir_tmp = $upload_dir; - $mailfile = new CMailFile($tmpsujet, $object->sendto, $object->email_from, $tmpbody, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $object->email_errorsto, $arr_css, $trackid, '', 'emailing', '', $upload_dir_tmp); + $mailfile = new CMailFile($tmpsujet, $object->sendto, $object->email_from, $tmpbody, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $object->email_errorsto, $arr_css, $trackid, '', 'emailing', $object->email_replyto, $upload_dir_tmp); $result = $mailfile->sendfile(); if ($result) { @@ -833,6 +833,8 @@ print ''.$langs->trans("MailErrorsTo").''; + print ''.$langs->trans("MailReply").''; + // Other attributes $parameters = array(); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook @@ -1377,6 +1379,7 @@ // To if ($object->messtype != 'sms') { print ''.$langs->trans("MailErrorsTo").''.dol_print_email($object->email_errorsto, 0, 0, 0, 0, 1).''; + print ''.$langs->trans("MailReply").''.dol_print_email($object->email_replyto, 0, 0, 0, 0, 1).''; } print ''; From 6b6fabea14131cb8fdd5fd3cbe99b9617c21d166 Mon Sep 17 00:00:00 2001 From: Joachim Kueter Date: Sat, 19 Oct 2024 01:18:55 +0200 Subject: [PATCH 08/17] fix: respect setting for VAT column (#31450) --- htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 03528085192cf..83426c107e5af 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -10,6 +10,7 @@ * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2024 MDW * Copyright (C) 2024 Nick Fragoulis + * Copyright (C) 2024 Joachim Kueter * * 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 @@ -1898,7 +1899,7 @@ public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hide 'border-left' => true, // add left line separator ); - if (!getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT')) { + if (!getDolGlobalInt('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT') && !getDolGlobalString('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN')) { $this->cols['vat']['status'] = true; } From 9643a274237b538806ed45e65ed396edcf6a930d Mon Sep 17 00:00:00 2001 From: Joachim Kueter Date: Sat, 19 Oct 2024 01:19:21 +0200 Subject: [PATCH 09/17] fix typo (#31449) --- htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php index 83426c107e5af..8b1fd6c7584c9 100644 --- a/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php @@ -1724,7 +1724,7 @@ protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $output $idaddressshipping = $object->getIdContact('external', 'SHIPPING'); if (!empty($idaddressshipping)) { - $contactshipping = $object->fetch_Contact($idaddressshipping[0]); + $contactshipping = $object->fetch_contact($idaddressshipping[0]); $companystatic = new Societe($this->db); $companystatic->fetch($object->contact->fk_soc); $carac_client_name_shipping = pdfBuildThirdpartyName($object->contact, $outputlangs); From 11c43e8c63f668b71008db0cb1b40d168455a5a7 Mon Sep 17 00:00:00 2001 From: MDW Date: Sat, 19 Oct 2024 01:21:41 +0200 Subject: [PATCH 10/17] Fix: ticket.class phan/phpstan notices (#31448) * Qual: Fix ticket.class notices * Do not analyze custom * Fix: Correct reference to cache (+phpdoc) * Update baseline, ignore everything in custom * Qual: Fix notices in files related to ticket class --- dev/tools/phan/baseline.txt | 45 ++++----- dev/tools/phan/config.php | 2 +- htdocs/core/lib/functions.lib.php | 6 +- htdocs/public/ticket/list.php | 11 ++- htdocs/ticket/card.php | 17 ++-- htdocs/ticket/class/api_tickets.class.php | 5 +- htdocs/ticket/class/ticket.class.php | 107 +++++++++++----------- htdocs/ticket/contact.php | 15 +-- 8 files changed, 104 insertions(+), 104 deletions(-) diff --git a/dev/tools/phan/baseline.txt b/dev/tools/phan/baseline.txt index 7d482dff305f5..aceda22aa52f1 100644 --- a/dev/tools/phan/baseline.txt +++ b/dev/tools/phan/baseline.txt @@ -9,25 +9,25 @@ */ return [ // # Issue statistics: - // PhanUndeclaredProperty : 800+ occurrences + // PhanUndeclaredProperty : 770+ occurrences // PhanPluginUnknownPropertyType : 710+ occurrences // PhanPossiblyUndeclaredGlobalVariable : 600+ occurrences - // PhanTypeMismatchArgumentProbablyReal : 410+ occurrences + // PhanTypeMismatchArgumentProbablyReal : 400+ occurrences // PhanUndeclaredGlobalVariable : 380+ occurrences - // PhanPluginUnknownArrayMethodReturnType : 310+ occurrences - // PhanPluginUnknownArrayMethodParamType : 260+ occurrences + // PhanPluginUnknownArrayMethodReturnType : 300+ occurrences + // PhanPluginUnknownArrayMethodParamType : 250+ occurrences // PhanPossiblyUndeclaredVariable : 200+ occurrences // PhanTypeMismatchProperty : 170+ occurrences // PhanPluginUnknownArrayFunctionParamType : 95+ occurrences // PhanTypeMismatchArgumentNullableInternal : 70+ occurrences // PhanPluginUndeclaredVariableIsset : 65+ occurrences - // PhanPluginUnknownArrayPropertyType : 60+ occurrences + // PhanPluginUnknownArrayPropertyType : 55+ occurrences // PhanPluginUnknownArrayFunctionReturnType : 50+ occurrences // PhanRedefineFunction : 50+ occurrences // PhanPluginEmptyStatementIf : 45+ occurrences - // PhanTypeMismatchDimFetch : 40+ occurrences - // PhanTypeExpectedObjectPropAccess : 25+ occurrences - // PhanTypeInvalidDimOffset : 25+ occurrences + // PhanTypeExpectedObjectPropAccess : 40+ occurrences + // PhanTypeInvalidDimOffset : 35+ occurrences + // PhanTypeMismatchDimFetch : 30+ occurrences // PhanPluginUnknownObjectMethodCall : 15+ occurrences // PhanTypeComparisonFromArray : 15+ occurrences // PhanUndeclaredConstant : 15+ occurrences @@ -52,8 +52,6 @@ return [ 'file_suppressions' => [ 'htdocs/accountancy/class/accountancycategory.class.php' => ['PhanPluginUnknownArrayPropertyType'], 'htdocs/accountancy/class/accountancyexport.class.php' => ['PhanUndeclaredProperty'], - 'htdocs/accountancy/class/accountingjournal.class.php' => ['PhanTypeInvalidDimOffset'], - 'htdocs/accountancy/journal/purchasesjournal.php' => ['PhanTypeInvalidDimOffset'], 'htdocs/adherents/list.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/admin/fckeditor.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/api/class/api_access.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'], @@ -210,7 +208,7 @@ return [ 'htdocs/compta/tva/index.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'], 'htdocs/compta/tva/payments.php' => ['PhanTypeMismatchArgumentNullableInternal'], 'htdocs/compta/tva/quadri_detail.php' => ['PhanTypeArraySuspiciousNull', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty'], - 'htdocs/contact/canvas/actions_contactcard_common.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach'], + 'htdocs/contact/canvas/actions_contactcard_common.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty'], 'htdocs/contact/card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/contact/class/contact.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'], 'htdocs/contact/consumption.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], @@ -360,19 +358,16 @@ return [ 'htdocs/core/modules/commande/doc/pdf_einstein.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/core/modules/commande/modules_commande.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/modules/contract/doc/pdf_strato.modules.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/delivery/doc/pdf_storm.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/delivery/doc/pdf_typhon.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/contract/doc/pdf_strato.modules.php' => ['PhanTypeMismatchArgumentNullableInternal'], + 'htdocs/core/modules/delivery/doc/pdf_storm.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/core/modules/delivery/doc/pdf_typhon.modules.php' => ['PhanPluginUnknownPropertyType'], 'htdocs/core/modules/delivery/mod_delivery_saphir.php' => ['PhanUndeclaredProperty'], - 'htdocs/core/modules/expedition/doc/pdf_espadon.modules.php' => ['PhanUndeclaredProperty'], - 'htdocs/core/modules/expedition/doc/pdf_merou.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/expedition/doc/pdf_rouget.modules.php' => ['PhanUndeclaredProperty'], + 'htdocs/core/modules/expedition/doc/pdf_merou.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/expensereport/doc/pdf_standard_expensereport.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/modules/facture/doc/pdf_crabe.modules.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/facture/doc/pdf_octopus.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/core/modules/facture/doc/pdf_sponge.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], 'htdocs/core/modules/facture/modules_facture.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php' => ['PhanUndeclaredProperty'], 'htdocs/core/modules/fichinter/mod_pacific.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/core/modules/hrm/doc/pdf_standard_evaluation.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], 'htdocs/core/modules/hrm/mod_evaluation_advanced.php' => ['PhanUndeclaredProperty'], @@ -395,7 +390,6 @@ return [ 'htdocs/core/modules/printsheet/modules_labels.php' => ['PhanParamTooMany'], 'htdocs/core/modules/product/doc/pdf_standard.modules.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php' => ['PhanUndeclaredProperty'], - 'htdocs/core/modules/project/doc/pdf_baleine.modules.php' => ['PhanUndeclaredProperty'], 'htdocs/core/modules/project/doc/pdf_timespent.modules.php' => ['PhanUndeclaredProperty'], 'htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'], 'htdocs/core/modules/propale/doc/pdf_azur.modules.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], @@ -408,10 +402,10 @@ return [ 'htdocs/core/modules/societe/mod_codecompta_digitaria.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'], - 'htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php' => ['PhanUndeclaredProperty'], 'htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php' => ['PhanPossiblyUndeclaredVariable'], - 'htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php' => ['PhanPossiblyUndeclaredVariable'], 'htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], 'htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], @@ -743,7 +737,6 @@ return [ 'htdocs/public/test/test_arrays.php' => ['PhanPluginUndeclaredVariableIsset'], 'htdocs/public/test/test_forms.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/public/ticket/create_ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty'], - 'htdocs/public/ticket/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/public/ticket/view.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'], 'htdocs/public/webportal/tpl/menu.tpl.php' => ['PhanUndeclaredProperty'], 'htdocs/public/webportal/webportal.main.inc.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction'], @@ -790,7 +783,6 @@ return [ 'htdocs/societe/admin/societe.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredMethod'], 'htdocs/societe/ajax/ajaxcompanies.php' => ['PhanUndeclaredProperty'], 'htdocs/societe/ajax/company.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], - 'htdocs/societe/card.php' => ['PhanTypeMismatchProperty'], 'htdocs/societe/checkvat/checkVatPopup.php' => ['PhanPossiblyUndeclaredGlobalVariable'], 'htdocs/societe/class/api_contacts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'], 'htdocs/societe/class/api_thirdparties.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], @@ -835,13 +827,12 @@ return [ 'htdocs/theme/md/flags-sprite.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/info-box.inc.php' => ['PhanUndeclaredGlobalVariable'], 'htdocs/theme/md/progress.inc.php' => ['PhanUndeclaredGlobalVariable'], - 'htdocs/ticket/card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'], + 'htdocs/ticket/card.php' => ['PhanUndeclaredProperty'], 'htdocs/ticket/class/actions_ticket.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'], - 'htdocs/ticket/class/api_tickets.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'], + 'htdocs/ticket/class/api_tickets.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'], 'htdocs/ticket/class/cticketcategory.class.php' => ['PhanUndeclaredProperty'], - 'htdocs/ticket/class/ticket.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'], + 'htdocs/ticket/class/ticket.class.php' => ['PhanUndeclaredProperty'], 'htdocs/ticket/class/ticketstats.class.php' => ['PhanPluginUnknownPropertyType'], - 'htdocs/ticket/contact.php' => ['PhanTypeMismatchArgumentProbablyReal'], 'htdocs/ticket/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'], 'htdocs/ticket/list.php' => ['PhanTypeComparisonFromArray'], 'htdocs/ticket/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'], diff --git a/dev/tools/phan/config.php b/dev/tools/phan/config.php index aa13ceba1c690..712e14e87b7fa 100644 --- a/dev/tools/phan/config.php +++ b/dev/tools/phan/config.php @@ -320,7 +320,7 @@ 'exclude_file_regex' => '@^(' // @phpstan-ignore-line .'dummy' // @phpstan-ignore-line // mymodule seen in cti, but not in git. - .'|htdocs/custom/mymodule/.*' // @phpstan-ignore-line + .'|htdocs/custom/.*' // Ignore all custom modules @phpstan-ignore-line .'|htdocs/.*/canvas/.*/tpl/.*.tpl.php' // @phpstan-ignore-line //.'|htdocs/modulebuilder/template/.*' // @phpstan-ignore-line // Included as stub (better analysis) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f51d74db42507..ae4cd5bca1575 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6348,7 +6348,7 @@ function print_fiche_titre($title, $mesg = '', $picto = 'generic', $pictoisfullp * @param string $title Title to show (HTML sanitized content) * @param string $morehtmlright Added message to show on right * @param string $picto Icon to use before title (should be a 32x32 transparent png file) - * @param int $pictoisfullpath 1=Icon name is a full absolute url of image + * @param int<0,1> $pictoisfullpath 1=Icon name is a full absolute url of image * @param string $id To force an id on html objects * @param string $morecssontable More css on table * @param string $morehtmlcenter Added message to show on center @@ -6599,7 +6599,7 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be print ''; } else { print '
  • '; - print ''; } $tmpchoice = explode(',', $pagesizechoices); $tmpkey = $limit.':'.$limit; @@ -6627,7 +6627,7 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be print ''; } else { print ''; - print ajax_combobox("limit".(is_numeric($selectlimitsuffix) ? '': $selectlimitsuffix), array(), 0, 0, 'resolve', '-1', 'limit'); + print ajax_combobox("limit".(is_numeric($selectlimitsuffix) ? '' : $selectlimitsuffix), array(), 0, 0, 'resolve', '-1', 'limit'); //print ajax_combobox("limit"); } diff --git a/htdocs/public/ticket/list.php b/htdocs/public/ticket/list.php index 352aae3e68897..f956b2149accf 100644 --- a/htdocs/public/ticket/list.php +++ b/htdocs/public/ticket/list.php @@ -1,4 +1,6 @@ + */ /* Copyright (C) 2013-2016 Jean-François FERRY * * This program is free software; you can redistribute it and/or modify @@ -120,10 +122,11 @@ llxHeaderTicket($langs->trans("Tickets"), "", 0, 0, $arrayofjs, $arrayofcss); +$display_ticket_list = false; + // Load the ticket from track_id if ($action == "view_ticketlist") { $error = 0; - $display_ticket_list = false; if (!strlen($track_id)) { $error++; array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("TicketTrackId"))); @@ -143,7 +146,7 @@ } if (!$error) { - $ret = $object->fetch('', '', $track_id); + $ret = $object->fetch(0, '', $track_id); if ($ret && $object->id > 0) { // vérifie si l'adresse email est bien dans les contacts du ticket @@ -423,7 +426,7 @@ $baseurl = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', DOL_URL_ROOT.'/public/ticket/'); - $newcardbutton = ''; + $newcardbutton = ''; print_barre_liste($langs->trans('TicketList'), $page, 'list.php', $param, $sortfield, $sortorder, '', $num, $num_total, 'ticket', 0, $newcardbutton); @@ -721,7 +724,7 @@ $url_public_ticket = getDolGlobalString('TICKET_URL_PUBLIC_INTERFACE', dol_buildpath('/public/ticket/', 1)); - print ''; print ""; diff --git a/htdocs/ticket/class/api_tickets.class.php b/htdocs/ticket/class/api_tickets.class.php index 07df43e801585..5aa7bd65f7e35 100644 --- a/htdocs/ticket/class/api_tickets.class.php +++ b/htdocs/ticket/class/api_tickets.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024 MDW * * 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 @@ -16,7 +17,7 @@ * along with this program. If not, see . */ - use Luracast\Restler\RestException; +use Luracast\Restler\RestException; require_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ticket.lib.php'; @@ -361,7 +362,7 @@ public function postNewMessage($request_data = null) $this->ticket->$field = $this->_checkValForAPI($field, $value, $this->ticket); } $ticketMessageText = $this->ticket->message; - $result = $this->ticket->fetch('', '', $this->ticket->track_id); + $result = $this->ticket->fetch(0, '', $this->ticket->track_id); if (!$result) { throw new RestException(404, 'Ticket not found'); } diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index acbb86ccf947e..00e0a4a126ad0 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -105,7 +105,7 @@ class Ticket extends CommonObject public $fk_user_assign; /** - * var string Ticket subject + * @var string Ticket subject */ public $subject; @@ -212,17 +212,17 @@ class Ticket extends CommonObject public $date_close; /** - * @var array cache_types_tickets + * @var array cache_types_tickets */ public $cache_types_tickets; /** - * @var array tickets categories + * @var array Cache of Ticket categories */ public $cache_category_tickets; /** - * @var array cache msgs ticket + * @var array cache msgs ticket */ public $cache_msgs_ticket; @@ -252,7 +252,7 @@ class Ticket extends CommonObject public $oldcopy; /** - * @var Ticket[] array of Tickets + * @var Ticket[] Array of Tickets */ public $lines; @@ -482,7 +482,7 @@ public function checkExistingRef(string $action, string $getRef) { $test = new self($this->db); - if ($test->fetch('', $getRef) > 0) { + if ($test->fetch(0, $getRef) > 0) { if (($action == 'add') || ($action == 'update' && $this->ref != $getRef)) { return true; } @@ -1385,14 +1385,14 @@ public function loadCacheTypesTickets() /** * Load into a cache array, the list of ticket categories (setup done into dictionary) * - * @param int $publicgroup 0=No public group, 1=Public group only, -1=All - * @return int Number of lines loaded, 0 if already loaded, <0 if KO + * @param int<-1,1> $publicgroup 0=No public group, 1=Public group only, -1=All + * @return int Number of lines loaded, 0 if already loaded, <0 if KO */ public function loadCacheCategoriesTickets($publicgroup = -1) { global $langs; - if ($publicgroup == -1 && !empty($this->cache_category_ticket) && count($this->cache_category_tickets)) { + if ($publicgroup == -1 && !empty($this->cache_category_tickets) && count($this->cache_category_tickets)) { // Cache already loaded return 0; } @@ -1757,10 +1757,10 @@ public function markAsRead($user, $notrigger = 0) /** * Set an assigned user to a ticket. * - * @param User $user Object user - * @param int $id_assign_user ID of user assigned - * @param int $notrigger Disable trigger - * @return int Return integer <0 if KO, 0=Nothing done, >0 if OK + * @param User $user Object user + * @param int $id_assign_user ID of user assigned + * @param int<0,1> $notrigger Disable trigger + * @return int Return integer <0 if KO, 0=Nothing done, >0 if OK */ public function assignUser($user, $id_assign_user, $notrigger = 0) { @@ -1813,12 +1813,12 @@ public function assignUser($user, $id_assign_user, $notrigger = 0) * Add message into database * * @param User $user User that creates - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @param array $filename_list List of files to attach (full path of filename on file system) - * @param array $mimetype_list List of MIME type of attached files - * @param array $mimefilename_list List of attached file name in message - * @param boolean $send_email Whether the message is sent by email - * @param int $public_area 0=Default, 1 if we are creating the message from a public area (so we can search contact from email to add it as contact of ticket if TICKET_ASSIGN_CONTACT_TO_MESSAGE is set) + * @param int<0,1> $notrigger 0=launch triggers after, 1=disable triggers + * @param string[] $filename_list List of files to attach (full path of filename on file system) + * @param string[] $mimetype_list List of MIME type of attached files + * @param string[] $mimefilename_list List of attached file name in message + * @param bool $send_email Whether the message is sent by email + * @param int<0,1> $public_area 0=Default, 1 if we are creating the message from a public area (so we can search contact from email to add it as contact of ticket if TICKET_ASSIGN_CONTACT_TO_MESSAGE is set) * @return int Return integer <0 if KO, >0 if OK */ public function createTicketMessage($user, $notrigger = 0, $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array(), $send_email = false, $public_area = 0) @@ -2070,11 +2070,11 @@ public function close(User $user, $mode = 0) /** * Search and fetch thirparties by email * - * @param string $email Email - * @param int $type Type of thirdparties (0=any, 1=customer, 2=prospect, 3=supplier) - * @param array $filters Array of couple field name/value to filter the companies with the same name - * @param string $clause Clause for filters - * @return array|int Array of thirdparties object + * @param string $email Email + * @param int<0,3> $type Type of thirdparties (0=any, 1=customer, 2=prospect, 3=supplier) + * @param array $filters Array of couple field name/value to filter the companies with the same name + * @param string $clause Clause for filters + * @return Societe[]|int<-1,-1> Array of thirdparties object */ public function searchSocidByEmail($email, $type = 0, $filters = array(), $clause = 'AND') { @@ -2138,7 +2138,7 @@ public function searchSocidByEmail($email, $type = 0, $filters = array(), $claus * @param string $email Email * @param int $socid Limit to a thirdparty * @param string $case Respect case - * @return array|int Array of contacts object + * @return Contact[]|int Array of contacts object */ public function searchContactByEmail($email, $socid = 0, $case = '') { @@ -2253,7 +2253,7 @@ public function setContract($contractid) /** * Return id des contacts interne de suivi * - * @return array Liste des id contacts suivi ticket + * @return null|int[] Liste des id contacts suivi ticket */ public function getIdTicketInternalContact() { @@ -2274,7 +2274,7 @@ public function getInfosTicketInternalContact($status = -1) /** * Return id des contacts clients pour le suivi ticket * - * @return array Liste des id contacts suivi ticket + * @return null|int[] Liste des id contacts suivi ticket */ public function getIdTicketCustomerContact() { @@ -2285,7 +2285,7 @@ public function getIdTicketCustomerContact() * Retrieve information about external contacts * * @param int $status Status of user or company - * @return array Array with datas : firstname, lastname, socid (-1 for internal users), email, code, libelle, status + * @return array|int<-1,-1> Array with data : firstname, lastname, socid (-1 for internal users), email, code, libelle, status */ public function getInfosTicketExternalContact($status = -1) { @@ -2295,7 +2295,7 @@ public function getInfosTicketExternalContact($status = -1) /** * Return id des contacts clients des intervenants * - * @return array Liste des id contacts intervenants + * @return null|int[] Liste des id contacts intervenants */ public function getIdTicketInternalInvolvedContact() { @@ -2305,7 +2305,7 @@ public function getIdTicketInternalInvolvedContact() /** * Return id des contacts clients des intervenants * - * @return array Liste des id contacts intervenants + * @return null|int[] Liste des id contacts intervenants */ public function getIdTicketCustomerInvolvedContact() { @@ -2315,7 +2315,7 @@ public function getIdTicketCustomerInvolvedContact() /** * Return id of all contacts for ticket * - * @return array Array of contacts for tickets + * @return int[] Array of contacts for tickets */ public function getTicketAllContacts() { @@ -2333,7 +2333,7 @@ public function getTicketAllContacts() /** * Return id of all contacts for ticket * - * @return array Array of contacts + * @return int[] Array of contacts */ public function getTicketAllCustomerContacts() { @@ -2480,6 +2480,7 @@ public function getDefaultRef($thirdparty = null) // Search template files $file = ''; $classname = ''; + $reldir = ''; $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { $file = dol_buildpath($reldir."core/modules/ticket/".$modele.'.php', 0); @@ -2543,7 +2544,7 @@ public function is_photo_available($sdir) * Files may be renamed during copy to avoid overwriting existing files. * * @param string $forcetrackid Force trackid used for $keytoavoidconflict into get_attached_files() - * @return array|int Array with final path/name/mime of files. + * @return array{listofpaths:string[],listofnames:string[],listofmimes:string[]}|int<-1,-1> Array with final path/name/mime of files. */ public function copyFilesForTicket($forcetrackid = null) { @@ -2682,7 +2683,7 @@ public function newMessage($user, &$action, $private = 1, $public_area = 0) $object = new Ticket($this->db); - $ret = $object->fetch('', '', GETPOST('track_id', 'alpha')); + $ret = $object->fetch(0, '', GETPOST('track_id', 'alpha')); $object->socid = $object->fk_soc; $object->fetch_thirdparty(); @@ -2751,6 +2752,8 @@ public function newMessage($user, &$action, $private = 1, $public_area = 0) } else { $assigned_user_dont_have_email = $assigned_user->getFullName($langs); } + } else { + $assigned_user = null; } // Build array to display recipient list @@ -2761,7 +2764,7 @@ public function newMessage($user, &$action, $private = 1, $public_area = 0) } // We check if the email address is not the assignee's address to prevent notification from being sent twice - if (!empty($info_sendto['email']) && $assigned_user->email != $info_sendto['email']) { + if (!empty($info_sendto['email']) && ($assigned_user === null || $assigned_user->email != $info_sendto['email'])) { $sendto[] = dolGetFirstLastname($info_sendto['firstname'], $info_sendto['lastname'])." <".$info_sendto['email'].">"; } } @@ -2816,7 +2819,7 @@ public function newMessage($user, &$action, $private = 1, $public_area = 0) $message .= '

    '; $message .= $langs->trans('TicketNotificationEmailBodyInfosTrackUrlinternal').' : '.$object->track_id.''; - $this->sendTicketMessageByEmail($subject, $message, '', $sendto, $listofpaths, $listofmimes, $listofnames); + $this->sendTicketMessageByEmail($subject, $message, 0, $sendto, $listofpaths, $listofmimes, $listofnames); } } } else { @@ -2888,7 +2891,7 @@ public function newMessage($user, &$action, $private = 1, $public_area = 0) // don't try to send email if no recipient if (!empty($sendto)) { - $this->sendTicketMessageByEmail($subject, $message, '', $sendto, $listofpaths, $listofmimes, $listofnames); + $this->sendTicketMessageByEmail($subject, $message, 0, $sendto, $listofpaths, $listofmimes, $listofnames); } } @@ -2990,7 +2993,7 @@ public function newMessage($user, &$action, $private = 1, $public_area = 0) // Don't try to send email when no recipient if (!empty($sendto)) { - $result = $this->sendTicketMessageByEmail($subject, $message, '', $sendto, $listofpaths, $listofmimes, $listofnames); + $result = $this->sendTicketMessageByEmail($subject, $message, 0, $sendto, $listofpaths, $listofmimes, $listofnames); if ($result) { // update last_msg_sent date (for last message sent to external users) $this->date_last_msg_sent = dol_now(); @@ -3029,13 +3032,13 @@ public function newMessage($user, &$action, $private = 1, $public_area = 0) /** * Send ticket by email to linked contacts * - * @param string $subject Email subject - * @param string $message Email message - * @param int $send_internal_cc Receive a copy on internal email (getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM') - * @param array $array_receiver Array of receiver. Example array('name' => 'John Doe', 'email' => 'john@doe.com', etc...) - * @param array $filename_list List of files to attach (full path of filename on file system) - * @param array $mimetype_list List of MIME type of attached files - * @param array $mimefilename_list List of attached file name in message + * @param string $subject Email subject + * @param string $message Email message + * @param int<0,1> $send_internal_cc Receive a copy on internal email (getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM') + * @param array $array_receiver Array of receiver. Example array('name' => 'John Doe', 'email' => 'john@doe.com', etc...) + * @param string[] $filename_list List of files to attach (full path of filename on file system) + * @param string[] $mimetype_list List of MIME type of attached files + * @param string[] $mimefilename_list List of attached file name in message * @return boolean True if mail sent to at least one receiver, false otherwise */ public function sendTicketMessageByEmail($subject, $message, $send_internal_cc = 0, $array_receiver = array(), $filename_list = array(), $mimetype_list = array(), $mimefilename_list = array()) @@ -3302,13 +3305,13 @@ public function getKanbanView($option = '', $arraydata = null) /** * Create a document onto disk according to template module. * - * @param string $modele Force template to use ('' to not force) - * @param Translate $outputlangs object lang a utiliser pour traduction - * @param int $hidedetails Hide details of lines - * @param int $hidedesc Hide description - * @param int $hideref Hide ref - * @param null|array $moreparams Array to provide more information - * @return int 0 if KO, 1 if OK + * @param string $modele Force template to use ('' to not force) + * @param Translate $outputlangs object lang a utiliser pour traduction + * @param int<0,1> $hidedetails Hide details of lines + * @param int<0,1> $hidedesc Hide description + * @param int<0,1> $hideref Hide ref + * @param ?array $moreparams Array to provide more information + * @return int 0 if KO, 1 if OK */ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) { diff --git a/htdocs/ticket/contact.php b/htdocs/ticket/contact.php index 0a83c3ab454d5..565c6563d5310 100644 --- a/htdocs/ticket/contact.php +++ b/htdocs/ticket/contact.php @@ -2,6 +2,7 @@ /* Copyright (C) 2011-2016 Jean-François Ferry * Copyright (C) 2011 Regis Houssin * Copyright (C) 2016 Christophe Battarel + * Copyright (C) 2024 MDW * * 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 @@ -104,21 +105,21 @@ $error = 0; $codecontact = dol_getIdFromCode($db, $typeid, 'c_type_contact', 'rowid', 'code'); - if ($codecontact=='SUPPORTTEC') { + if ($codecontact == 'SUPPORTTEC') { $internal_contacts = $object->listeContact(-1, 'internal', 0, 'SUPPORTTEC'); foreach ($internal_contacts as $key => $contact) { if ($contact['id'] !== $contactid) { //print "user à effacer : ".$useroriginassign; $result = $object->delete_contact($contact['rowid']); - if ($result<0) { - $error ++; + if ($result < 0) { + $error++; setEventMessages($object->error, $object->errors, 'errors'); } } } $ret = $object->assignUser($user, $contactid); if ($ret < 0) { - $error ++; + $error++; setEventMessages($object->error, $object->errors, 'errors'); } } @@ -155,10 +156,10 @@ if ($object->fetch($id, '', $track_id)) { $internal_contacts = $object->listeContact(-1, 'internal', 0, 'SUPPORTTEC'); foreach ($internal_contacts as $key => $contact) { - if ($contact['rowid'] == $lineid && $object->fk_user_assign==$contact['id']) { - $ret = $object->assignUser($user, null); + if ($contact['rowid'] == $lineid && $object->fk_user_assign == $contact['id']) { + $ret = $object->assignUser($user, 0); if ($ret < 0) { - $error ++; + $error++; setEventMessages($object->error, $object->errors, 'errors'); } } From c023c3b8c3fec7f1adadee9ac36c0a33097796ee Mon Sep 17 00:00:00 2001 From: UltraViolet33 <93035200+UltraViolet33@users.noreply.github.com> Date: Sat, 19 Oct 2024 01:26:02 +0200 Subject: [PATCH 11/17] FIX attached files not sent in empty email (#31444) When we send an email with empty text content but with attached file, the file was not sent. Co-authored-by: Ulysse Valdenaire --- htdocs/core/class/CMailFile.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index fbba4e094c63c..81dbddb673964 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -597,6 +597,9 @@ public function __construct($subject, $to, $from, $msg, $filename_list = array() $msg = $this->checkIfHTML($msg); // This add a header and a body including custom CSS to the HTML content } + if ($msg === '.') { + $msg = "\n.\n"; + } // Replace . alone on a new line with .. to avoid to have SMTP interpret this as end of message $msg = preg_replace('/(\r|\n)\.(\r|\n)/ims', '\1..\2', $msg); From 286d2e767000e8381c2dff7a26b899fce0a1673b Mon Sep 17 00:00:00 2001 From: Michael Bussmann Date: Sat, 19 Oct 2024 01:34:48 +0200 Subject: [PATCH 12/17] FIX #31305 Translation of INVOICE_ADD_EPC_QR_CodePay moved from admin to bills (#31441) Signed-off-by: Michael Bussmann --- htdocs/langs/am_ET/admin.lang | 1 - htdocs/langs/am_ET/bills.lang | 1 + htdocs/langs/ar_DZ/admin.lang | 1 - htdocs/langs/ar_DZ/bills.lang | 1 + htdocs/langs/ar_SA/admin.lang | 1 - htdocs/langs/ar_SA/bills.lang | 1 + htdocs/langs/az_AZ/admin.lang | 1 - htdocs/langs/az_AZ/bills.lang | 1 + htdocs/langs/bg_BG/admin.lang | 1 - htdocs/langs/bg_BG/bills.lang | 1 + htdocs/langs/bn_BD/admin.lang | 1 - htdocs/langs/bn_BD/bills.lang | 1 + htdocs/langs/bn_IN/admin.lang | 1 - htdocs/langs/bn_IN/bills.lang | 1 + htdocs/langs/bs_BA/admin.lang | 1 - htdocs/langs/bs_BA/bills.lang | 1 + htdocs/langs/ca_ES/admin.lang | 1 - htdocs/langs/ca_ES/bills.lang | 1 + htdocs/langs/cs_CZ/admin.lang | 1 - htdocs/langs/cs_CZ/bills.lang | 1 + htdocs/langs/cy_GB/admin.lang | 1 - htdocs/langs/cy_GB/bills.lang | 1 + htdocs/langs/da_DK/admin.lang | 1 - htdocs/langs/da_DK/bills.lang | 1 + htdocs/langs/de_DE/admin.lang | 1 - htdocs/langs/de_DE/bills.lang | 1 + htdocs/langs/el_GR/admin.lang | 1 - htdocs/langs/el_GR/bills.lang | 1 + htdocs/langs/es_ES/admin.lang | 1 - htdocs/langs/es_ES/bills.lang | 1 + htdocs/langs/et_EE/admin.lang | 1 - htdocs/langs/et_EE/bills.lang | 1 + htdocs/langs/eu_ES/admin.lang | 1 - htdocs/langs/eu_ES/bills.lang | 1 + htdocs/langs/fa_IR/admin.lang | 1 - htdocs/langs/fa_IR/bills.lang | 1 + htdocs/langs/fi_FI/admin.lang | 1 - htdocs/langs/fi_FI/bills.lang | 1 + htdocs/langs/fr_FR/admin.lang | 1 - htdocs/langs/fr_FR/bills.lang | 1 + htdocs/langs/gl_ES/admin.lang | 1 - htdocs/langs/gl_ES/bills.lang | 1 + htdocs/langs/he_IL/admin.lang | 1 - htdocs/langs/he_IL/bills.lang | 1 + htdocs/langs/hr_HR/admin.lang | 1 - htdocs/langs/hr_HR/bills.lang | 1 + htdocs/langs/hu_HU/admin.lang | 1 - htdocs/langs/hu_HU/bills.lang | 1 + htdocs/langs/id_ID/admin.lang | 1 - htdocs/langs/id_ID/bills.lang | 1 + htdocs/langs/is_IS/admin.lang | 1 - htdocs/langs/is_IS/bills.lang | 1 + htdocs/langs/it_IT/admin.lang | 1 - htdocs/langs/it_IT/bills.lang | 1 + htdocs/langs/ja_JP/admin.lang | 1 - htdocs/langs/ja_JP/bills.lang | 1 + htdocs/langs/ka_GE/admin.lang | 1 - htdocs/langs/ka_GE/bills.lang | 1 + htdocs/langs/kk_KZ/admin.lang | 1 - htdocs/langs/kk_KZ/bills.lang | 1 + htdocs/langs/km_KH/admin.lang | 1 - htdocs/langs/km_KH/bills.lang | 1 + htdocs/langs/ko_KR/admin.lang | 1 - htdocs/langs/ko_KR/bills.lang | 1 + htdocs/langs/ku_IQ/admin.lang | 1 - htdocs/langs/ku_IQ/bills.lang | 1 + htdocs/langs/lo_LA/admin.lang | 1 - htdocs/langs/lo_LA/bills.lang | 1 + htdocs/langs/lt_LT/admin.lang | 1 - htdocs/langs/lt_LT/bills.lang | 1 + htdocs/langs/lv_LV/admin.lang | 1 - htdocs/langs/lv_LV/bills.lang | 1 + htdocs/langs/mk_MK/admin.lang | 1 - htdocs/langs/mk_MK/bills.lang | 1 + htdocs/langs/nb_NO/admin.lang | 1 - htdocs/langs/nb_NO/bills.lang | 1 + htdocs/langs/nl_NL/admin.lang | 1 - htdocs/langs/nl_NL/bills.lang | 1 + htdocs/langs/pl_PL/admin.lang | 1 - htdocs/langs/pl_PL/bills.lang | 1 + htdocs/langs/pt_PT/admin.lang | 1 - htdocs/langs/pt_PT/bills.lang | 1 + htdocs/langs/ro_RO/admin.lang | 1 - htdocs/langs/ro_RO/bills.lang | 1 + htdocs/langs/ru_RU/admin.lang | 1 - htdocs/langs/ru_RU/bills.lang | 1 + htdocs/langs/sk_SK/admin.lang | 1 - htdocs/langs/sk_SK/bills.lang | 1 + htdocs/langs/sl_SI/admin.lang | 1 - htdocs/langs/sl_SI/bills.lang | 1 + htdocs/langs/sq_AL/admin.lang | 1 - htdocs/langs/sq_AL/bills.lang | 1 + htdocs/langs/sr_RS/admin.lang | 1 - htdocs/langs/sr_RS/bills.lang | 1 + htdocs/langs/sv_SE/admin.lang | 1 - htdocs/langs/sv_SE/bills.lang | 1 + htdocs/langs/sw_SW/admin.lang | 1 - htdocs/langs/sw_SW/bills.lang | 1 + htdocs/langs/ta_IN/admin.lang | 1 - htdocs/langs/ta_IN/bills.lang | 1 + htdocs/langs/tg_TJ/admin.lang | 1 - htdocs/langs/tg_TJ/bills.lang | 1 + htdocs/langs/th_TH/admin.lang | 1 - htdocs/langs/th_TH/bills.lang | 1 + htdocs/langs/tr_TR/admin.lang | 1 - htdocs/langs/tr_TR/bills.lang | 1 + htdocs/langs/uk_UA/admin.lang | 1 - htdocs/langs/uk_UA/bills.lang | 1 + htdocs/langs/ur_PK/admin.lang | 1 - htdocs/langs/ur_PK/bills.lang | 1 + htdocs/langs/uz_UZ/admin.lang | 1 - htdocs/langs/uz_UZ/bills.lang | 1 + htdocs/langs/vi_VN/admin.lang | 1 - htdocs/langs/vi_VN/bills.lang | 1 + htdocs/langs/zh_CN/admin.lang | 1 - htdocs/langs/zh_CN/bills.lang | 1 + htdocs/langs/zh_HK/admin.lang | 1 - htdocs/langs/zh_HK/bills.lang | 1 + htdocs/langs/zh_TW/admin.lang | 1 - htdocs/langs/zh_TW/bills.lang | 1 + 120 files changed, 60 insertions(+), 60 deletions(-) diff --git a/htdocs/langs/am_ET/admin.lang b/htdocs/langs/am_ET/admin.lang index 2a744aa1f7ce3..f49c024852dc6 100644 --- a/htdocs/langs/am_ET/admin.lang +++ b/htdocs/langs/am_ET/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=የክፍያ መጠየቂያዎች የስዊዘርላንድ ደረጃ; ዚፕ እና ከተማ መሞላታቸውን እና ሂሳቦቹ ትክክለኛ የስዊስ/ሊችተንስታይን IBANs እንዳላቸው ያረጋግጡ። INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=የመላኪያ አድራሻ አሳይ INVOICE_SHOW_SHIPPING_ADDRESSMore=በአንዳንድ አገሮች ውስጥ አስገዳጅ ምልክት (ፈረንሳይ, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/am_ET/bills.lang b/htdocs/langs/am_ET/bills.lang index 8bab98bc4d51c..4b0fa58ae94c3 100644 --- a/htdocs/langs/am_ET/bills.lang +++ b/htdocs/langs/am_ET/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/ar_DZ/admin.lang b/htdocs/langs/ar_DZ/admin.lang index e7cd71367433e..f551582a4a235 100644 --- a/htdocs/langs/ar_DZ/admin.lang +++ b/htdocs/langs/ar_DZ/admin.lang @@ -2385,7 +2385,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP & City are filled and that the accounts have valid Swiss/Liechtenstein IBANs. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...) UrlSocialNetworksDesc=Url link of social network. Use {socialid} for the variable part that contains the social network ID. diff --git a/htdocs/langs/ar_DZ/bills.lang b/htdocs/langs/ar_DZ/bills.lang index f7d0155f41eb8..bb9dc631c0501 100644 --- a/htdocs/langs/ar_DZ/bills.lang +++ b/htdocs/langs/ar_DZ/bills.lang @@ -607,3 +607,4 @@ SearchUnpaidInvoicesWithDueDate=Search unpaid invoices with a due date = %s NoPaymentAvailable=No payment available for %s PaymentRegisteredAndInvoiceSetToPaid=Payment registered and invoice %s set to paid SendEmailsRemindersOnInvoiceDueDate=Send reminder by email for unpaid invoices +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/ar_SA/admin.lang b/htdocs/langs/ar_SA/admin.lang index 44545c60092e9..cedb112c52608 100644 --- a/htdocs/langs/ar_SA/admin.lang +++ b/htdocs/langs/ar_SA/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=معيار سويسرا للفواتير؛ تأكد من ملء الرمز البريدي والمدينة و وأن الحسابات تحتوي على أرقام IBAN صالحة في سويسرا/ليختنشتاين. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=عرض عنوان الشحن INVOICE_SHOW_SHIPPING_ADDRESSMore=الإشارة الإجبارية في بعض البلدان (فرنسا،...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/ar_SA/bills.lang b/htdocs/langs/ar_SA/bills.lang index 3e2f86f821f71..b59178de1147e 100644 --- a/htdocs/langs/ar_SA/bills.lang +++ b/htdocs/langs/ar_SA/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=البحث عن فواتير مورد غ SendEmailsRemindersOnSupplierInvoiceDueDate=إرسال تذكير عبر البريد الإلكتروني بشأن فواتير و غير المدفوعة مورد التي تم التحقق منها PaymentMadeForSeveralInvoices=تم الدفع لعدة فواتير SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/az_AZ/admin.lang b/htdocs/langs/az_AZ/admin.lang index 459bf5845f3c8..6b231264404e2 100644 --- a/htdocs/langs/az_AZ/admin.lang +++ b/htdocs/langs/az_AZ/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=İsveçrənin faktura standartı; ZIP və Şəhərin doldurulduğuna və hesabların etibarlı İsveçrə/Lixtenşteyn IBAN-larına malik olduğundan əmin olun. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Göndərmə ünvanını göstərin INVOICE_SHOW_SHIPPING_ADDRESSMore=Bəzi ölkələrdə məcburi göstərici (Fransa, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/az_AZ/bills.lang b/htdocs/langs/az_AZ/bills.lang index c7795e031022f..b9b95b351bcfc 100644 --- a/htdocs/langs/az_AZ/bills.lang +++ b/htdocs/langs/az_AZ/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/bg_BG/admin.lang b/htdocs/langs/bg_BG/admin.lang index 15ff1fc9572c9..fdfed84c5681f 100644 --- a/htdocs/langs/bg_BG/admin.lang +++ b/htdocs/langs/bg_BG/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Швейцарски стандарт за фактури; уверете се, че ZIP & City са попълнени и че сметките имат валидни IBAN за Швейцария/Лихтенщайн. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Показване на доставка адрес INVOICE_SHOW_SHIPPING_ADDRESSMore=Задължително указание в някои страни (Франция, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/bg_BG/bills.lang b/htdocs/langs/bg_BG/bills.lang index 17bb6024f6d26..3f80758948d67 100644 --- a/htdocs/langs/bg_BG/bills.lang +++ b/htdocs/langs/bg_BG/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Търсете на неплатени SendEmailsRemindersOnSupplierInvoiceDueDate=Изпратете напомняне по имейл за валидирани и неплатени фактури на доставчик PaymentMadeForSeveralInvoices=Плащане е направено за няколко фактури SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/bn_BD/admin.lang b/htdocs/langs/bn_BD/admin.lang index 4b363e7eb1e02..ad97ae6660ba7 100644 --- a/htdocs/langs/bn_BD/admin.lang +++ b/htdocs/langs/bn_BD/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=চালানের জন্য সুইজারল্যান্ডের মান; নিশ্চিত করুন যে ZIP এবং সিটি পূরণ করা হয়েছে এবং অ্যাকাউন্টগুলিতে বৈধ সুইস/লিচেনস্টাইন IBAN আছে। INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=শিপিং ঠিকানা দেখান INVOICE_SHOW_SHIPPING_ADDRESSMore=কিছু দেশে বাধ্যতামূলক ইঙ্গিত (ফ্রান্স, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/bn_BD/bills.lang b/htdocs/langs/bn_BD/bills.lang index 79561e6914e89..7df2dede20544 100644 --- a/htdocs/langs/bn_BD/bills.lang +++ b/htdocs/langs/bn_BD/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/bn_IN/admin.lang b/htdocs/langs/bn_IN/admin.lang index 9e4e7079957fd..b6ebbe6b66534 100644 --- a/htdocs/langs/bn_IN/admin.lang +++ b/htdocs/langs/bn_IN/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=চালানের জন্য সুইজারল্যান্ডের মান; নিশ্চিত করুন যে ZIP এবং সিটি পূরণ করা হয়েছে এবং অ্যাকাউন্টগুলিতে বৈধ সুইস/লিচেনস্টাইন IBAN আছে। INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=শিপিং ঠিকানা দেখান INVOICE_SHOW_SHIPPING_ADDRESSMore=কিছু দেশে বাধ্যতামূলক ইঙ্গিত (ফ্রান্স, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/bn_IN/bills.lang b/htdocs/langs/bn_IN/bills.lang index 20c591cfacd56..f0ee5d3d93191 100644 --- a/htdocs/langs/bn_IN/bills.lang +++ b/htdocs/langs/bn_IN/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/bs_BA/admin.lang b/htdocs/langs/bs_BA/admin.lang index bdca07350f6f5..d4dbdad5e3d37 100644 --- a/htdocs/langs/bs_BA/admin.lang +++ b/htdocs/langs/bs_BA/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=švicarski standard za fakture; provjerite jesu li ZIP & City popunjeni i da računi imaju važeće švicarske/lihtenštajnske IBAN-ove. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Pokaži adresu za dostavu INVOICE_SHOW_SHIPPING_ADDRESSMore=Obavezna indikacija u nekim zemljama (Francuska, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/bs_BA/bills.lang b/htdocs/langs/bs_BA/bills.lang index 0c47dffcdbe87..fac72b71fde8f 100644 --- a/htdocs/langs/bs_BA/bills.lang +++ b/htdocs/langs/bs_BA/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/ca_ES/admin.lang b/htdocs/langs/ca_ES/admin.lang index baacd6ff82d6f..4e4a79b9b692f 100644 --- a/htdocs/langs/ca_ES/admin.lang +++ b/htdocs/langs/ca_ES/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Mostra el codi QR-Bill suís a les factures (amb un co INVOICE_ADD_SWISS_QR_CODEMore=Estàndard de Suïssa per a les factures; Assegureu-vos que s'omplen ZIP & City i que els comptes tinguin IBAN vàlids de Suïssa/Liechtenstein. INVOICE_ADD_EPC_QR_CODE=Mostra el codi QR EPC a les factures (amb un compte bancari definit per a la transferència de crèdit) INVOICE_ADD_EPC_QR_CODEMore=Aquesta funció us permet afegir o eliminar un codi QR EPC a les vostres factures, cosa que facilita les transferències de crèdit SEPA automàtiques. Habilitar aquesta opció ajuda els vostres clients a fer pagaments fàcilment escanejant el codi QR, reduint els errors d'entrada manual. Utilitzeu aquesta funció si teniu clients a països com Àustria, Bèlgica, Finlàndia, Alemanya i els Països Baixos on aquest sistema és compatible. Desactiveu-lo si no és necessari per a les vostres operacions comercials o base de clients. -INVOICE_ADD_EPC_QR_CODEPay=Escaneja aquest codi QR per pagar amb un telèfon intel·ligent que admeti el pagament amb el codi QR EPC. INVOICE_SHOW_SHIPPING_ADDRESS=Mostra l'adreça d'enviament INVOICE_SHOW_SHIPPING_ADDRESSMore=Indicació obligatòria en alguns països (França, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/ca_ES/bills.lang b/htdocs/langs/ca_ES/bills.lang index 0c462dc6f6bd2..a5183ecc9e462 100644 --- a/htdocs/langs/ca_ES/bills.lang +++ b/htdocs/langs/ca_ES/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Cerca factures de proveïdors no pagades SendEmailsRemindersOnSupplierInvoiceDueDate=Envieu un recordatori per correu electrònic per a les factures de proveïdors validades i no pagades PaymentMadeForSeveralInvoices=Pagament realitzat per diverses factures SituationInvoiceProgressCurrent=Progrés de la factura +INVOICE_ADD_EPC_QR_CODEPay=Escaneja aquest codi QR per pagar amb un telèfon intel·ligent que admeti el pagament amb el codi QR EPC. diff --git a/htdocs/langs/cs_CZ/admin.lang b/htdocs/langs/cs_CZ/admin.lang index 66b0dfa036bce..42ceab0c08546 100644 --- a/htdocs/langs/cs_CZ/admin.lang +++ b/htdocs/langs/cs_CZ/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP & City are filled and that the accounts have valid Swiss/Liechtenstein IBANs. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/cs_CZ/bills.lang b/htdocs/langs/cs_CZ/bills.lang index 446629cf90425..3912aa6fd5559 100644 --- a/htdocs/langs/cs_CZ/bills.lang +++ b/htdocs/langs/cs_CZ/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/cy_GB/admin.lang b/htdocs/langs/cy_GB/admin.lang index fd7883994e6f6..693605250e030 100644 --- a/htdocs/langs/cy_GB/admin.lang +++ b/htdocs/langs/cy_GB/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=safon y Swistir ar gyfer anfonebau; gwnewch yn siŵr bod ZIP & City wedi'u llenwi a bod gan y cyfrifon IBANs Swistir/Liechtenstein dilys. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Dangos cyfeiriad cludo INVOICE_SHOW_SHIPPING_ADDRESSMore=Arwydd gorfodol mewn rhai gwledydd (Ffrainc, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/cy_GB/bills.lang b/htdocs/langs/cy_GB/bills.lang index 66905b686b214..83c6b00e455b3 100644 --- a/htdocs/langs/cy_GB/bills.lang +++ b/htdocs/langs/cy_GB/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Chwiliwch am anfonebau cyflenwyr heb eu SendEmailsRemindersOnSupplierInvoiceDueDate=Anfonwch nodyn atgoffa trwy e-bost ar gyfer anfonebau cyflenwyr sydd wedi'u dilysu a heb eu talu PaymentMadeForSeveralInvoices=Talwyd am sawl anfoneb SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/da_DK/admin.lang b/htdocs/langs/da_DK/admin.lang index d90329edb30d7..904fcb4f33652 100644 --- a/htdocs/langs/da_DK/admin.lang +++ b/htdocs/langs/da_DK/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Vis den schweiziske QR-Bill-kode på fakturaer (med en INVOICE_ADD_SWISS_QR_CODEMore=Schweiz' standard for fakturaer; sørg for, at ZIP & City er udfyldt, og at konti har gyldige schweiziske/liechtensteinske IBAN. INVOICE_ADD_EPC_QR_CODE=Vis EPC QR-koden på fakturaer (med en bankkonto defineret til kreditoverførsel) INVOICE_ADD_EPC_QR_CODEMore=Denne funktion giver dig mulighed for at tilføje eller fjerne en EPC QR-kode på dine fakturaer, hvilket letter automatiske SEPA-kreditoverførsler. Aktivering af denne mulighed hjælper dine kunder med at foretage betalinger nemt ved at scanne QR-koden, hvilket reducerer manuelle indtastningsfejl. Brug denne funktion, hvis du har kunder i lande som Østrig, Belgien, Finland, Tyskland og Holland, hvor dette system understøttes. Deaktiver det, hvis det ikke er nødvendigt for din virksomhedsdrift eller kundebase. -INVOICE_ADD_EPC_QR_CODEPay=Scan denne QR-kode for at betale med en smartphone, der understøtter betaling med EPC QR-kode. INVOICE_SHOW_SHIPPING_ADDRESS=Vis leveringsadresse INVOICE_SHOW_SHIPPING_ADDRESSMore=Obligatorisk angivelse i nogle lande (Frankrig, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Vis faktureringskontakt på forslag diff --git a/htdocs/langs/da_DK/bills.lang b/htdocs/langs/da_DK/bills.lang index 1872c2a4a7cca..21e1726aaada4 100644 --- a/htdocs/langs/da_DK/bills.lang +++ b/htdocs/langs/da_DK/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Søg efter ubetalte leverandørfakturaer SendEmailsRemindersOnSupplierInvoiceDueDate=Send påmindelse på e-mail for validerede og ubetalte leverandørfakturaer PaymentMadeForSeveralInvoices=Betaling foretaget for flere fakturaer SituationInvoiceProgressCurrent=Fakturafremdrift +INVOICE_ADD_EPC_QR_CODEPay=Scan denne QR-kode for at betale med en smartphone, der understøtter betaling med EPC QR-kode. diff --git a/htdocs/langs/de_DE/admin.lang b/htdocs/langs/de_DE/admin.lang index 064182d666b10..d66ca00f1a249 100644 --- a/htdocs/langs/de_DE/admin.lang +++ b/htdocs/langs/de_DE/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Schweizer QR-Rechnungscode auf Rechnungen anzeigen (mi INVOICE_ADD_SWISS_QR_CODEMore=Schweizer Standard für Rechnungen; Stellen Sie sicher, dass PLZ und Ort ausgefüllt sind und dass die Konten über gültige Schweizer/Liechtenstein-IBANs verfügen. INVOICE_ADD_EPC_QR_CODE=EPC-QR-Code auf Rechnungen anzeigen (mit einem festgelegten Bankkonto für Überweisungen) INVOICE_ADD_EPC_QR_CODEMore=Mit diesem Funktion können Sie einen EPC-QR-Code auf Ihrem Rechnungen hinzufügen oder diesen entfernen, der automatische SEPA-Überweisungen erleichtert. Durch Aktivieren dieser Option können Ihre Kunden Zahlungen ganz einfach durch Scannen des QR-Codes durchführen, wodurch manuelle Eingabefehler reduziert werden. Verwenden Sie dieses Funktion, wenn Sie Kunden in Ländern wie Österreich, Belgien, Finnland, Deutschland oder den Niederlanden haben, in denen dieses System unterstützt wird. Deaktivieren Sie es, wenn es für Ihren Geschäftsbetrieb oder Ihren Kundenstamm nicht erforderlich ist. -INVOICE_ADD_EPC_QR_CODEPay=Diesen QR-Code scannen, um mit einem Smartphone zu bezahlen, das Zahlungen mit EPC-QR-Code unterstützt. INVOICE_SHOW_SHIPPING_ADDRESS=Lieferadresse anzeigen INVOICE_SHOW_SHIPPING_ADDRESSMore=Obligatorische Angabe für manche Länder (Frankreich, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Rechnungskontakt auf Angebot anzeigen diff --git a/htdocs/langs/de_DE/bills.lang b/htdocs/langs/de_DE/bills.lang index e2b365d45c10f..b7ed963f319c1 100644 --- a/htdocs/langs/de_DE/bills.lang +++ b/htdocs/langs/de_DE/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Suche nach unbezahlten Lieferantenrechnu SendEmailsRemindersOnSupplierInvoiceDueDate=Eine Erinnerung per E-Mail für freigegebene und unbezahlte Lieferantenrechnungen senden PaymentMadeForSeveralInvoices=Zahlung erfolgt für mehrere Rechnungen SituationInvoiceProgressCurrent=Rechnungsfortschritt +INVOICE_ADD_EPC_QR_CODEPay=Diesen QR-Code scannen, um mit einem Smartphone zu bezahlen, das Zahlungen mit EPC-QR-Code unterstützt. diff --git a/htdocs/langs/el_GR/admin.lang b/htdocs/langs/el_GR/admin.lang index 8706978a8f21d..a3e1077bf0f5a 100644 --- a/htdocs/langs/el_GR/admin.lang +++ b/htdocs/langs/el_GR/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Εμφάνιση του ελβετικού κωδικ INVOICE_ADD_SWISS_QR_CODEMore=Ελβετικό πρότυπο για τα τιμολόγια. βεβαιωθείτε ότι τα πεδία Τ.Κ, & πόλη είναι συμπληρωμένα και ότι οι λογαριασμοί έχουν έγκυρα IBAN Ελβετίας/Λιχτενστάιν. INVOICE_ADD_EPC_QR_CODE=Εμφάνιση του κωδικού EPC QR στα τιμολόγια (με τραπεζικό λογαριασμό που έχει οριστεί για μεταφορά πίστωσης) INVOICE_ADD_EPC_QR_CODEMore=Αυτή η λειτουργία σάς επιτρέπει να προσθέσετε ή να αφαιρέσετε έναν κωδικό EPC QR απο τα τιμολόγιά σας, ο οποίος διευκολύνει τις αυτόματες μεταφορές πίστωσης SEPA. Η ενεργοποίηση αυτής της επιλογής βοηθά τους πελάτες σας να πραγματοποιούν πληρωμές εύκολα σαρώνοντας τον κωδικό QR, μειώνοντας τα σφάλματα χειροκίνητης εισαγωγής. Χρησιμοποιήστε αυτήν τη δυνατότητα εάν έχετε πελάτες σε χώρες όπως η Αυστρία, το Βέλγιο, η Φινλανδία, η Γερμανία, και η Ολλανδία όπου υποστηρίζεται αυτό το σύστημα. Απενεργοποιήστε το εάν δεν απαιτείται για τις επιχειρηματικές δραστηριότητες ή τη βάση πελατών σας. -INVOICE_ADD_EPC_QR_CODEPay=Σαρώστε αυτόν τον κωδικό QR για να πληρώσετε με ένα smartphone που υποστηρίζει πληρωμή με κωδικό EPC QR. INVOICE_SHOW_SHIPPING_ADDRESS=Εμφάνιση διεύθυνσης αποστολής INVOICE_SHOW_SHIPPING_ADDRESSMore=Υποχρεωτική αναφορά για κάποιες χώρες (Γαλλία, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Εμφάνιση επαφή χρέωσης στην προσφορά diff --git a/htdocs/langs/el_GR/bills.lang b/htdocs/langs/el_GR/bills.lang index b061392b54241..86dd5411c24c9 100644 --- a/htdocs/langs/el_GR/bills.lang +++ b/htdocs/langs/el_GR/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Αναζήτηση απλήρωτων τ SendEmailsRemindersOnSupplierInvoiceDueDate=Αποστολή υπενθύμισης μέσω email για επικυρωμένα και απλήρωτα τιμολόγια προμηθευτών PaymentMadeForSeveralInvoices=Πληρωμή που έγινε για αρκετά τιμολόγια SituationInvoiceProgressCurrent=Πρόοδος τιμολογίου +INVOICE_ADD_EPC_QR_CODEPay=Σαρώστε αυτόν τον κωδικό QR για να πληρώσετε με ένα smartphone που υποστηρίζει πληρωμή με κωδικό EPC QR. diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index a6bed48d2cda9..a7feec2023474 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Mostrar el código QR-Bill suizo en las facturas (con INVOICE_ADD_SWISS_QR_CODEMore=Estándar de Suiza para las facturas; asegúrese de que el código postal y la ciudad estén completos y que las cuentas tengan IBAN de Suiza/Liechtenstein válidos. INVOICE_ADD_EPC_QR_CODE=Mostrar el código QR EPC en las facturas (con una cuenta bancaria definida para transferencia de crédito) INVOICE_ADD_EPC_QR_CODEMore=Esta función le permite agregar o eliminar un código QR EPC en sus facturas, lo que facilita las transferencias de crédito SEPA automáticas. Habilitar esta opción ayuda a sus clientes a realizar pagos fácilmente escaneando el código QR, lo que reduce los errores de entrada manual. Utilice esta función si tiene clientes en países como Austria, Bélgica, Finlandia, Alemania y los Países Bajos donde se admite este sistema. Deshabilítelo si no es necesario para sus operaciones comerciales o su base de clientes. -INVOICE_ADD_EPC_QR_CODEPay=Escanee este código QR para pagar con un teléfono inteligente que admita pagos con código QR EPC. INVOICE_SHOW_SHIPPING_ADDRESS=Mostrar dirección de envío INVOICE_SHOW_SHIPPING_ADDRESSMore=Indicación obligatoria en algunos países (Francia, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/es_ES/bills.lang b/htdocs/langs/es_ES/bills.lang index a47e08b1ce090..31e94579a7e28 100644 --- a/htdocs/langs/es_ES/bills.lang +++ b/htdocs/langs/es_ES/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Buscar facturas de proveedores impagas c SendEmailsRemindersOnSupplierInvoiceDueDate=Enviar recordatorio por correo electrónico de facturas de proveedores validadas y pendientes de pago PaymentMadeForSeveralInvoices=Pago realizado por varias facturas SituationInvoiceProgressCurrent=Progreso de la factura +INVOICE_ADD_EPC_QR_CODEPay=Escanee este código QR para pagar con un teléfono inteligente que admita pagos con código QR EPC. diff --git a/htdocs/langs/et_EE/admin.lang b/htdocs/langs/et_EE/admin.lang index f4ef768d21334..4e41d21c78066 100644 --- a/htdocs/langs/et_EE/admin.lang +++ b/htdocs/langs/et_EE/admin.lang @@ -2394,7 +2394,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP & City are filled and that the accounts have valid Swiss/Liechtenstein IBANs. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/et_EE/bills.lang b/htdocs/langs/et_EE/bills.lang index a61f92251421d..e10eb75abfcdb 100644 --- a/htdocs/langs/et_EE/bills.lang +++ b/htdocs/langs/et_EE/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/eu_ES/admin.lang b/htdocs/langs/eu_ES/admin.lang index 884672843efbb..0efcf3c247128 100644 --- a/htdocs/langs/eu_ES/admin.lang +++ b/htdocs/langs/eu_ES/admin.lang @@ -2385,7 +2385,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP & City are filled and that the accounts have valid Swiss/Liechtenstein IBANs. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...) UrlSocialNetworksDesc=Url link of social network. Use {socialid} for the variable part that contains the social network ID. diff --git a/htdocs/langs/eu_ES/bills.lang b/htdocs/langs/eu_ES/bills.lang index 1036665a983f5..0a560927c2cbb 100644 --- a/htdocs/langs/eu_ES/bills.lang +++ b/htdocs/langs/eu_ES/bills.lang @@ -607,3 +607,4 @@ SearchUnpaidInvoicesWithDueDate=Search unpaid invoices with a due date = %s NoPaymentAvailable=No payment available for %s PaymentRegisteredAndInvoiceSetToPaid=Payment registered and invoice %s set to paid SendEmailsRemindersOnInvoiceDueDate=Send reminder by email for unpaid invoices +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/fa_IR/admin.lang b/htdocs/langs/fa_IR/admin.lang index 6e056f3c55ccc..b01305252d0d9 100644 --- a/htdocs/langs/fa_IR/admin.lang +++ b/htdocs/langs/fa_IR/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP & City are filled and that the accounts have valid Swiss/Liechtenstein IBANs. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/fa_IR/bills.lang b/htdocs/langs/fa_IR/bills.lang index a7b0f69909bf1..78710b22f13e2 100644 --- a/htdocs/langs/fa_IR/bills.lang +++ b/htdocs/langs/fa_IR/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/fi_FI/admin.lang b/htdocs/langs/fi_FI/admin.lang index 685b66989c303..c4388cab84e41 100644 --- a/htdocs/langs/fi_FI/admin.lang +++ b/htdocs/langs/fi_FI/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Sveitsin standardi laskuille; varmista, että postinumero ja kaupunki on täytetty ja, että tileillä on kelvolliset Sveitsin/Liechtensteinin IBAN-tunnukset. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Näytä toimitusosoite INVOICE_SHOW_SHIPPING_ADDRESSMore=Pakollinen merkintä joissain maissa (Ranska, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/fi_FI/bills.lang b/htdocs/langs/fi_FI/bills.lang index c9b73d34e8b43..f539feeb22d60 100644 --- a/htdocs/langs/fi_FI/bills.lang +++ b/htdocs/langs/fi_FI/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Hae maksamattomia toimittajalaskuja vahv SendEmailsRemindersOnSupplierInvoiceDueDate=Lähetä muistutus sähköpostitse vahvistetuista ja maksamattomista toimittajalaskuista PaymentMadeForSeveralInvoices=Maksettu useita laskuja SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 7998c09a8f660..b5d380188cb73 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Afficher le code QR-Bill suisse sur factures (avec un INVOICE_ADD_SWISS_QR_CODEMore=La norme suisse pour les factures ; assurez-vous que le code postal et la ville sont remplis et que les comptes ont des IBAN Suisse/Liechtenstein valides. INVOICE_ADD_EPC_QR_CODE=Afficher le code QR EPC sur factures (avec un compte bancaire défini pour le virement) INVOICE_ADD_EPC_QR_CODEMore=Cette fonctionnalité vous permet d'ajouter ou de supprimer un code QR EPC sur vos factures, ce qui facilite les virements SEPA automatiques. L'activation de cette option aide vos clients à effectuer facilement des paiements en scannant le code QR, réduisant ainsi les erreurs de saisie manuelle. Utilisez cette fonctionnalité si vous avez des clients dans des pays comme l'Autriche, la Belgique, la Finlande, l'Allemagne, et les Pays-Bas où ce système est pris en charge. Désactivez-la si elle n'est pas nécessaire à vos activités commerciales ou à votre clientèle. -INVOICE_ADD_EPC_QR_CODEPay=Scannez ce code QR pour payer avec un smartphone prenant en charge le paiement avec le code QR EPC. INVOICE_SHOW_SHIPPING_ADDRESS=Afficher l'adresse de livraison INVOICE_SHOW_SHIPPING_ADDRESSMore=Indication obligatoire dans certains pays (France, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Afficher le contact de facturation sur devis diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index 0b2fece6adcd7..b9826dd7878a0 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -670,3 +670,4 @@ SearchValidatedSupplierInvoicesWithDate=Rechercher les factures impayées des fo SendEmailsRemindersOnSupplierInvoiceDueDate=Envoyer un rappel par email pour les factures fournisseur validées et impayées PaymentMadeForSeveralInvoices=Paiement effectué pour plusieurs factures SituationInvoiceProgressCurrent=Progression facture +INVOICE_ADD_EPC_QR_CODEPay=Scannez ce code QR pour payer avec un smartphone prenant en charge le paiement avec le code QR EPC. diff --git a/htdocs/langs/gl_ES/admin.lang b/htdocs/langs/gl_ES/admin.lang index 6bcdb97e2f5c5..52e1254547eb4 100644 --- a/htdocs/langs/gl_ES/admin.lang +++ b/htdocs/langs/gl_ES/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Amosar o código QR-Bill suízo nas facturas (cunha co INVOICE_ADD_SWISS_QR_CODEMore=Estándar de Suíza para facturas; asegúrese de que o código postal e a cidade estean cubertos e que as contas teñan un IBAN suízo/Liechtenstein válido. INVOICE_ADD_EPC_QR_CODE=Amosar o código QR EPC nas facturas (cunha conta bancaria definida para a transferencia de crédito) INVOICE_ADD_EPC_QR_CODEMore=Esta función permítelle engadir ou eliminar un código QR EPC nas súas facturas, o que facilita as transferencias automáticas de crédito SEPA. Ao activar esta opción, os seus clientes poden facer pagos facilmente escaneando o código QR, reducindo os erros de entrada manual. Utilice esta función se ten clientes en países como Austria, Bélxica, Finlandia, Alemaña e os Países Baixos onde se admite este sistema. Desactívelo se non é preciso para as súas operacións comerciais ou base de clientes. -INVOICE_ADD_EPC_QR_CODEPay=Escanee este código QR para pagar cun teléfono intelixente que admita o pagamento co código QR EPC. INVOICE_SHOW_SHIPPING_ADDRESS=Mostrar o enderezo de envío INVOICE_SHOW_SHIPPING_ADDRESSMore=Indicación obrigatoria nalgúns países (Franza,...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Amosar contacto de facturación por orzamento diff --git a/htdocs/langs/gl_ES/bills.lang b/htdocs/langs/gl_ES/bills.lang index 6f6b86fae1b61..545789bec477e 100644 --- a/htdocs/langs/gl_ES/bills.lang +++ b/htdocs/langs/gl_ES/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Procurar facturas de provedores sen paga SendEmailsRemindersOnSupplierInvoiceDueDate=Enviar lem,branza por correo electrónico para facturas de provedores validadas e non pagadas PaymentMadeForSeveralInvoices=Pagamento de varias facturas SituationInvoiceProgressCurrent=Progreso da factura +INVOICE_ADD_EPC_QR_CODEPay=Escanee este código QR para pagar cun teléfono intelixente que admita o pagamento co código QR EPC. diff --git a/htdocs/langs/he_IL/admin.lang b/htdocs/langs/he_IL/admin.lang index 7e2055a436c46..f9153034e29f7 100644 --- a/htdocs/langs/he_IL/admin.lang +++ b/htdocs/langs/he_IL/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=התקן של שוויץ לחשבוניות; ודא כי ZIP & City מלאים ושהחשבונות כוללים IBAN שוויצרי/ליכטנשטיין חוקי. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=הצג כתובת למשלוח INVOICE_SHOW_SHIPPING_ADDRESSMore=ציון חובה במדינות מסוימות (צרפת, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/he_IL/bills.lang b/htdocs/langs/he_IL/bills.lang index 636d625adf35b..56e4f001a42b4 100644 --- a/htdocs/langs/he_IL/bills.lang +++ b/htdocs/langs/he_IL/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/hr_HR/admin.lang b/htdocs/langs/hr_HR/admin.lang index 9d3ea3d488113..7b719123178ad 100644 --- a/htdocs/langs/hr_HR/admin.lang +++ b/htdocs/langs/hr_HR/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Švicarski standard za fakture; provjerite jesu li poštanski broj i grad ispunjeni i da računi imaju važeće švicarske/lihtenštajnske IBAN-ove. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Prikaži adresu za dostavu INVOICE_SHOW_SHIPPING_ADDRESSMore=Obavezna indikacija u nekim zemljama (Francuska, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/hr_HR/bills.lang b/htdocs/langs/hr_HR/bills.lang index 20a594d8bac20..464c875e966fe 100644 --- a/htdocs/langs/hr_HR/bills.lang +++ b/htdocs/langs/hr_HR/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/hu_HU/admin.lang b/htdocs/langs/hu_HU/admin.lang index 3e5e69e9e6f54..d6a4b147c97d5 100644 --- a/htdocs/langs/hu_HU/admin.lang +++ b/htdocs/langs/hu_HU/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=A svájci QR-Bill kód megjelenítése a számlákon ( INVOICE_ADD_SWISS_QR_CODEMore=Svájc számlákra vonatkozó szabványa; győződjön meg arról, hogy a ZIP és City ki van töltve, és hogy a számlák érvényes svájci/liechtensteini IBAN-okkal rendelkeznek. INVOICE_ADD_EPC_QR_CODE=Mutassa meg az EPC QR-kódot a számlákon (átutaláshoz meghatározott bankszámlával) INVOICE_ADD_EPC_QR_CODEMore=Ez a funkció lehetővé teszi, hogy EPC QR-kódot adjon hozzá vagy távolítson el számláiról, ami megkönnyíti az automatikus SEPA átutalást. Ennek az opciónak az engedélyezése megkönnyíti ügyfelei fizetését a QR-kód beolvasásával, csökkentve ezzel a kézi beviteli hibákat. Használja ezt a funkciót, ha olyan országokban vannak ügyfelei, mint Ausztria, Belgium, Finnország, Németország és Hollandia, ahol ez a rendszer támogatott. Tiltsa le, ha nem szükséges az üzleti tevékenységéhez vagy az ügyfélköréhez. -INVOICE_ADD_EPC_QR_CODEPay=Olvassa be ezt a QR-kódot, ha olyan okostelefonnal szeretne fizetni, amely támogatja az EPC QR-kóddal történő fizetést. INVOICE_SHOW_SHIPPING_ADDRESS=Szállítási cím megjelenítése INVOICE_SHOW_SHIPPING_ADDRESSMore=Egyes országokban kötelező feltüntetni (Franciaország, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/hu_HU/bills.lang b/htdocs/langs/hu_HU/bills.lang index 6c553a8331388..a35ba2ccddfed 100644 --- a/htdocs/langs/hu_HU/bills.lang +++ b/htdocs/langs/hu_HU/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Keresés a kifizetetlen szállító szá SendEmailsRemindersOnSupplierInvoiceDueDate=Emlékeztető küldése e-mailben az érvényesített és kifizetetlen szállító számlákról PaymentMadeForSeveralInvoices=Több számla kifizetése történt SituationInvoiceProgressCurrent=számla folyamat +INVOICE_ADD_EPC_QR_CODEPay=Olvassa be ezt a QR-kódot, ha olyan okostelefonnal szeretne fizetni, amely támogatja az EPC QR-kóddal történő fizetést. diff --git a/htdocs/langs/id_ID/admin.lang b/htdocs/langs/id_ID/admin.lang index d203394841a02..2149edf88e933 100644 --- a/htdocs/langs/id_ID/admin.lang +++ b/htdocs/langs/id_ID/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Tunjukkan kode QR-Bill swiss pada faktur (dengan reken INVOICE_ADD_SWISS_QR_CODEMore=Standar faktur Swiss; pastikan ZIP & Kota terisi dan akun tersebut memiliki IBAN Swiss/Liechtenstein yang valid. INVOICE_ADD_EPC_QR_CODE=Tunjukkan kode QR EPC pada faktur (dengan rekening bank yang ditentukan untuk transfer kredit) INVOICE_ADD_EPC_QR_CODEMore=Fitur ini memungkinkan Anda untuk menambah atau menghapus Kode QR EPC pada faktur Anda, yang memfasilitasi transfer kredit SEPA otomatis. Mengaktifkan opsi ini membantu klien Anda melakukan pembayaran dengan mudah dengan memindai kode QR, sehingga mengurangi kesalahan entri manual. Gunakan fitur ini jika Anda memiliki klien di negara seperti Austria, Belgia, Finlandia, Jerman, dan Belanda yang mendukung sistem ini. Nonaktifkan jika tidak diperlukan untuk operasi bisnis atau basis klien Anda. -INVOICE_ADD_EPC_QR_CODEPay=Pindai kode QR ini untuk membayar dengan smartphone yang mendukung pembayaran dengan kode QR EPC. INVOICE_SHOW_SHIPPING_ADDRESS=Tampilkan alamat pengiriman INVOICE_SHOW_SHIPPING_ADDRESSMore=Indikasi wajib di beberapa negara (Prancis, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/id_ID/bills.lang b/htdocs/langs/id_ID/bills.lang index c97cdfaf9e4d5..ac5467f8d2739 100644 --- a/htdocs/langs/id_ID/bills.lang +++ b/htdocs/langs/id_ID/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Cari faktur pemasok yang belum dibayar d SendEmailsRemindersOnSupplierInvoiceDueDate=Kirim pengingat melalui email untuk faktur pemasok yang valid dan belum dibayar PaymentMadeForSeveralInvoices=Pembayaran dilakukan untuk beberapa faktur SituationInvoiceProgressCurrent=Kemajuan faktur +INVOICE_ADD_EPC_QR_CODEPay=Pindai kode QR ini untuk membayar dengan smartphone yang mendukung pembayaran dengan kode QR EPC. diff --git a/htdocs/langs/is_IS/admin.lang b/htdocs/langs/is_IS/admin.lang index 0752b3edc22d3..e1a31604da877 100644 --- a/htdocs/langs/is_IS/admin.lang +++ b/htdocs/langs/is_IS/admin.lang @@ -2394,7 +2394,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP & City are filled and that the accounts have valid Swiss/Liechtenstein IBANs. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/is_IS/bills.lang b/htdocs/langs/is_IS/bills.lang index 773e329f703d2..7c6a5aebb12c0 100644 --- a/htdocs/langs/is_IS/bills.lang +++ b/htdocs/langs/is_IS/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/it_IT/admin.lang b/htdocs/langs/it_IT/admin.lang index 67d4229dc0fd1..72cc47c30a2bf 100644 --- a/htdocs/langs/it_IT/admin.lang +++ b/htdocs/langs/it_IT/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Mostra la QR-fattura svizzera codice su fatture (con u INVOICE_ADD_SWISS_QR_CODEMore=Standard svizzero per fatture; assicurati che CAP e città siano compilati e che i conti abbiano IBAN validi per la Svizzera/Liechtenstein. INVOICE_ADD_EPC_QR_CODE=Mostra il QR EPC codice su fatture (con un Conto bancario definito per il credito trasferimento) INVOICE_ADD_EPC_QR_CODEMore=Questo funzionalità ti consente di aggiungere o rimuovere un QR EPC codice sul tuo fatture, che facilita i bonifici SEPA automatici. Abilitare questa opzione aiuta i tuoi clienti a effettuare pagamenti facilmente tramite la scansione del QR codice, riducendo gli errori di inserimento manuale. Utilizza questo funzionalità se hai clienti in paesi come Austria, Belgio, Finlandia, Germania, e Paesi Bassi dove questo sistema è supportato . Disabilitalo se non è necessario per le tue operazioni aziendali o la tua base clienti. -INVOICE_ADD_EPC_QR_CODEPay=Scansiona questo QR codice per pagare con uno smartphone che supporta pagamento con EPC QR codice. INVOICE_SHOW_SHIPPING_ADDRESS=Mostra l'indirizzo di spedizione INVOICE_SHOW_SHIPPING_ADDRESSMore=Indicazione obbligatoria in alcuni paesi (Francia, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/it_IT/bills.lang b/htdocs/langs/it_IT/bills.lang index dc51ca644f032..6975e1e9be2ea 100644 --- a/htdocs/langs/it_IT/bills.lang +++ b/htdocs/langs/it_IT/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Cerca fornitore fatture non retribuito c SendEmailsRemindersOnSupplierInvoiceDueDate=Invia promemoria tramite email per e non pagato fornitore fatture PaymentMadeForSeveralInvoices=pagamento realizzato per diversi fatture SituationInvoiceProgressCurrent=fattura progresso +INVOICE_ADD_EPC_QR_CODEPay=Scansiona questo QR codice per pagare con uno smartphone che supporta pagamento con EPC QR codice. diff --git a/htdocs/langs/ja_JP/admin.lang b/htdocs/langs/ja_JP/admin.lang index 128816037f13b..976f677ea1c55 100644 --- a/htdocs/langs/ja_JP/admin.lang +++ b/htdocs/langs/ja_JP/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=請求書にスイス QR 請求書 コード を表示 INVOICE_ADD_SWISS_QR_CODEMore=スイスの請求書標準。郵便番号と都市名が入力されていること、およびアカウントに有効なスイス/リヒテンシュタイン IBAN があることを確認すること。 INVOICE_ADD_EPC_QR_CODE=請求書に EPC QR コード を表示しる (クレジット振替用に 銀行口座 が定義されている) INVOICE_ADD_EPC_QR_CODEMore=この機能を使用すると、請求書に EPC QR コード を追加または削除して、自動 SEPA クレジット振替を容易にすることができる。このオプションを有効にすると、クライアントは QR コード をスキャンして簡単に支払いを行うことができ、手動入力エラーが減りる。この機能は、このシステムがサポートされているオーストリア、ベルギー、フィンランド、ドイツ、オランダなどの国にクライアントがいる場合に使用しる。ビジネス運営やクライアントベースに必要ない場合は無効にすること。 -INVOICE_ADD_EPC_QR_CODEPay=EPC QR コード による支払いをサポートするスマートフォンで支払うには、この QR コード をスキャンすること。 INVOICE_SHOW_SHIPPING_ADDRESS=配送先住所を表示 INVOICE_SHOW_SHIPPING_ADDRESSMore=一部の国では表示が義務付けられていマスる (フランス, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=提案書に請求先連絡先を表示する diff --git a/htdocs/langs/ja_JP/bills.lang b/htdocs/langs/ja_JP/bills.lang index 72d05c33ba519..2ecaf2e66daf4 100644 --- a/htdocs/langs/ja_JP/bills.lang +++ b/htdocs/langs/ja_JP/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=検証日 = %s を持つ未払いのサ SendEmailsRemindersOnSupplierInvoiceDueDate=検証済みかつ未払いのサプライヤー請求書について電子メールでリマインダーを送信する PaymentMadeForSeveralInvoices=複数の請求書に対する支払いが行われた SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=EPC QR コード による支払いをサポートするスマートフォンで支払うには、この QR コード をスキャンすること。 diff --git a/htdocs/langs/ka_GE/admin.lang b/htdocs/langs/ka_GE/admin.lang index 88f5e5e4f48e7..7d0316317990b 100644 --- a/htdocs/langs/ka_GE/admin.lang +++ b/htdocs/langs/ka_GE/admin.lang @@ -2385,7 +2385,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP & City are filled and that the accounts have valid Swiss/Liechtenstein IBANs. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...) UrlSocialNetworksDesc=Url link of social network. Use {socialid} for the variable part that contains the social network ID. diff --git a/htdocs/langs/ka_GE/bills.lang b/htdocs/langs/ka_GE/bills.lang index f7d0155f41eb8..bb9dc631c0501 100644 --- a/htdocs/langs/ka_GE/bills.lang +++ b/htdocs/langs/ka_GE/bills.lang @@ -607,3 +607,4 @@ SearchUnpaidInvoicesWithDueDate=Search unpaid invoices with a due date = %s NoPaymentAvailable=No payment available for %s PaymentRegisteredAndInvoiceSetToPaid=Payment registered and invoice %s set to paid SendEmailsRemindersOnInvoiceDueDate=Send reminder by email for unpaid invoices +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/kk_KZ/admin.lang b/htdocs/langs/kk_KZ/admin.lang index 34a476a51e57d..ee36298a5a64d 100644 --- a/htdocs/langs/kk_KZ/admin.lang +++ b/htdocs/langs/kk_KZ/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Шот-фактураларда швейцариялы INVOICE_ADD_SWISS_QR_CODEMore=Швейцарияның шот-фактуралар стандарты; ZIP & City толтырылғанына және шоттарда жарамды Швейцария/Лихтенштейн IBAN бар екеніне көз жеткізіңіз. INVOICE_ADD_EPC_QR_CODE=Шот-фактураларда EPC QR кодын көрсетіңіз (несие аудару үшін анықталған банк шоты бар) INVOICE_ADD_EPC_QR_CODEMore=Бұл мүмкіндік SEPA несиелік аударымдарын автоматты түрде жеңілдететін шот-фактураларыңызға EPC QR кодын қосуға немесе жоюға мүмкіндік береді. Бұл опцияны қосу клиенттерге QR кодын сканерлеу арқылы оңай төлемдер жасауға көмектеседі, қолмен енгізу қателерін азайтады. Бұл жүйеге қолдау көрсетілетін Австрия, Бельгия, Финляндия, Германия және Нидерланды сияқты елдерде клиенттеріңіз болса, осы мүмкіндікті пайдаланыңыз. Бизнес операцияларыңыз немесе клиенттік базаңыз үшін қажет болмаса, оны өшіріңіз. -INVOICE_ADD_EPC_QR_CODEPay=EPC QR коды арқылы төлемді қолдайтын смартфон арқылы төлеу үшін осы QR кодын сканерлеңіз. INVOICE_SHOW_SHIPPING_ADDRESS=Жеткізу мекенжайын көрсетіңіз INVOICE_SHOW_SHIPPING_ADDRESSMore=Кейбір елдерде міндетті түрде көрсету (Франция, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/kk_KZ/bills.lang b/htdocs/langs/kk_KZ/bills.lang index 8f2547fae4beb..6854b9dbc057f 100644 --- a/htdocs/langs/kk_KZ/bills.lang +++ b/htdocs/langs/kk_KZ/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Растау күнімен төленб SendEmailsRemindersOnSupplierInvoiceDueDate=Расталған және төленбеген жеткізушілер шот-фактуралары үшін электрондық пошта арқылы еске салғышты жіберіңіз PaymentMadeForSeveralInvoices=Төлем бірнеше шот-фактуралар үшін жасалды SituationInvoiceProgressCurrent=Шот-фактураның орындалу барысы +INVOICE_ADD_EPC_QR_CODEPay=EPC QR коды арқылы төлемді қолдайтын смартфон арқылы төлеу үшін осы QR кодын сканерлеңіз. diff --git a/htdocs/langs/km_KH/admin.lang b/htdocs/langs/km_KH/admin.lang index 2b1360b6a0465..032f87f59ae11 100644 --- a/htdocs/langs/km_KH/admin.lang +++ b/htdocs/langs/km_KH/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=បង្ហាញលេខកូដ QR-Bill របស INVOICE_ADD_SWISS_QR_CODEMore=ស្តង់ដាររបស់ប្រទេសស្វីសសម្រាប់វិក័យប័ត្រ; ត្រូវប្រាកដថា ZIP & City ត្រូវបានបំពេញ ហើយគណនីទាំងនោះមាន IBAN ស្វីស/Liechtenstein ដែលមានសុពលភាព។ INVOICE_ADD_EPC_QR_CODE=បង្ហាញលេខកូដ EPC QR នៅលើវិក្កយបត្រ (ជាមួយគណនីធនាគារដែលបានកំណត់សម្រាប់ការផ្ទេរឥណទាន) INVOICE_ADD_EPC_QR_CODEMore=មុខងារនេះអនុញ្ញាតឱ្យអ្នកបន្ថែម ឬលុប EPC QR Code នៅលើវិក្កយបត្ររបស់អ្នក ដែលសម្របសម្រួលការផ្ទេរឥណទាន SEPA ដោយស្វ័យប្រវត្តិ។ ការបើកជម្រើសនេះជួយឱ្យអតិថិជនរបស់អ្នកធ្វើការទូទាត់បានយ៉ាងងាយស្រួលដោយការស្កេនកូដ QR កាត់បន្ថយកំហុសក្នុងការបញ្ចូលដោយដៃ។ ប្រើមុខងារនេះ ប្រសិនបើអ្នកមានអតិថិជននៅក្នុងប្រទេសដូចជា អូទ្រីស បែលហ្សិក ហ្វាំងឡង់ អាល្លឺម៉ង់ និងហូឡង់ ដែលប្រព័ន្ធនេះត្រូវបានគាំទ្រ។ បិទវាប្រសិនបើវាមិនត្រូវបានទាមទារសម្រាប់ប្រតិបត្តិការអាជីវកម្ម ឬមូលដ្ឋានអតិថិជនរបស់អ្នក។ -INVOICE_ADD_EPC_QR_CODEPay=ស្កែនកូដ QR នេះដើម្បីទូទាត់ជាមួយស្មាតហ្វូនដែលគាំទ្រការទូទាត់ដោយប្រើលេខកូដ EPC QR ។ INVOICE_SHOW_SHIPPING_ADDRESS=បង្ហាញអាសយដ្ឋានដឹកជញ្ជូន INVOICE_SHOW_SHIPPING_ADDRESSMore=ការចង្អុលបង្ហាញជាកាតព្វកិច្ចនៅក្នុងប្រទេសមួយចំនួន (បារាំង ... ) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/km_KH/bills.lang b/htdocs/langs/km_KH/bills.lang index 233f6bfc24f88..68160029698f1 100644 --- a/htdocs/langs/km_KH/bills.lang +++ b/htdocs/langs/km_KH/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=ស្វែងរកវិក្កយ SendEmailsRemindersOnSupplierInvoiceDueDate=ផ្ញើការរំលឹកតាមអ៊ីមែលសម្រាប់វិក្កយបត្រអ្នកផ្គត់ផ្គង់ដែលមានសុពលភាព និងមិនទាន់បង់ប្រាក់ PaymentMadeForSeveralInvoices=ការទូទាត់ត្រូវបានធ្វើឡើងសម្រាប់វិក្កយបត្រជាច្រើន។ SituationInvoiceProgressCurrent=វិក័យប័ត្រដំណើរការ +INVOICE_ADD_EPC_QR_CODEPay=ស្កែនកូដ QR នេះដើម្បីទូទាត់ជាមួយស្មាតហ្វូនដែលគាំទ្រការទូទាត់ដោយប្រើលេខកូដ EPC QR ។ diff --git a/htdocs/langs/ko_KR/admin.lang b/htdocs/langs/ko_KR/admin.lang index e23bc14c222d5..b4f9c3dd9c2ce 100644 --- a/htdocs/langs/ko_KR/admin.lang +++ b/htdocs/langs/ko_KR/admin.lang @@ -2385,7 +2385,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP & City are filled and that the accounts have valid Swiss/Liechtenstein IBANs. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...) UrlSocialNetworksDesc=Url link of social network. Use {socialid} for the variable part that contains the social network ID. diff --git a/htdocs/langs/ko_KR/bills.lang b/htdocs/langs/ko_KR/bills.lang index e65e1521c9ba7..f8af95c54b989 100644 --- a/htdocs/langs/ko_KR/bills.lang +++ b/htdocs/langs/ko_KR/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/ku_IQ/admin.lang b/htdocs/langs/ku_IQ/admin.lang index 1cc46f797256c..e84661e5afe80 100644 --- a/htdocs/langs/ku_IQ/admin.lang +++ b/htdocs/langs/ku_IQ/admin.lang @@ -2392,7 +2392,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP & City are filled and that the accounts have valid Swiss/Liechtenstein IBANs. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/ku_IQ/bills.lang b/htdocs/langs/ku_IQ/bills.lang index 68188118377e5..b86c05e3d5e1a 100644 --- a/htdocs/langs/ku_IQ/bills.lang +++ b/htdocs/langs/ku_IQ/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/lo_LA/admin.lang b/htdocs/langs/lo_LA/admin.lang index c4882c77b6737..5856fd71bd3fb 100644 --- a/htdocs/langs/lo_LA/admin.lang +++ b/htdocs/langs/lo_LA/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=ມາດຕະຖານຂອງສະວິດເຊີແລນສໍາລັບໃບແຈ້ງຫນີ້; ໃຫ້ແນ່ໃຈວ່າເຕັມໄປ ZIP & City ແລະບັນຊີນັ້ນມີ Swiss/Liechtenstein IBANs ທີ່ຖືກຕ້ອງ. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=ສະແດງທີ່ຢູ່ຈັດສົ່ງ INVOICE_SHOW_SHIPPING_ADDRESSMore=ຂໍ້ບັງຄັບໃນບາງປະເທດ (ຝຣັ່ງ, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/lo_LA/bills.lang b/htdocs/langs/lo_LA/bills.lang index 7431c28ec5fb0..9c01a43aba89e 100644 --- a/htdocs/langs/lo_LA/bills.lang +++ b/htdocs/langs/lo_LA/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/lt_LT/admin.lang b/htdocs/langs/lt_LT/admin.lang index 27c68940a2117..b9c491088b0c7 100644 --- a/htdocs/langs/lt_LT/admin.lang +++ b/htdocs/langs/lt_LT/admin.lang @@ -2394,7 +2394,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP & City are filled and that the accounts have valid Swiss/Liechtenstein IBANs. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/lt_LT/bills.lang b/htdocs/langs/lt_LT/bills.lang index 3a5423e237ac3..46a0f5aca0b29 100644 --- a/htdocs/langs/lt_LT/bills.lang +++ b/htdocs/langs/lt_LT/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/lv_LV/admin.lang b/htdocs/langs/lv_LV/admin.lang index 40ce9e26025af..cb61d8c460f27 100644 --- a/htdocs/langs/lv_LV/admin.lang +++ b/htdocs/langs/lv_LV/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Rādīt Šveices QR-rēķina kodu uz rēķiniem (ar kr INVOICE_ADD_SWISS_QR_CODEMore=Šveices standarts rēķiniem; pārliecinieties, vai ir aizpildīts ZIP un City un vai kontiem ir derīgi Šveices/Lihtenšteinas IBAN. INVOICE_ADD_EPC_QR_CODE=Rādīt EPC QR kodu uz rēķiniem (ar bankas kontu, kas definēts kredīta pārvedumam) INVOICE_ADD_EPC_QR_CODEMore=Šī funkcija ļauj rēķiniem pievienot vai noņemt EPC QR kodu, kas atvieglo automātiskus SEPA kredīta pārvedumus. Iespējojot šo opciju, jūsu klienti var viegli veikt maksājumus, skenējot QR kodu, tādējādi samazinot manuālās ievades kļūdas. Izmantojiet šo funkciju, ja jums ir klienti tādās valstīs kā Austrija, Beļģija, Somija, Vācija un Nīderlande, kur šī sistēma tiek atbalstīta. Atspējojiet to, ja tas nav nepieciešams jūsu biznesa darbībai vai klientu bāzei. -INVOICE_ADD_EPC_QR_CODEPay=Skenējiet šo QR kodu, lai norēķinātos ar viedtālruni, kas atbalsta maksājumu ar EPC QR kodu. INVOICE_SHOW_SHIPPING_ADDRESS=Rādīt piegādes adresi INVOICE_SHOW_SHIPPING_ADDRESSMore=Obligāta norāde dažās valstīs (Francijā, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Rādīt norēķinu kontaktpersonu priekšlikumā diff --git a/htdocs/langs/lv_LV/bills.lang b/htdocs/langs/lv_LV/bills.lang index df3989752992e..5bda1c9f7ab3f 100644 --- a/htdocs/langs/lv_LV/bills.lang +++ b/htdocs/langs/lv_LV/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Meklēt neapmaksātos piegādātāju rē SendEmailsRemindersOnSupplierInvoiceDueDate=Nosūtiet atgādinājumu pa e-pastu par apstiprinātiem un neapmaksātiem piegādātāja rēķiniem PaymentMadeForSeveralInvoices=Maksājums veikts par vairākiem rēķiniem SituationInvoiceProgressCurrent=Rēķina virzība +INVOICE_ADD_EPC_QR_CODEPay=Skenējiet šo QR kodu, lai norēķinātos ar viedtālruni, kas atbalsta maksājumu ar EPC QR kodu. diff --git a/htdocs/langs/mk_MK/admin.lang b/htdocs/langs/mk_MK/admin.lang index f67f2b869e18b..d753dd1aba8f4 100644 --- a/htdocs/langs/mk_MK/admin.lang +++ b/htdocs/langs/mk_MK/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Прикажи го швајцарскиот QR-Bill INVOICE_ADD_SWISS_QR_CODEMore=Швајцарски стандард за фактури; проверете дали ZIP & City се пополнети и дека сметките имаат важечки IBAN од Швајцарија/Лихтенштајн. INVOICE_ADD_EPC_QR_CODE=Прикажи го EPC QR-кодот на фактурите (со банкарска сметка дефинирана за пренос на кредит) INVOICE_ADD_EPC_QR_CODEMore=Оваа функција ви овозможува да додадете или отстраните EPC QR-код на вашите фактури, што го олеснува автоматскиот трансфер на SEPA кредит. Овозможувањето на оваа опција им помага на вашите клиенти лесно да вршат плаќања со скенирање на QR-кодот, намалувајќи ги грешките за рачно внесување. Користете ја оваа функција ако имате клиенти во земји како Австрија, Белгија, Финска, Германија и Холандија каде што е поддржан овој систем. Оневозможете го ако не е потребно за вашите деловни операции или база на клиенти. -INVOICE_ADD_EPC_QR_CODEPay=Скенирајте го овој QR-код за да платите со паметен телефон што поддржува плаќање со EPC QR-код. INVOICE_SHOW_SHIPPING_ADDRESS=Прикажи адреса за испорака INVOICE_SHOW_SHIPPING_ADDRESSMore=Задолжителна индикација во некои земји (Франција, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/mk_MK/bills.lang b/htdocs/langs/mk_MK/bills.lang index de9e5d106a34f..35e9102c06df0 100644 --- a/htdocs/langs/mk_MK/bills.lang +++ b/htdocs/langs/mk_MK/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Пребарувајте неплате SendEmailsRemindersOnSupplierInvoiceDueDate=Испратете потсетник по е-пошта за потврдени и неплатени фактури од добавувачи PaymentMadeForSeveralInvoices=Исплата е извршена за неколку фактури SituationInvoiceProgressCurrent=Напредок на фактурата +INVOICE_ADD_EPC_QR_CODEPay=Скенирајте го овој QR-код за да платите со паметен телефон што поддржува плаќање со EPC QR-код. diff --git a/htdocs/langs/nb_NO/admin.lang b/htdocs/langs/nb_NO/admin.lang index 9cef76a1fdcf8..7d1fc71aeb6e1 100644 --- a/htdocs/langs/nb_NO/admin.lang +++ b/htdocs/langs/nb_NO/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Vis den sveitsiske QR-Bill-koden på fakturaer (med en INVOICE_ADD_SWISS_QR_CODEMore=Sveits sin standard for fakturaer; sørg for at ZIP & City er fylt ut og at kontoene har gyldige sveitsiske/liechtensteinske IBAN-er. INVOICE_ADD_EPC_QR_CODE=Vis EPC QR-koden på fakturaer (med en bankkonto definert for kredittoverføring) INVOICE_ADD_EPC_QR_CODEMore=Denne funksjonen lar deg legge til eller fjerne en EPC QR-kode på fakturaer, som forenkler automatiske SEPA-kredittoverføringer. Aktivering av dette alternativet hjelper kundene dine med å utføre betalinger enkelt ved å skanne QR-koden, noe som reduserer manuelle inntastingsfeil. Bruk denne funksjonen hvis du har kunder i land som Østerrike, Belgia, Finland, Tyskland, og Nederland hvor dette systemet støttes. Deaktiver den hvis den ikke er nødvendig for din forretningsdrift eller kundebase. -INVOICE_ADD_EPC_QR_CODEPay=Skann denne QR-koden for å betale med en smarttelefon som støtter betaling med EPC QR-kode. INVOICE_SHOW_SHIPPING_ADDRESS=Vis leveringsadresse INVOICE_SHOW_SHIPPING_ADDRESSMore=Obligatorisk indikasjon i noen land (Frankrike, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Vis faktureringskontakt på tilbud diff --git a/htdocs/langs/nb_NO/bills.lang b/htdocs/langs/nb_NO/bills.lang index 2e202f2974546..852253c0eb952 100644 --- a/htdocs/langs/nb_NO/bills.lang +++ b/htdocs/langs/nb_NO/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Søk ubetalte leverandørfakturaer med e SendEmailsRemindersOnSupplierInvoiceDueDate=Send påminnelse på epost for validerte og ubetalte leverandørfakturaer PaymentMadeForSeveralInvoices=Betaling utført for flere fakturaer SituationInvoiceProgressCurrent=Faktura fremdrift +INVOICE_ADD_EPC_QR_CODEPay=Skann denne QR-koden for å betale med en smarttelefon som støtter betaling med EPC QR-kode. diff --git a/htdocs/langs/nl_NL/admin.lang b/htdocs/langs/nl_NL/admin.lang index 959ce75b46b96..d61a3c2188188 100644 --- a/htdocs/langs/nl_NL/admin.lang +++ b/htdocs/langs/nl_NL/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Toon de Zwitserse QR-factuurcode op Facturen (met een INVOICE_ADD_SWISS_QR_CODEMore=De Zwitserse standaard voor facturen; zorg ervoor dat ZIP & City zijn ingevuld en dat de accounts geldige Zwitserse/Liechtensteinse IBAN's hebben. INVOICE_ADD_EPC_QR_CODE=Toon de EPC QR-code op Facturen (met een bankrekening gedefinieerd voor overboeking) INVOICE_ADD_EPC_QR_CODEMore=Met deze functie kunt u een EPC QR-code toevoegen aan of verwijderen van uw Facturen, wat automatische SEPA-overboekingen mogelijk maakt. Als u deze optie inschakelt, kunnen uw klanten eenvoudig betalingen uitvoeren door de QR-code te scannen, waardoor handmatige invoerfouten worden verminderd. Gebruik deze functie als u klanten heeft in landen als Oostenrijk, België, Finland, Duitsland en Nederland waar dit systeem wordt ondersteund. Schakel het uit als dit niet nodig is voor uw bedrijfsvoering of klantenbestand. -INVOICE_ADD_EPC_QR_CODEPay=Scan deze QR-code om te betalen met een smartphone die betaling met EPC QR-code ondersteunt. INVOICE_SHOW_SHIPPING_ADDRESS=Verzendadres tonen INVOICE_SHOW_SHIPPING_ADDRESSMore=Verplichte vermelding in sommige landen (Frankrijk, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Facturatiecontact weergeven op voorstel diff --git a/htdocs/langs/nl_NL/bills.lang b/htdocs/langs/nl_NL/bills.lang index b17e16d198d0f..40d21334d8cb4 100644 --- a/htdocs/langs/nl_NL/bills.lang +++ b/htdocs/langs/nl_NL/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Zoek onbetaalde Leverancier Facturen met SendEmailsRemindersOnSupplierInvoiceDueDate=Stuur een herinnering per e-mail voor gevalideerde en onbetaalde Leverancier Facturen PaymentMadeForSeveralInvoices=Betaling gedaan voor meerdere Facturen SituationInvoiceProgressCurrent=Factuur voortgang +INVOICE_ADD_EPC_QR_CODEPay=Scan deze QR-code om te betalen met een smartphone die betaling met EPC QR-code ondersteunt. diff --git a/htdocs/langs/pl_PL/admin.lang b/htdocs/langs/pl_PL/admin.lang index c7601810e89cb..024eb4b05997f 100644 --- a/htdocs/langs/pl_PL/admin.lang +++ b/htdocs/langs/pl_PL/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Szwajcarski standard dotyczący faktur; upewnij się, że kod pocztowy i miasto są wypełnione oraz że konta mają ważne numery IBAN w Szwajcarii/Liechtensteinie. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Pokaż adres wysyłki INVOICE_SHOW_SHIPPING_ADDRESSMore=Wskazanie obowiązkowe w niektórych krajach (Francja, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/pl_PL/bills.lang b/htdocs/langs/pl_PL/bills.lang index b3491637af80d..0996cdb8cc37d 100644 --- a/htdocs/langs/pl_PL/bills.lang +++ b/htdocs/langs/pl_PL/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/pt_PT/admin.lang b/htdocs/langs/pt_PT/admin.lang index 4058e9baf0cf8..72add87a78617 100644 --- a/htdocs/langs/pt_PT/admin.lang +++ b/htdocs/langs/pt_PT/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Padrão da Suíça para faturas; certifique-se de que o CEP e a cidade estejam preenchidos e e que as contas tenham IBANs válidos na Suíça/Liechtenstein. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Mostrar endereço de entrega INVOICE_SHOW_SHIPPING_ADDRESSMore=Indicação obrigatória em alguns países (França, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/pt_PT/bills.lang b/htdocs/langs/pt_PT/bills.lang index 9aa8dd7e5a438..229c4e3b3a20b 100644 --- a/htdocs/langs/pt_PT/bills.lang +++ b/htdocs/langs/pt_PT/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/ro_RO/admin.lang b/htdocs/langs/ro_RO/admin.lang index 057e585336c9d..80b5d5b7ee9ea 100644 --- a/htdocs/langs/ro_RO/admin.lang +++ b/htdocs/langs/ro_RO/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Afișare cod QR-Bill elevețian pe facturi (cu un cont INVOICE_ADD_SWISS_QR_CODEMore=Standardul elvețian pentru facturi; asigură-te că sunt completate codul poștal și orașul și că conturile bancare au coduri IBAN elvețiene/Liechtenstein valide. INVOICE_ADD_EPC_QR_CODE=Afișare cod QR EPC pe facturi (cu un cont bancar definit pentru transfer de credit) INVOICE_ADD_EPC_QR_CODEMore=Această caracteristică îți permite să adaugi sau să elimini un cod QR EPC pe facturi, ceea ce facilitează transferurile automate de credit SEPA. Activarea acestei opțiuni ajută clienții să efectueze plăți cu ușurință prin scanarea codului QR, reducând erorile de introducere manuală. Utilizează această funcție dacă ai clienți în țări precum Austria, Belgia, Finlanda, Germania și Țările de Jos, unde acest sistem este acceptat. Dezactivează-l dacă nu este necesar pentru operațiunile tale de afaceri sau pentru baza de clienți. -INVOICE_ADD_EPC_QR_CODEPay=Scanează acest cod QR pentru a plăti cu un smartphone care acceptă plata cu codul QR EPC. INVOICE_SHOW_SHIPPING_ADDRESS=Afișează adresa de livrare INVOICE_SHOW_SHIPPING_ADDRESSMore=Mențiune obligatorie în unele țări (Franța, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Afișare persoană de contact pentru facturare pe oferta comercială diff --git a/htdocs/langs/ro_RO/bills.lang b/htdocs/langs/ro_RO/bills.lang index 698d62ccb57d9..76e8cb21c7f3b 100644 --- a/htdocs/langs/ro_RO/bills.lang +++ b/htdocs/langs/ro_RO/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Căutați facturile furnizorilor neplăt SendEmailsRemindersOnSupplierInvoiceDueDate=Trimite reminder prin email pentru facturile furnizor validate și neplătite PaymentMadeForSeveralInvoices=Plată efectuată pentru mai multe facturi SituationInvoiceProgressCurrent=Progres facturare +INVOICE_ADD_EPC_QR_CODEPay=Scanează acest cod QR pentru a plăti cu un smartphone care acceptă plata cu codul QR EPC. diff --git a/htdocs/langs/ru_RU/admin.lang b/htdocs/langs/ru_RU/admin.lang index 3d9bd9d8e2ea4..93e70c251507c 100644 --- a/htdocs/langs/ru_RU/admin.lang +++ b/htdocs/langs/ru_RU/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=стандартный из Швейцарии для счета-фактуры; убедитесь, что почтовый индекс и город заполнены и, что счета имеют действительные номера IBAN Швейцарии/Лихтенштейна. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Показать перевозка адрес INVOICE_SHOW_SHIPPING_ADDRESSMore=Обязательное указание в некоторых странах (Франция, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/ru_RU/bills.lang b/htdocs/langs/ru_RU/bills.lang index adda512039279..5a7402fd5e9ab 100644 --- a/htdocs/langs/ru_RU/bills.lang +++ b/htdocs/langs/ru_RU/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/sk_SK/admin.lang b/htdocs/langs/sk_SK/admin.lang index 5dc606e01b948..bd31d1905b6ee 100644 --- a/htdocs/langs/sk_SK/admin.lang +++ b/htdocs/langs/sk_SK/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Švajčiarsky štandard pre faktúry; uistite sa, že sú vyplnené PSČ a mesto a že účty majú platné švajčiarske/lichtenštajnské IBAN. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Zobraziť dodaciu adresu INVOICE_SHOW_SHIPPING_ADDRESSMore=Povinná indikácia v niektorých krajinách (Francúzsko, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/sk_SK/bills.lang b/htdocs/langs/sk_SK/bills.lang index 41d75bbe2b2ad..ab8b81adc21e7 100644 --- a/htdocs/langs/sk_SK/bills.lang +++ b/htdocs/langs/sk_SK/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Vyhľadajte nezaplatené dodávateľské SendEmailsRemindersOnSupplierInvoiceDueDate=Pošlite e-mailom upomienku na overené a nezaplatené dodávateľské faktúry PaymentMadeForSeveralInvoices=Úhrada viacerých faktúr SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/sl_SI/admin.lang b/htdocs/langs/sl_SI/admin.lang index 61dc3b2a39705..a2c69f142e488 100644 --- a/htdocs/langs/sl_SI/admin.lang +++ b/htdocs/langs/sl_SI/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=švicarski standard za račune; preverite, ali sta izpolnjena ZIP & City in ali imajo računi veljavne številke IBAN za Švico/Lihtenštajn. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Pokaži naslov za dostavo INVOICE_SHOW_SHIPPING_ADDRESSMore=Obvezna navedba v nekaterih državah (Francija, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/sl_SI/bills.lang b/htdocs/langs/sl_SI/bills.lang index 4dffc1066502e..1f0681afb5e05 100644 --- a/htdocs/langs/sl_SI/bills.lang +++ b/htdocs/langs/sl_SI/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/sq_AL/admin.lang b/htdocs/langs/sq_AL/admin.lang index 3973a8884f121..291be875f0c99 100644 --- a/htdocs/langs/sq_AL/admin.lang +++ b/htdocs/langs/sq_AL/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Standardi i Zvicrës për faturat; sigurohuni që ZIP & City të jenë të mbushura dhe që llogaritë të kenë IBAN të vlefshme zvicerane/Lihtenshtajn. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Trego adresën e transportit INVOICE_SHOW_SHIPPING_ADDRESSMore=Tregimi i detyrueshëm në disa vende (Francë, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/sq_AL/bills.lang b/htdocs/langs/sq_AL/bills.lang index b7dc23e5a12e8..8e0208db8a443 100644 --- a/htdocs/langs/sq_AL/bills.lang +++ b/htdocs/langs/sq_AL/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Kërkoni faturat e papaguara të furnizu SendEmailsRemindersOnSupplierInvoiceDueDate=Dërgoni kujtesë me email për faturat e furnizuesit të vërtetuara dhe të papaguara PaymentMadeForSeveralInvoices=Pagesa është bërë për disa fatura SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/sr_RS/admin.lang b/htdocs/langs/sr_RS/admin.lang index 8726cb0c671df..86a0af367b4ef 100644 --- a/htdocs/langs/sr_RS/admin.lang +++ b/htdocs/langs/sr_RS/admin.lang @@ -2394,7 +2394,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP & City are filled and that the accounts have valid Swiss/Liechtenstein IBANs. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/sr_RS/bills.lang b/htdocs/langs/sr_RS/bills.lang index 9f4d3cc2def98..e258ce3ec9ff2 100644 --- a/htdocs/langs/sr_RS/bills.lang +++ b/htdocs/langs/sr_RS/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/sv_SE/admin.lang b/htdocs/langs/sv_SE/admin.lang index de6373e2f4232..8aac314ab4ede 100644 --- a/htdocs/langs/sv_SE/admin.lang +++ b/htdocs/langs/sv_SE/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Schweiz standard för fakturor; se till att ZIP & City är ifyllda och att kontona har giltiga schweiziska/Liechtenstein IBAN. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Visa leveransadress INVOICE_SHOW_SHIPPING_ADDRESSMore=Obligatorisk indikation i vissa länder (Frankrike, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/sv_SE/bills.lang b/htdocs/langs/sv_SE/bills.lang index 02e7dd03856f5..69eae3f470651 100644 --- a/htdocs/langs/sv_SE/bills.lang +++ b/htdocs/langs/sv_SE/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Sök efter obetalda leverantörsfakturor SendEmailsRemindersOnSupplierInvoiceDueDate=Skicka påminnelse via e-post för validerade och obetalda leverantörsfakturor PaymentMadeForSeveralInvoices=Betalning gjord för flera fakturor SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/sw_SW/admin.lang b/htdocs/langs/sw_SW/admin.lang index 2c41f1f6f80df..8cad214e0297b 100644 --- a/htdocs/langs/sw_SW/admin.lang +++ b/htdocs/langs/sw_SW/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP & City are filled and that the accounts have valid Swiss/Liechtenstein IBANs. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Onyesha anwani ya usafirishaji INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/sw_SW/bills.lang b/htdocs/langs/sw_SW/bills.lang index 47174c1b208fd..101ed317f5434 100644 --- a/htdocs/langs/sw_SW/bills.lang +++ b/htdocs/langs/sw_SW/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/ta_IN/admin.lang b/htdocs/langs/ta_IN/admin.lang index 8647715b238e1..6613fac7972b3 100644 --- a/htdocs/langs/ta_IN/admin.lang +++ b/htdocs/langs/ta_IN/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Switzerland's standard for invoices; make sure ZIP & City are filled and that the accounts have valid Swiss/Liechtenstein IBANs. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Show shipping address INVOICE_SHOW_SHIPPING_ADDRESSMore=Compulsory indication in some countries (France, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/ta_IN/bills.lang b/htdocs/langs/ta_IN/bills.lang index 563e67c58d792..da82f3233b97f 100644 --- a/htdocs/langs/ta_IN/bills.lang +++ b/htdocs/langs/ta_IN/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/tg_TJ/admin.lang b/htdocs/langs/tg_TJ/admin.lang index 79453eb810fe8..ed58b40c9d5de 100644 --- a/htdocs/langs/tg_TJ/admin.lang +++ b/htdocs/langs/tg_TJ/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Стандарти Швейтсария барои ҳисобнома-фактураҳо; Боварӣ ҳосил кунед, ки ZIP & City пур карда шудааст ва ҳисобҳо IBAN-ҳои дурусти Швейтсария/Лихтенштейн доранд. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Нишон додани суроғаи интиқол INVOICE_SHOW_SHIPPING_ADDRESSMore=Нишондиҳии ҳатмӣ дар баъзе кишварҳо (Фаронса, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/tg_TJ/bills.lang b/htdocs/langs/tg_TJ/bills.lang index 5b5b796a6f76b..0e74e4f4fae9f 100644 --- a/htdocs/langs/tg_TJ/bills.lang +++ b/htdocs/langs/tg_TJ/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Ҷустуҷӯи ҳисобнома-фа SendEmailsRemindersOnSupplierInvoiceDueDate=Ёдраскуниро тавассути почтаи электронӣ барои ҳисобнома-фактураҳои таъминкунандаи тасдиқшуда ва пардохтнашуда фиристед PaymentMadeForSeveralInvoices=Пардохт барои якчанд ҳисобнома-фактураҳо SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/th_TH/admin.lang b/htdocs/langs/th_TH/admin.lang index 1ae2f55e46f94..6ecc4374ee6a6 100644 --- a/htdocs/langs/th_TH/admin.lang +++ b/htdocs/langs/th_TH/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=มาตรฐานของสวิตเซอร์แลนด์สำหรับใบแจ้งหนี้ ตรวจสอบให้แน่ใจว่าได้กรอกรหัสไปรษณีย์และเมืองแล้ว และบัญชีมี IBAN ของสวิส/ลิกเตนสไตน์ที่ถูกต้อง INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=แสดงที่อยู่ในการจัดส่ง INVOICE_SHOW_SHIPPING_ADDRESSMore=ข้อบ่งชี้ภาคบังคับในบางประเทศ (ฝรั่งเศส, ... ) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/th_TH/bills.lang b/htdocs/langs/th_TH/bills.lang index 8f1fc5a998ab9..b88999bea6b11 100644 --- a/htdocs/langs/th_TH/bills.lang +++ b/htdocs/langs/th_TH/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/tr_TR/admin.lang b/htdocs/langs/tr_TR/admin.lang index bbaf58885192e..3f44091dca330 100644 --- a/htdocs/langs/tr_TR/admin.lang +++ b/htdocs/langs/tr_TR/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Faturalarda İsviçre QR-Bill kodunu gösterin (kredi INVOICE_ADD_SWISS_QR_CODEMore=İsviçre'nin faturalara ilişkin standardı; ZIP ve Şehir bilgilerinin doldurulduğundan ve hesapların geçerli İsviçre/Lihtenştayn IBAN'larına sahip olduğundan emin olun. INVOICE_ADD_EPC_QR_CODE=Faturalarda EPC QR kodunu gösterin (kredi transferi için tanımlanmış bir banka hesabıyla) INVOICE_ADD_EPC_QR_CODEMore=Bu özellik, faturalarınıza otomatik SEPA kredi transferlerini kolaylaştıran bir EPC QR Kodu eklemenizi veya kaldırmanızı sağlar. Bu seçeneğin etkinleştirilmesi, müşterilerinizin QR kodunu tarayarak kolayca ödeme yapmasına yardımcı olur ve manuel giriş hatalarını azaltır. Bu sistemin desteklendiği Avusturya, Belçika, Finlandiya, Almanya ve Hollanda gibi ülkelerde müşterileriniz varsa bu özelliği kullanın. Ticari faaliyetleriniz veya müşteri tabanınız için gerekli değilse bunu devre dışı bırakın. -INVOICE_ADD_EPC_QR_CODEPay=EPC QR koduyla ödemeyi destekleyen bir akıllı telefonla ödeme yapmak için bu QR kodunu tarayın. INVOICE_SHOW_SHIPPING_ADDRESS=Teslimat adresini göster INVOICE_SHOW_SHIPPING_ADDRESSMore=Bazı ülkelerde zorunlu gösterge (Fransa, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Teklifte fatura ilgilisini göster diff --git a/htdocs/langs/tr_TR/bills.lang b/htdocs/langs/tr_TR/bills.lang index 6ff111049b1e0..cbaec2bc07c94 100644 --- a/htdocs/langs/tr_TR/bills.lang +++ b/htdocs/langs/tr_TR/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Doğrulama tarihi = %s olan ödenmemiş SendEmailsRemindersOnSupplierInvoiceDueDate=Doğrulanmış ve ödenmemiş tedarikçi faturaları için e-postayla hatırlatma gönder PaymentMadeForSeveralInvoices=Birden fazla fatura için ödeme yapıldı SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=EPC QR koduyla ödemeyi destekleyen bir akıllı telefonla ödeme yapmak için bu QR kodunu tarayın. diff --git a/htdocs/langs/uk_UA/admin.lang b/htdocs/langs/uk_UA/admin.lang index 4c9f70e2e9f16..04bed7ced27e6 100644 --- a/htdocs/langs/uk_UA/admin.lang +++ b/htdocs/langs/uk_UA/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Швейцарський стандарт для рахунків-фактур; переконайтеся, що заповнено поштовий індекс і місто, а облікові записи мають дійсні номери IBAN у Швейцарії/Ліхтенштейні. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Показати адресу доставки INVOICE_SHOW_SHIPPING_ADDRESSMore=Обов'язкове зазначення в деяких країнах (Франція, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/uk_UA/bills.lang b/htdocs/langs/uk_UA/bills.lang index 8ac83eeb1499e..2a013afda6cb2 100644 --- a/htdocs/langs/uk_UA/bills.lang +++ b/htdocs/langs/uk_UA/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Пошук неоплачених рах SendEmailsRemindersOnSupplierInvoiceDueDate=Надсилайте нагадування електронною поштою про перевірені та неоплачені рахунки-фактури постачальників PaymentMadeForSeveralInvoices=Оплата здійснена за кількома рахунками SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/ur_PK/admin.lang b/htdocs/langs/ur_PK/admin.lang index d92b54bc44fb1..41c6dcdaf0784 100644 --- a/htdocs/langs/ur_PK/admin.lang +++ b/htdocs/langs/ur_PK/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=انوائس کے لیے سوئٹزرلینڈ کا معیار؛ یقینی بنائیں کہ زپ اور سٹی بھرے ہوئے ہیں اور یہ کہ اکاؤنٹس میں درست سوئس/لیچٹینسٹائن IBANs ہیں۔ INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=شپنگ ایڈریس دکھائیں۔ INVOICE_SHOW_SHIPPING_ADDRESSMore=کچھ ممالک میں لازمی اشارہ (فرانس، ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/ur_PK/bills.lang b/htdocs/langs/ur_PK/bills.lang index ccf2f5f59f285..d1562dea4cd41 100644 --- a/htdocs/langs/ur_PK/bills.lang +++ b/htdocs/langs/ur_PK/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/uz_UZ/admin.lang b/htdocs/langs/uz_UZ/admin.lang index 6bc84fe6abec8..d46a2edb0e4bb 100644 --- a/htdocs/langs/uz_UZ/admin.lang +++ b/htdocs/langs/uz_UZ/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Hisob-fakturalar uchun Shveytsariya standarti; ZIP & City toʻldirilganligiga va hisoblarda Shveytsariya/Lixtenshteyn IBAN’lari mavjudligiga ishonch hosil qiling. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Yetkazib berish manzilini ko'rsatish INVOICE_SHOW_SHIPPING_ADDRESSMore=Ba'zi mamlakatlarda majburiy ko'rsatma (Frantsiya, ...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/uz_UZ/bills.lang b/htdocs/langs/uz_UZ/bills.lang index 64399365a39fe..1ace686672a2b 100644 --- a/htdocs/langs/uz_UZ/bills.lang +++ b/htdocs/langs/uz_UZ/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Tasdiqlash sanasi bilan toʻlanmagan yet SendEmailsRemindersOnSupplierInvoiceDueDate=Tasdiqlangan va toʻlanmagan yetkazib beruvchi hisob-fakturalari uchun elektron pochta orqali eslatma yuboring PaymentMadeForSeveralInvoices=Bir nechta hisob-fakturalar uchun to'lov amalga oshirildi SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/vi_VN/admin.lang b/htdocs/langs/vi_VN/admin.lang index f415bc5c5a12a..490665e343b7d 100644 --- a/htdocs/langs/vi_VN/admin.lang +++ b/htdocs/langs/vi_VN/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=Tiêu chuẩn hóa đơn của Thụy Sĩ; đảm bảo ZIP & Thành phố được điền đầy đủ và các tài khoản có IBAN Thụy Sĩ/Liechtenstein hợp lệ. INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=Hiển thị địa chỉ giao hàng INVOICE_SHOW_SHIPPING_ADDRESSMore=Chỉ định bắt buộc ở một số nước (Pháp,...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/vi_VN/bills.lang b/htdocs/langs/vi_VN/bills.lang index 2801323deaa6f..ab400e858c8b1 100644 --- a/htdocs/langs/vi_VN/bills.lang +++ b/htdocs/langs/vi_VN/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Tìm kiếm hóa đơn nhà cung cấp c SendEmailsRemindersOnSupplierInvoiceDueDate=Gửi lời nhắc qua email cho các hóa đơn nhà cung cấp đã được xác thực và chưa thanh toán PaymentMadeForSeveralInvoices=thanh toán được tạo cho nhiều hóa đơn SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. diff --git a/htdocs/langs/zh_CN/admin.lang b/htdocs/langs/zh_CN/admin.lang index 0a3c444da9206..69a4ca8b53b14 100644 --- a/htdocs/langs/zh_CN/admin.lang +++ b/htdocs/langs/zh_CN/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=在(已设置银行转账所用的银行账户)发 INVOICE_ADD_SWISS_QR_CODEMore=瑞士发票标准;确保填写邮政编码和城市,并且帐户具有有效的瑞士/列支敦士登 IBAN。 INVOICE_ADD_EPC_QR_CODE=在(已设置银行转账所用的银行账户)发票上的显示EPC QR代码 INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=扫描此二维码,使用支持EPC QR代码支付的智能手机付款。 INVOICE_SHOW_SHIPPING_ADDRESS=显示货运目的地址 INVOICE_SHOW_SHIPPING_ADDRESSMore=某些国家/地区的强制指示(法国、...) SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/zh_CN/bills.lang b/htdocs/langs/zh_CN/bills.lang index 9293d5f4c4e28..dc15dd5497b32 100644 --- a/htdocs/langs/zh_CN/bills.lang +++ b/htdocs/langs/zh_CN/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=搜索确认日期 = %s 的未付供应 SendEmailsRemindersOnSupplierInvoiceDueDate=为已确认并且未付款的供应商发票发送提醒电子邮件 PaymentMadeForSeveralInvoices=多张发票的付款 SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=扫描此二维码,使用支持EPC QR代码支付的智能手机付款。 diff --git a/htdocs/langs/zh_HK/admin.lang b/htdocs/langs/zh_HK/admin.lang index a5a4a8c20f82d..612f29561cf98 100644 --- a/htdocs/langs/zh_HK/admin.lang +++ b/htdocs/langs/zh_HK/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=在發票上顯示瑞士 QR-Bill 碼(已定義信用 INVOICE_ADD_SWISS_QR_CODEMore=瑞士發票標準;確保填寫郵遞區號和城市,且賬戶具有有效的瑞士/列支敦士登 IBAN。 INVOICE_ADD_EPC_QR_CODE=在發票上顯示 EPC QR 碼(已定義信用轉帳的銀行賬戶) INVOICE_ADD_EPC_QR_CODEMore=此功能允許您在發票上新增或刪除 EPC QR 碼,這有助於自動進行 SEPA 信用轉帳。啟用此選項可以幫助您的客戶輕鬆地掃描 QR 碼進行付款,減少手動輸入錯誤。如果您有來自奧地利、比利時、芬蘭、德國和荷蘭等支持此系統的國家的客戶,請使用此功能。如果您的業務運營或客戶群不需要它,則禁用此功能。 -INVOICE_ADD_EPC_QR_CODEPay=掃描此 QR 碼以使用支持 EPC QR 碼付款的智能手機進行付款。 INVOICE_SHOW_SHIPPING_ADDRESS=顯示送貨地址 INVOICE_SHOW_SHIPPING_ADDRESSMore=在某些國家(如法國)為強制性指示 SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=在提案上顯示帳單聯絡人 diff --git a/htdocs/langs/zh_HK/bills.lang b/htdocs/langs/zh_HK/bills.lang index 5c9a25bed41a0..d5f5e77f3450c 100644 --- a/htdocs/langs/zh_HK/bills.lang +++ b/htdocs/langs/zh_HK/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=搜索驗證日期為 %s 的未付款供 SendEmailsRemindersOnSupplierInvoiceDueDate=通過電子郵件發送已驗證和未付款供應商發票的提醒 PaymentMadeForSeveralInvoices=已為多張發票付款 SituationInvoiceProgressCurrent=發票進度 +INVOICE_ADD_EPC_QR_CODEPay=掃描此 QR 碼以使用支持 EPC QR 碼付款的智能手機進行付款。 diff --git a/htdocs/langs/zh_TW/admin.lang b/htdocs/langs/zh_TW/admin.lang index f961abbe67bca..246d3eb309965 100644 --- a/htdocs/langs/zh_TW/admin.lang +++ b/htdocs/langs/zh_TW/admin.lang @@ -2393,7 +2393,6 @@ INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices (with a bank a INVOICE_ADD_SWISS_QR_CODEMore=瑞士的發票標準:請確保郵遞區號和城市已填寫,並且帳戶擁有有效的瑞士/列支敦士登IBAN INVOICE_ADD_EPC_QR_CODE=Show the EPC QR code on invoices (with a bank account defined for credit transfer) INVOICE_ADD_EPC_QR_CODEMore=This feature allows you to add or remove an EPC QR Code on your invoices, which facilitates automatic SEPA credit transfers. Enabling this option helps your clients make payments easily by scanning the QR code, reducing manual entry errors. Use this feature if you have clients in countries like Austria, Belgium, Finland, Germany, and the Netherlands where this system is supported. Disable it if it's not required for your business operations or client base. -INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. INVOICE_SHOW_SHIPPING_ADDRESS=顯示送貨地址 INVOICE_SHOW_SHIPPING_ADDRESSMore=在一些國家(如法國等),這是強制性的指示 SUPPLIER_PROPOSAL_ADD_BILLING_CONTACT=Show billing contact on proposal diff --git a/htdocs/langs/zh_TW/bills.lang b/htdocs/langs/zh_TW/bills.lang index dd3f41b51b6df..be3ba5ef165aa 100644 --- a/htdocs/langs/zh_TW/bills.lang +++ b/htdocs/langs/zh_TW/bills.lang @@ -669,3 +669,4 @@ SearchValidatedSupplierInvoicesWithDate=Search unpaid supplier invoices with a v SendEmailsRemindersOnSupplierInvoiceDueDate=Send reminder by email for validated and unpaid supplier invoices PaymentMadeForSeveralInvoices=Payment made for several invoices SituationInvoiceProgressCurrent=Invoice progress +INVOICE_ADD_EPC_QR_CODEPay=Scan this QR code to pay with a smartphone supporting payment with EPC QR code. From 90a545637ec40a6ea4daab4060435d141278771b Mon Sep 17 00:00:00 2001 From: kkhelifa-opendsi Date: Sat, 19 Oct 2024 01:38:36 +0200 Subject: [PATCH 13/17] NEW : Add hook after the line is processed in the sell journal page (#31439) --- htdocs/accountancy/journal/sellsjournal.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 694cf1df68ff6..620bea2ba40e9 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -377,6 +377,23 @@ 'code_compta' => $compta_soc ); + // After the line is processed + $parameters = array( + 'obj' => $obj, + 'tabfac' => &$tabfac, + 'tabht' => &$tabht, + 'tabtva' => &$tabtva, + 'def_tva' => &$def_tva, + 'tabwarranty' => &$tabwarranty, + 'tabrevenuestamp' => &$tabrevenuestamp, + 'tabttc' => &$tabttc, + 'tablocaltax1' => &$tablocaltax1, + 'tablocaltax2' => &$tablocaltax2, + 'tabcompany' => &$tabcompany, + 'vatdata_cache' => &$vatdata_cache, + ); + $reshook = $hookmanager->executeHooks('processingJournalData', $parameters); // Note that $action and $object may have been modified by hook + $i++; // Check for too many lines. From 1ef98c3a6f5c14151d6b958b8341ab2bf531ab1e Mon Sep 17 00:00:00 2001 From: Alain Rihs Date: Sat, 19 Oct 2024 01:58:27 +0200 Subject: [PATCH 14/17] Update functions.lib.php (#31455) The language key for the foreign currency does not exist alone but always with the amount. In order to solve this, I propose the following code with a new key: __MULTICURRENCY_CODE__ --- htdocs/core/lib/functions.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index ae4cd5bca1575..9b8e118d26ebb 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9469,6 +9469,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, $substitutionarray['__AMOUNT_MULTICURRENCY__'] = (is_object($object) && isset($object->multicurrency_total_ttc)) ? $object->multicurrency_total_ttc : ''; $substitutionarray['__AMOUNT_MULTICURRENCY_TEXT__'] = (is_object($object) && isset($object->multicurrency_total_ttc)) ? dol_convertToWord($object->multicurrency_total_ttc, $outputlangs, '', true) : ''; $substitutionarray['__AMOUNT_MULTICURRENCY_TEXTCURRENCY__'] = (is_object($object) && isset($object->multicurrency_total_ttc)) ? dol_convertToWord($object->multicurrency_total_ttc, $outputlangs, $object->multicurrency_code, true) : ''; + $substitutionarray['__MULTICURRENCY_CODE__'] = (is_object($object) && isset($object->multicurrency_code)) ? $object->multicurrency_code : ''; // TODO Add other keys for foreign multicurrency // For backward compatibility From 0bdd209d06666e7caf0889c7c1ea75263384eb5a Mon Sep 17 00:00:00 2001 From: Alexandre Janniaux Date: Sat, 19 Oct 2024 03:37:44 +0200 Subject: [PATCH 15/17] QUAL: AccountancySystem: maintenance work to uniformize and clean up (#31391) * accountancysystem: inherit CommonObject This provides the common methods on the database objects like error handling. * accountancysystem: improve error reporting Forward the database error to the caller when an error happens. * accountancysystem: clean up class The fields that were completely unused are removed. $ref is still kept since it was filled by AccountancySystem::fetch(), but marqued as deprecated to incite using the newer more descriptive pcg_version field. * Update accountancysystem.class.php --------- Co-authored-by: Laurent Destailleur --- .../class/accountancysystem.class.php | 36 ++++--------------- 1 file changed, 6 insertions(+), 30 deletions(-) diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index bfdee1331b3e0..980779ff25461 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -28,7 +28,7 @@ /** * Class to manage accountancy systems */ -class AccountancySystem +class AccountancySystem extends CommonObject { /** * @var DoliDB Database handler. @@ -58,17 +58,13 @@ class AccountancySystem public $rowid; /** - * @var int ID - */ - public $fk_pcg_version; - - /** - * @var int pcg version + * @var string Accountancy system code */ public $pcg_version; /** - * @var string ref + * @var string Ref of accountancy system. Duplicate property with ->pcg_version. + * @see $pcg_version */ public $ref; @@ -77,31 +73,11 @@ class AccountancySystem */ public $active; - /** - * @var string pcg type - */ - public $pcg_type; - - /** - * @var string Accountancy System numero - */ - public $numero; - /** * @var string Accountancy System label */ public $label; - /** - * @var string account number - */ - public $account_number; - - /** - * @var string account parent - */ - public $account_parent; - /** * Constructor * @@ -190,12 +166,12 @@ public function create($user) $result = $this->rowid; } else { $result = - 2; - $this->error = "AccountancySystem::Create Error $result"; + $this->error = "AccountancySystem::Create Error $result: " . $this->db->lasterror(); dol_syslog($this->error, LOG_ERR); } } else { $result = - 1; - $this->error = "AccountancySystem::Create Error $result"; + $this->error = "AccountancySystem::Create Error $result: " . $this->db->lasterror(); dol_syslog($this->error, LOG_ERR); } From 0be87db4db61f19e1298af40739b68e104c9c18c Mon Sep 17 00:00:00 2001 From: William Mead Date: Sat, 19 Oct 2024 03:40:46 +0200 Subject: [PATCH 16/17] Qual isolate supplier invoice line classes to separate files (#31121) * Moved supplier invoice line class to separate file. Added contributor details. * Moved supplier invoice rec line class to separate file. Cleaned requires. * Updated ChangeLog * Fixed typo * Updated PHPDoc * Fixed Phantom warnings * Fixed pre-commit * Fixed PHPDoc --------- Co-authored-by: Laurent Destailleur --- ChangeLog | 2 +- .../class/fournisseur.facture-rec.class.php | 274 +----- .../fournisseur.facture-rec.ligne.class.php | 396 +++++++++ .../fourn/class/fournisseur.facture.class.php | 795 +---------------- .../class/fournisseur.facture.ligne.class.php | 839 ++++++++++++++++++ 5 files changed, 1238 insertions(+), 1068 deletions(-) create mode 100644 htdocs/fourn/class/fournisseur.facture-rec.ligne.class.php create mode 100644 htdocs/fourn/class/fournisseur.facture.ligne.class.php diff --git a/ChangeLog b/ChangeLog index 43f08b4108002..4fc1a6136811f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,7 +11,7 @@ NEW value for FICHINTER_DISABLE_DETAILS. If FICHINTER_DISABLE_DETAILS is set to For developers: --------------- - +QUAL line classes for various business object classes have been moved to individual files. WARNING: diff --git a/htdocs/fourn/class/fournisseur.facture-rec.class.php b/htdocs/fourn/class/fournisseur.facture-rec.class.php index b357695504c05..71ee9c34142cf 100644 --- a/htdocs/fourn/class/fournisseur.facture-rec.class.php +++ b/htdocs/fourn/class/fournisseur.facture-rec.class.php @@ -33,6 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture-rec.ligne.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; @@ -1997,276 +1998,3 @@ public function setModelPdf($model) } } } - - - -/** - * Class to manage supplier invoice lines of templates. - * Saved into database table llx_facture_fourn_det_rec - */ -class FactureFournisseurLigneRec extends CommonInvoiceLine -{ - /** - * @var string ID to identify managed object - */ - public $element = 'invoice_supplier_det_rec'; - - /** - * @var string Name of table without prefix where object is stored - */ - public $table_element = 'facture_fourn_det_rec'; - - public $fk_facture_fourn; - public $fk_parent; - public $fk_product; - public $ref_supplier; - public $label; - /** - * @deprecated Use desc - */ - public $description; - public $pu_ht; - public $pu_ttc; - - /** - * @var float Quantity - */ - public $qty; - public $remise_percent; - public $fk_remise_except; - public $vat_src_code; - public $tva_tx; - public $localtax1_tx; - public $localtax1_type; - public $localtax2_tx; - public $localtax2_type; - - public $product_type; - public $date_start; - public $date_end; - public $info_bits; - - /** - * @var int special code - */ - public $special_code; - public $rang; - - public $fk_user_author; - public $fk_user_modif; - - - /** - * Delete supplier order template line in database - * - * @param User $user Object user - * @param int $notrigger Disable triggers - * @return int Return integer <0 if KO, >0 if OK - */ - public function delete(User $user, $notrigger = 0) - { - $error = 0; - $this->db->begin(); - - if (! $error) { - if (! $notrigger) { - // Call triggers - $result = $this->call_trigger('LINESUPPLIERBILLREC_DELETE', $user); - if ($result < 0) { - $error++; - } // Do also here what you must do to rollback action if trigger fail - // End call triggers - } - } - - if (! $error) { - $result = $this->deleteExtraFields(); - if ($result < 0) { - $error++; - } - } - - if (! $error) { - $sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element . ' WHERE rowid=' . (int) $this->id; - - $res = $this->db->query($sql); - if ($res === false) { - $error++; - $this->errors[] = $this->db->lasterror(); - } - } - - // Commit or rollback - if ($error) { - $this->db->rollback(); - return -1; - } else { - $this->db->commit(); - return 1; - } - } - - - /** - * Get line of template invoice - * - * @param int $rowid Id of invoice - * @return int 1 if OK, < 0 if KO - */ - public function fetch($rowid) - { - $sql = 'SELECT l.rowid,'; - $sql .= ' l.fk_facture_fourn, l.fk_parent_line, l.fk_product,'; - $sql .= ' l.ref as ref_supplier, l.label, l.description as line_desc, l.pu_ht, l.pu_ttc, l.qty, l.remise_percent, l.fk_remise_except,'; - $sql .= ' l.vat_src_code, l.tva_tx, l.localtax1_tx, l.localtax1_type, l.localtax2_tx, l.localtax2_type,'; - $sql .= ' l.total_ht, l.total_tva, l.total_localtax1, l.total_localtax2, l.total_ttc,'; - $sql .= ' l.product_type, l.date_start, l.date_end,'; - $sql .= ' l.info_bits, l.special_code, l.rang, l.fk_unit, l.import_key,'; - $sql .= ' l.fk_user_author, l.fk_user_modif, l.fk_multicurrency,'; - $sql .= ' l.multicurrency_code, l.multicurrency_subprice, l.multicurrency_total_ht, l.multicurrency_total_tva, l.multicurrency_total_ttc,'; - $sql .= ' p.ref as product_ref, p.fk_product_type as fk_product_type, p.label as product_label, p.description as product_desc'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det_rec as l'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid'; - $sql .= ' WHERE l.rowid = '. (int) $rowid; - $sql .= ' ORDER BY l.rang'; - - dol_syslog('FactureRec::fetch', LOG_DEBUG); - $result = $this->db->query($sql); - if ($result) { - $objp = $this->db->fetch_object($result); - - $this->id = $objp->rowid; - $this->fk_facture_fourn = $objp->fk_facture_fourn; - $this->fk_parent = $objp->fk_parent_line; - $this->fk_product = $objp->fk_product; - $this->ref_supplier = $objp->ref_supplier; - $this->label = $objp->label; - $this->description = $objp->line_desc; - $this->desc = $objp->line_desc; - $this->pu_ht = $objp->pu_ht; - $this->pu_ttc = $objp->pu_ttc; - $this->qty = $objp->qty; - $this->remise_percent = $objp->remise_percent; - $this->fk_remise_except = $objp->fk_remise_except; - $this->vat_src_code = $objp->vat_src_code; - $this->tva_tx = $objp->tva_tx; - $this->localtax1_tx = $objp->localtax1_tx; - $this->localtax1_type = $objp->localtax1_type; - $this->localtax2_tx = $objp->localtax2_tx; - $this->localtax2_type = $objp->localtax2_type; - $this->total_ht = $objp->total_ht; - $this->total_tva = $objp->total_tva; - $this->total_localtax1 = $objp->total_localtax1; - $this->total_localtax2 = $objp->total_localtax2; - $this->total_ttc = $objp->total_ttc; - $this->product_type = $objp->product_type; - $this->date_start = $objp->date_start; - $this->date_end = $objp->date_end; - $this->info_bits = $objp->info_bits; - $this->special_code = $objp->special_code; - $this->rang = $objp->rang; - $this->fk_unit = $objp->fk_unit; - $this->import_key = $objp->import_key; - $this->fk_user_author = $objp->fk_user_author; - $this->fk_user_modif = $objp->fk_user_modif; - $this->fk_multicurrency = $objp->fk_multicurrency; - $this->multicurrency_code = $objp->multicurrency_code; - $this->multicurrency_subprice = $objp->multicurrency_subprice; - $this->multicurrency_total_ht = $objp->multicurrency_total_ht; - $this->multicurrency_total_tva = $objp->multicurrency_total_tva; - $this->multicurrency_total_ttc = $objp->multicurrency_total_ttc; - - $this->db->free($result); - return 1; - } else { - $this->error = $this->db->lasterror(); - return -3; - } - } - - - /** - * Update a line to supplier invoice template . - * - * @param User $user User - * @param int $notrigger No trigger - * @return int Return integer <0 if KO, Id of line if OK - */ - public function update(User $user, $notrigger = 0) - { - global $conf; - - $error = 0; - - include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; - - $sql = 'UPDATE ' . MAIN_DB_PREFIX . 'facture_fourn_det_rec SET'; - $sql .= ' fk_facture_fourn = ' . (int) $this->fk_facture_fourn; - $sql .= ', fk_parent_line = ' . (int) $this->fk_parent; - $sql .= ', fk_product = ' . (int) $this->fk_product; - $sql .= ', ref = ' . (!empty($this->ref) ? "'" . $this->db->escape($this->ref) . "'" : 'NULL'); - $sql .= ", label = " . (!empty($this->label) ? "'" . $this->db->escape($this->label) . "'" : 'NULL'); - $sql .= ", description = '" . $this->db->escape($this->desc ? $this->desc : $this->description) . "'"; - $sql .= ', pu_ht = ' . price2num($this->pu_ht); - $sql .= ', pu_ttc = ' . price2num($this->pu_ttc); - $sql .= ', qty = ' . price2num($this->qty); - $sql .= ", remise_percent = '" . price2num($this->remise_percent) . "'"; - $sql .= ', fk_remise_except = ' . (int) $this->fk_remise_except; - $sql .= ", vat_src_code = '" . $this->db->escape($this->vat_src_code) . "'"; - $sql .= ', tva_tx = ' . price2num($this->tva_tx); - $sql .= ', localtax1_tx = ' . price2num($this->localtax1_tx); - $sql .= ", localtax1_type = '" . $this->db->escape($this->localtax1_type) . "'"; - $sql .= ', localtax2_tx = ' . price2num($this->localtax2_tx); - $sql .= ", localtax2_type = '" . $this->db->escape($this->localtax2_type) . "'"; - if (empty($this->skip_update_total)) { - $sql .= ', total_ht = ' . price2num($this->total_ht); - $sql .= ', total_tva = ' . price2num($this->total_tva); - $sql .= ', total_localtax1 = ' . price2num($this->total_localtax1); - $sql .= ', total_localtax2 = ' . price2num($this->total_localtax2); - $sql .= ', total_ttc = ' . price2num($this->total_ttc); - } - $sql .= ', product_type = ' . (int) $this->product_type; - $sql .= ', date_start = ' . (int) $this->date_start; - $sql .= ', date_end = ' . (int) $this->date_end; - $sql .= ", info_bits = " . ((int) $this->info_bits); - $sql .= ', special_code =' . (int) $this->special_code; - $sql .= ', rang = ' . (int) $this->rang; - $sql .= ', fk_unit = ' .($this->fk_unit ? "'".$this->db->escape($this->fk_unit)."'" : 'null'); - $sql .= ', fk_user_modif = ' . (int) $user->id; - $sql .= ' WHERE rowid = ' . (int) $this->id; - - $this->db->begin(); - - dol_syslog(get_class($this). '::updateline', LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) { - if (!$error) { - $result = $this->insertExtraFields(); - if ($result < 0) { - $error++; - } - } - - if (!$error && !$notrigger) { - // Call trigger - $result = $this->call_trigger('LINESUPPLIERBILLREC_MODIFY', $user); - if ($result < 0) { - $error++; - } - // End call triggers - } - - if ($error) { - $this->db->rollback(); - return -2; - } else { - $this->db->commit(); - return 1; - } - } else { - $this->error = $this->db->lasterror(); - $this->db->rollback(); - return -2; - } - } -} diff --git a/htdocs/fourn/class/fournisseur.facture-rec.ligne.class.php b/htdocs/fourn/class/fournisseur.facture-rec.ligne.class.php new file mode 100644 index 0000000000000..fc7d2df2e8c41 --- /dev/null +++ b/htdocs/fourn/class/fournisseur.facture-rec.ligne.class.php @@ -0,0 +1,396 @@ + + * Copyright (C) 2004-2019 Laurent Destailleur + * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2010-2011 Juanjo Menent + * Copyright (C) 2012 Cedric Salvador + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2015 Marcos García + * Copyright (C) 2017-2024 Frédéric France + * Copyright (C) 2024 MDW + * Copyright (C) 2023-2024 Nick Fragoulis + * Copyright (C) 2024 William Mead + * + * 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 FITNESS 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/fourn/facture/class/fournisseur.facture-rec.ligne.class.php + * \ingroup invoice + * \brief File for class to manage invoice template lines + */ + +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.ligne.class.php'; + +/** + * Class to manage supplier invoice lines of templates. + * Saved into database table llx_facture_fourn_det_rec + */ +class FactureFournisseurLigneRec extends CommonInvoiceLine +{ + /** + * @var string ID to identify managed object + */ + public $element = 'invoice_supplier_det_rec'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = 'facture_fourn_det_rec'; + + /** + * @var int + */ + public $fk_facture_fourn; + + /** + * @var int + */ + public $fk_parent; + + /** + * @var int + */ + public $fk_product; + + /** + * @var string + */ + public $ref_supplier; + + /** + * @var string + */ + public $label; + /** + * @deprecated Use desc + * @var string + */ + public $description; + + /** + * @var float + */ + public $pu_ht; + + /** + * @var float + */ + public $pu_ttc; + + /** + * @var float Quantity + */ + public $qty; + + /** + * @var float + */ + public $remise_percent; + + /** + * @var int + */ + public $fk_remise_except; + + /** + * @var string + */ + public $vat_src_code; + + /** + * @var string|float + */ + public $tva_tx; + + /** + * @var float + */ + public $localtax1_tx; + + /** + * @var int<0, 6> + */ + public $localtax1_type; + + /** + * @var float + */ + public $localtax2_tx; + + /** + * @var int<0, 6> + */ + public $localtax2_type; + + /** + * @var int + */ + public $product_type; + + /** + * @var int + */ + public $date_start; + + /** + * @var int + */ + public $date_end; + + /** + * @var int + */ + public $info_bits; + + /** + * @var int special code + */ + public $special_code; + + /** + * @var int + */ + public $rang; + + /** + * @var int + */ + public $fk_user_author; + + /** + * @var int + */ + public $fk_user_modif; + + /** + * @var int + */ + public $skip_update_total; + + + /** + * Delete supplier order template line in database + * + * @param User $user Object user + * @param int $notrigger Disable triggers + * @return int Return integer <0 if KO, >0 if OK + */ + public function delete(User $user, $notrigger = 0) + { + $error = 0; + $this->db->begin(); + + if (! $error) { + if (! $notrigger) { + // Call triggers + $result = $this->call_trigger('LINESUPPLIERBILLREC_DELETE', $user); + if ($result < 0) { + $error++; + } // Do also here what you must do to rollback action if trigger fail + // End call triggers + } + } + + if (! $error) { + $result = $this->deleteExtraFields(); + if ($result < 0) { + $error++; + } + } + + if (! $error) { + $sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $this->table_element . ' WHERE rowid=' . (int) $this->id; + + $res = $this->db->query($sql); + if ($res === false) { + $error++; + $this->errors[] = $this->db->lasterror(); + } + } + + // Commit or rollback + if ($error) { + $this->db->rollback(); + return -1; + } else { + $this->db->commit(); + return 1; + } + } + + + /** + * Get line of template invoice + * + * @param int $rowid Id of invoice + * @return int 1 if OK, < 0 if KO + */ + public function fetch($rowid) + { + $sql = 'SELECT l.rowid,'; + $sql .= ' l.fk_facture_fourn, l.fk_parent_line, l.fk_product,'; + $sql .= ' l.ref as ref_supplier, l.label, l.description as line_desc, l.pu_ht, l.pu_ttc, l.qty, l.remise_percent, l.fk_remise_except,'; + $sql .= ' l.vat_src_code, l.tva_tx, l.localtax1_tx, l.localtax1_type, l.localtax2_tx, l.localtax2_type,'; + $sql .= ' l.total_ht, l.total_tva, l.total_localtax1, l.total_localtax2, l.total_ttc,'; + $sql .= ' l.product_type, l.date_start, l.date_end,'; + $sql .= ' l.info_bits, l.special_code, l.rang, l.fk_unit, l.import_key,'; + $sql .= ' l.fk_user_author, l.fk_user_modif, l.fk_multicurrency,'; + $sql .= ' l.multicurrency_code, l.multicurrency_subprice, l.multicurrency_total_ht, l.multicurrency_total_tva, l.multicurrency_total_ttc,'; + $sql .= ' p.ref as product_ref, p.fk_product_type as fk_product_type, p.label as product_label, p.description as product_desc'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det_rec as l'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid'; + $sql .= ' WHERE l.rowid = '. (int) $rowid; + $sql .= ' ORDER BY l.rang'; + + dol_syslog('FactureRec::fetch', LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) { + $objp = $this->db->fetch_object($result); + + $this->id = $objp->rowid; + $this->fk_facture_fourn = $objp->fk_facture_fourn; + $this->fk_parent = $objp->fk_parent_line; + $this->fk_product = $objp->fk_product; + $this->ref_supplier = $objp->ref_supplier; + $this->label = $objp->label; + $this->description = $objp->line_desc; + $this->desc = $objp->line_desc; + $this->pu_ht = $objp->pu_ht; + $this->pu_ttc = $objp->pu_ttc; + $this->qty = $objp->qty; + $this->remise_percent = $objp->remise_percent; + $this->fk_remise_except = $objp->fk_remise_except; + $this->vat_src_code = $objp->vat_src_code; + $this->tva_tx = $objp->tva_tx; + $this->localtax1_tx = $objp->localtax1_tx; + $this->localtax1_type = $objp->localtax1_type; + $this->localtax2_tx = $objp->localtax2_tx; + $this->localtax2_type = $objp->localtax2_type; + $this->total_ht = $objp->total_ht; + $this->total_tva = $objp->total_tva; + $this->total_localtax1 = $objp->total_localtax1; + $this->total_localtax2 = $objp->total_localtax2; + $this->total_ttc = $objp->total_ttc; + $this->product_type = $objp->product_type; + $this->date_start = $objp->date_start; + $this->date_end = $objp->date_end; + $this->info_bits = $objp->info_bits; + $this->special_code = $objp->special_code; + $this->rang = $objp->rang; + $this->fk_unit = $objp->fk_unit; + $this->import_key = $objp->import_key; + $this->fk_user_author = $objp->fk_user_author; + $this->fk_user_modif = $objp->fk_user_modif; + $this->fk_multicurrency = $objp->fk_multicurrency; + $this->multicurrency_code = $objp->multicurrency_code; + $this->multicurrency_subprice = $objp->multicurrency_subprice; + $this->multicurrency_total_ht = $objp->multicurrency_total_ht; + $this->multicurrency_total_tva = $objp->multicurrency_total_tva; + $this->multicurrency_total_ttc = $objp->multicurrency_total_ttc; + + $this->db->free($result); + return 1; + } else { + $this->error = $this->db->lasterror(); + return -3; + } + } + + + /** + * Update a line to supplier invoice template . + * + * @param User $user User + * @param int $notrigger No trigger + * @return int Return integer <0 if KO, Id of line if OK + */ + public function update(User $user, $notrigger = 0) + { + global $conf; + + $error = 0; + + include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; + + $sql = 'UPDATE ' . MAIN_DB_PREFIX . 'facture_fourn_det_rec SET'; + $sql .= ' fk_facture_fourn = ' . (int) $this->fk_facture_fourn; + $sql .= ', fk_parent_line = ' . (int) $this->fk_parent; + $sql .= ', fk_product = ' . (int) $this->fk_product; + $sql .= ', ref = ' . (!empty($this->ref) ? "'" . $this->db->escape($this->ref) . "'" : 'NULL'); + $sql .= ", label = " . (!empty($this->label) ? "'" . $this->db->escape($this->label) . "'" : 'NULL'); + $sql .= ", description = '" . $this->db->escape($this->desc ? $this->desc : $this->description) . "'"; + $sql .= ', pu_ht = ' . price2num($this->pu_ht); + $sql .= ', pu_ttc = ' . price2num($this->pu_ttc); + $sql .= ', qty = ' . price2num($this->qty); + $sql .= ", remise_percent = '" . price2num($this->remise_percent) . "'"; + $sql .= ', fk_remise_except = ' . (int) $this->fk_remise_except; + $sql .= ", vat_src_code = '" . $this->db->escape($this->vat_src_code) . "'"; + $sql .= ', tva_tx = ' . price2num($this->tva_tx); + $sql .= ', localtax1_tx = ' . price2num($this->localtax1_tx); + $sql .= ", localtax1_type = '" . $this->db->escape($this->localtax1_type) . "'"; + $sql .= ', localtax2_tx = ' . price2num($this->localtax2_tx); + $sql .= ", localtax2_type = '" . $this->db->escape($this->localtax2_type) . "'"; + if (empty($this->skip_update_total)) { + $sql .= ', total_ht = ' . price2num($this->total_ht); + $sql .= ', total_tva = ' . price2num($this->total_tva); + $sql .= ', total_localtax1 = ' . price2num($this->total_localtax1); + $sql .= ', total_localtax2 = ' . price2num($this->total_localtax2); + $sql .= ', total_ttc = ' . price2num($this->total_ttc); + } + $sql .= ', product_type = ' . (int) $this->product_type; + $sql .= ', date_start = ' . (int) $this->date_start; + $sql .= ', date_end = ' . (int) $this->date_end; + $sql .= ", info_bits = " . ((int) $this->info_bits); + $sql .= ', special_code =' . (int) $this->special_code; + $sql .= ', rang = ' . (int) $this->rang; + $sql .= ', fk_unit = ' .($this->fk_unit ? "'".$this->db->escape($this->fk_unit)."'" : 'null'); + $sql .= ', fk_user_modif = ' . (int) $user->id; + $sql .= ' WHERE rowid = ' . (int) $this->id; + + $this->db->begin(); + + dol_syslog(get_class($this). '::updateline', LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) { + if (!$error) { + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; + } + } + + if (!$error && !$notrigger) { + // Call trigger + $result = $this->call_trigger('LINESUPPLIERBILLREC_MODIFY', $user); + if ($result < 0) { + $error++; + } + // End call triggers + } + + if ($error) { + $this->db->rollback(); + return -2; + } else { + $this->db->commit(); + return 1; + } + } else { + $this->error = $this->db->lasterror(); + $this->db->rollback(); + return -2; + } + } +} diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 6a9a0bdb36ea8..a30c14d62fb02 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -38,8 +38,8 @@ */ require_once DOL_DOCUMENT_ROOT.'/core/class/commoninvoice.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php'; require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.ligne.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; if (isModEnabled('accounting')) { @@ -3738,796 +3738,3 @@ public function sendEmailsRemindersOnSupplierInvoiceDueDate($nbdays = 0, $paymen } } } - - - -/** - * Class to manage line invoices - */ -class SupplierInvoiceLine extends CommonObjectLine -{ - /** - * @var string ID to identify managed object - */ - public $element = 'facture_fourn_det'; - - /** - * @var string Name of table without prefix where object is stored - */ - public $table_element = 'facture_fourn_det'; - - /** - * @see CommonObjectLine - */ - public $parent_element = 'facture_fourn'; - - /** - * @see CommonObjectLine - */ - public $fk_parent_attribute = 'fk_facture_fourn'; - - /** - * @var static - */ - public $oldline; - - /** - * @var string - * @deprecated See $product_ref - * @see $product_ref - */ - public $ref; - - /** - * Internal ref - * @var string - */ - public $product_ref; - - /** - * Supplier reference of price when we added the line. May have been changed after line was added. - * TODO Rename field ref to ref_supplier into table llx_facture_fourn_det and llx_commande_fournisseurdet and update fields into updateline - * @var string - */ - public $ref_supplier; - - /** - * Product description - * @var string - */ - public $product_desc; - - /** - * Unit price before taxes - * @var float - * @deprecated Use $subprice - * @see $subprice - */ - public $pu_ht; - - /** - * Unit price excluded taxes - * @var float - */ - public $subprice; - - /** - * Unit price included taxes - * @var float - */ - public $pu_ttc; - - - /** - * Id of the corresponding supplier invoice - * @var int - */ - public $fk_facture_fourn; - - /** - * This field may contains label of line (when invoice create from order) - * @var string - * @deprecated Use $product_label - */ - public $label; - - /** - * Description of the line - * @var string - * @deprecated Use $desc - */ - public $description; - - /** - * @var int|string - */ - public $date_start; - /** - * @var int|string - */ - public $date_end; - - /** - * @var int - */ - public $fk_code_ventilation; - - /** - * @var int<0,1> - */ - public $skip_update_total; // Skip update price total for special lines - - /** - * @var float Situation progress percentage - */ - public $situation_percent; - - /** - * @var int Previous situation line id reference - */ - public $fk_prev_id; - - /** - * VAT code - * @var string - */ - public $vat_src_code; - - /** - * VAT % - * @var float - */ - public $tva_tx; - - /** - * Local tax 1 % - * @var float - */ - public $localtax1_tx; - - /** - * Local tax 2 % - * @var float - */ - public $localtax2_tx; - - /** - * Quantity - * @var float - */ - public $qty; - - /** - * Percent of discount - * @var float|string - */ - public $remise_percent; - - /** - * Buying price value - * @var float - */ - public $pa_ht; - - /** - * Total amount without taxes - * @var float - */ - public $total_ht; - - /** - * Total amount with taxes - * @var float - */ - public $total_ttc; - - /** - * Total amount of taxes - * @var float - */ - public $total_tva; - - /** - * Total local tax 1 amount - * @var float - */ - public $total_localtax1; - - /** - * Total local tax 2 amount - * @var float - */ - public $total_localtax2; - - /** - * @var int ID - */ - public $fk_product; - - /** - * Type of the product. 0 for product 1 for service - * @var int - */ - public $product_type; - - /** - * Label of the product - * @var string - */ - public $product_label; - - /** - * List of cumulative options: - * Bit 0: 0 si TVA normal - 1 si TVA NPR - * Bit 1: 0 si ligne normal - 1 si bit discount (link to line into llx_remise_except) - * @var int - */ - public $info_bits; - - /** - * Link to line into llx_remise_except - * @var int - */ - public $fk_remise_except; - - /** - * @var int ID - */ - public $fk_parent_line; - - /** - * @var int special code - */ - public $special_code; - - /** - * @var int rank of line - */ - public $rang; - - /** - * Total local tax 1 amount - * @var float - */ - public $localtax1_type; - - /** - * Total local tax 2 amount - * @var float - */ - public $localtax2_type; - - - /** - * Constructor - * - * @param DoliDB $db Database handler - */ - public function __construct($db) - { - $this->db = $db; - } - - /** - * Retrieves a supplier invoice line - * - * @param int $rowid Line id - * @return int Return integer <0 KO; 0 NOT FOUND; 1 OK - */ - public function fetch($rowid) - { - $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description as line_desc, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx'; - $sql .= ', f.localtax1_type, f.localtax2_type, f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2, f.fk_remise_except'; - $sql .= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_facture_fourn, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit'; - $sql .= ', p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.description as product_desc'; - $sql .= ', f.multicurrency_subprice, f.multicurrency_total_ht, f.multicurrency_total_tva, multicurrency_total_ttc'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det as f'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid'; - $sql .= ' WHERE f.rowid = '.((int) $rowid); - $sql .= ' ORDER BY f.rang, f.rowid'; - - $query = $this->db->query($sql); - - if (!$query) { - $this->errors[] = $this->db->error(); - return -1; - } - - if (!$this->db->num_rows($query)) { - return 0; - } - - $obj = $this->db->fetch_object($query); - - $this->id = $obj->rowid; - $this->rowid = $obj->rowid; - $this->fk_facture_fourn = $obj->fk_facture_fourn; - $this->description = $obj->line_desc; - $this->desc = $obj->line_desc; - $this->date_start = $obj->date_start; - $this->date_end = $obj->date_end; - $this->product_ref = $obj->product_ref; - $this->ref_supplier = $obj->ref_supplier; - $this->product_desc = $obj->product_desc; - - $this->subprice = $obj->pu_ht; - $this->pu_ht = $this->subprice; - $this->pu_ttc = $obj->pu_ttc; - $this->tva_tx = $obj->tva_tx; - $this->localtax1_tx = $obj->localtax1_tx; - $this->localtax2_tx = $obj->localtax2_tx; - $this->localtax1_type = $obj->localtax1_type; - $this->localtax2_type = $obj->localtax2_type; - - $this->qty = $obj->qty; - $this->remise_percent = $obj->remise_percent; - $this->fk_remise_except = $obj->fk_remise_except; - //$this->tva = $obj->total_tva; // deprecated - $this->total_ht = $obj->total_ht; - $this->total_tva = $obj->total_tva; - $this->total_localtax1 = $obj->total_localtax1; - $this->total_localtax2 = $obj->total_localtax2; - $this->total_ttc = $obj->total_ttc; - $this->fk_product = $obj->fk_product; - $this->product_type = $obj->product_type; - $this->product_label = $obj->product_label; - $this->label = $obj->product_label; - $this->info_bits = $obj->info_bits; - $this->fk_parent_line = $obj->fk_parent_line; - $this->special_code = $obj->special_code; - $this->rang = $obj->rang; - $this->fk_unit = $obj->fk_unit; - - $this->multicurrency_subprice = $obj->multicurrency_subprice; - $this->multicurrency_total_ht = $obj->multicurrency_total_ht; - $this->multicurrency_total_tva = $obj->multicurrency_total_tva; - $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; - - $this->fetch_optionals(); - - return 1; - } - - /** - * Deletes a line - * - * @param int $notrigger 1=Does not execute triggers, 0=execute triggers - * @return int 0 if KO, 1 if OK - */ - public function delete($notrigger = 0) - { - global $user; - - dol_syslog(get_class($this)."::deleteline rowid=".((int) $this->id), LOG_DEBUG); - - $error = 0; - - $this->db->begin(); - - if (!$notrigger) { - if ($this->call_trigger('LINEBILL_SUPPLIER_DELETE', $user) < 0) { - $error++; - } - } - - $this->deleteObjectLinked(); - - // Remove extrafields - if (!$error) { - $result = $this->deleteExtraFields(); - if ($result < 0) { - $error++; - dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); - } - } - - if (!$error) { - // Supprime ligne - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det '; - $sql .= " WHERE rowid = ".((int) $this->id); - dol_syslog(get_class($this)."::delete", LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) { - $error++; - $this->error = $this->db->lasterror(); - } - } - - if (!$error) { - $this->db->commit(); - return 1; - } else { - $this->db->rollback(); - return -1; - } - } - - /** - * Update a supplier invoice line - * - * @param int $notrigger Disable triggers - * @return int Return integer <0 if KO, >0 if OK - */ - public function update($notrigger = 0) - { - global $conf; - - $pu = price2num($this->subprice); - $qty = price2num($this->qty); - - // Check parameters - if (empty($this->qty)) { - $this->qty = 0; - } - - if ($this->product_type < 0) { - return -1; - } - - // Clean parameters - if (empty($this->remise_percent)) { - $this->remise_percent = 0; - } - if (empty($this->tva_tx)) { - $this->tva_tx = 0; - } - if (empty($this->localtax1_tx)) { - $this->localtax1_tx = 0; - } - if (empty($this->localtax2_tx)) { - $this->localtax2_tx = 0; - } - - if (empty($this->pa_ht)) { - $this->pa_ht = 0; - } - if (empty($this->multicurrency_subprice)) { - $this->multicurrency_subprice = 0; - } - if (empty($this->multicurrency_total_ht)) { - $this->multicurrency_total_ht = 0; - } - if (empty($this->multicurrency_total_tva)) { - $this->multicurrency_total_tva = 0; - } - if (empty($this->multicurrency_total_ttc)) { - $this->multicurrency_total_ttc = 0; - } - - $fk_product = (int) $this->fk_product; - $fk_unit = (int) $this->fk_unit; - - $this->db->begin(); - - $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET"; - $sql .= " description = '".$this->db->escape(empty($this->description) ? $this->desc : $this->description)."'"; - $sql .= ", ref = '".$this->db->escape($this->ref_supplier ? $this->ref_supplier : $this->ref)."'"; - $sql .= ", date_start = ".($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : "null"); - $sql .= ", date_end = ".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : "null"); - $sql .= ", pu_ht = ".price2num($this->subprice); - $sql .= ", pu_ttc = ".price2num($this->pu_ttc); - $sql .= ", qty = ".price2num($this->qty); - $sql .= ", remise_percent = ".price2num($this->remise_percent); - if ($this->fk_remise_except > 0) { - $sql .= ", fk_remise_except=".((int) $this->fk_remise_except); - } else { - $sql .= ", fk_remise_except=null"; - } - $sql .= ", vat_src_code = '".$this->db->escape(empty($this->vat_src_code) ? '' : $this->vat_src_code)."'"; - $sql .= ", tva_tx = ".price2num($this->tva_tx); - $sql .= ", localtax1_tx = ".price2num($this->localtax1_tx); - $sql .= ", localtax2_tx = ".price2num($this->localtax2_tx); - $sql .= ", localtax1_type = '".$this->db->escape($this->localtax1_type)."'"; - $sql .= ", localtax2_type = '".$this->db->escape($this->localtax2_type)."'"; - $sql .= ", total_ht = ".price2num($this->total_ht); - $sql .= ", tva= ".price2num($this->total_tva); - $sql .= ", total_localtax1= ".price2num($this->total_localtax1); - $sql .= ", total_localtax2= ".price2num($this->total_localtax2); - $sql .= ", total_ttc = ".price2num($this->total_ttc); - $sql .= ", fk_product = ".($fk_product > 0 ? (int) $fk_product : 'null'); - $sql .= ", product_type = ".((int) $this->product_type); - $sql .= ", info_bits = ".((int) $this->info_bits); - $sql .= ", fk_unit = ".($fk_unit > 0 ? (int) $fk_unit : 'null'); - - if (!empty($this->rang)) { - $sql .= ", rang=".((int) $this->rang); - } - - // Multicurrency - $sql .= " , multicurrency_subprice=".price2num($this->multicurrency_subprice); - $sql .= " , multicurrency_total_ht=".price2num($this->multicurrency_total_ht); - $sql .= " , multicurrency_total_tva=".price2num($this->multicurrency_total_tva); - $sql .= " , multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc); - - $sql .= " WHERE rowid = ".((int) $this->id); - - dol_syslog(get_class($this)."::update", LOG_DEBUG); - $resql = $this->db->query($sql); - - if (!$resql) { - $this->db->rollback(); - $this->error = $this->db->lasterror(); - return -1; - } - - $this->rowid = $this->id; - $error = 0; - - if (!$error) { - $result = $this->insertExtraFields(); - if ($result < 0) { - $error++; - } - } - - if (!$error && !$notrigger) { - global $langs, $user; - - // Call trigger - if ($this->call_trigger('LINEBILL_SUPPLIER_MODIFY', $user) < 0) { - $this->db->rollback(); - return -1; - } - // End call triggers - } - - if ($error) { - $this->db->rollback(); - return -1; - } - - $this->db->commit(); - return 1; - } - - /** - * Insert line into database - * - * @param int $notrigger 1 no triggers - * @param int $noerrorifdiscountalreadylinked 1=Do not make error if lines is linked to a discount and discount already linked to another - * @return int Return integer <0 if KO, >0 if OK - */ - public function insert($notrigger = 0, $noerrorifdiscountalreadylinked = 0) - { - global $user, $langs; - - $error = 0; - - dol_syslog(get_class($this)."::insert rang=".$this->rang, LOG_DEBUG); - - // Clean parameters - $this->desc = trim($this->desc); - if (empty($this->tva_tx)) { - $this->tva_tx = 0; - } - if (empty($this->localtax1_tx)) { - $this->localtax1_tx = 0; - } - if (empty($this->localtax2_tx)) { - $this->localtax2_tx = 0; - } - if (empty($this->localtax1_type)) { - $this->localtax1_type = 0.0; - } - if (empty($this->localtax2_type)) { - $this->localtax2_type = 0.0; - } - if (empty($this->total_tva)) { - $this->total_tva = 0; - } - if (empty($this->total_localtax1)) { - $this->total_localtax1 = 0; - } - if (empty($this->total_localtax2)) { - $this->total_localtax2 = 0; - } - if (empty($this->rang)) { - $this->rang = 0; - } - if (empty($this->remise_percent)) { - $this->remise_percent = 0; - } - if (empty($this->info_bits)) { - $this->info_bits = 0; - } - if (empty($this->subprice)) { - $this->subprice = 0; - } - if (empty($this->special_code)) { - $this->special_code = 0; - } - if (empty($this->fk_parent_line)) { - $this->fk_parent_line = 0; - } - if (!isset($this->situation_percent) || $this->situation_percent > 100 || (string) $this->situation_percent == '') { - $this->situation_percent = 100; - } - - if (empty($this->pa_ht)) { - $this->pa_ht = 0; - } - if (empty($this->multicurrency_subprice)) { - $this->multicurrency_subprice = 0; - } - if (empty($this->multicurrency_total_ht)) { - $this->multicurrency_total_ht = 0; - } - if (empty($this->multicurrency_total_tva)) { - $this->multicurrency_total_tva = 0; - } - if (empty($this->multicurrency_total_ttc)) { - $this->multicurrency_total_ttc = 0; - } - - - // Check parameters - if ($this->product_type < 0) { - $this->error = 'ErrorProductTypeMustBe0orMore'; - return -1; - } - if (!empty($this->fk_product) && $this->fk_product > 0) { - // Check product exists - $result = Product::isExistingObject('product', $this->fk_product); - if ($result <= 0) { - $this->error = 'ErrorProductIdDoesNotExists'; - return -1; - } - } - - $this->db->begin(); - - // Insertion dans base de la ligne - $sql = 'INSERT INTO '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' (fk_facture_fourn, fk_parent_line, label, description, ref, qty,'; - $sql .= ' vat_src_code, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type,'; - $sql .= ' fk_product, product_type, remise_percent, fk_remise_except, pu_ht, pu_ttc,'; - $sql .= ' date_start, date_end, fk_code_ventilation, rang, special_code,'; - $sql .= ' info_bits, total_ht, tva, total_ttc, total_localtax1, total_localtax2, fk_unit'; - $sql .= ', fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc'; - $sql .= ')'; - $sql .= " VALUES (".$this->fk_facture_fourn.","; - $sql .= " ".($this->fk_parent_line > 0 ? "'".$this->db->escape($this->fk_parent_line)."'" : "null").","; - $product_label - = !empty($this->product_label) - ? $this->product_label : - (!empty($this->label) ? $this->label : null); - $sql .= " ".(!empty($product_label) ? "'".$this->db->escape($product_label)."'" : "null").","; - $sql .= " '".$this->db->escape($this->desc ? $this->desc : $this->description)."',"; - $sql .= " '".$this->db->escape($this->ref_supplier)."',"; - $sql .= " ".price2num($this->qty).","; - - $sql .= " ".(empty($this->vat_src_code) ? "''" : "'".$this->db->escape($this->vat_src_code)."'").","; - $sql .= " ".price2num($this->tva_tx).","; - $sql .= " ".price2num($this->localtax1_tx).","; - $sql .= " ".price2num($this->localtax2_tx).","; - $sql .= " '".$this->db->escape($this->localtax1_type)."',"; - $sql .= " '".$this->db->escape($this->localtax2_type)."',"; - $sql .= ' '.((!empty($this->fk_product) && $this->fk_product > 0) ? $this->fk_product : "null").','; - $sql .= " ".((int) $this->product_type).","; - $sql .= " ".price2num($this->remise_percent).","; - $sql .= ' '.(!empty($this->fk_remise_except) ? ((int) $this->fk_remise_except) : "null").','; - $sql .= " ".price2num($this->subprice).","; - $sql .= " ".(!empty($this->qty) ? price2num($this->total_ttc / $this->qty) : price2num($this->total_ttc)).","; - $sql .= " ".(!empty($this->date_start) ? "'".$this->db->idate($this->date_start)."'" : "null").","; - $sql .= " ".(!empty($this->date_end) ? "'".$this->db->idate($this->date_end)."'" : "null").","; - $sql .= ' '.(!empty($this->fk_code_ventilation) ? $this->fk_code_ventilation : 0).','; - $sql .= ' '.((int) $this->rang).','; - $sql .= ' '.((int) $this->special_code).','; - $sql .= " ".((int) $this->info_bits).","; - $sql .= " ".price2num($this->total_ht).","; - $sql .= " ".price2num($this->total_tva).","; - $sql .= " ".price2num($this->total_ttc).","; - $sql .= " ".price2num($this->total_localtax1).","; - $sql .= " ".price2num($this->total_localtax2); - $sql .= ", ".(!$this->fk_unit ? 'NULL' : $this->fk_unit); - $sql .= ", ".(int) $this->fk_multicurrency; - $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; - $sql .= ", ".price2num($this->multicurrency_subprice); - $sql .= ", ".price2num($this->multicurrency_total_ht); - $sql .= ", ".price2num($this->multicurrency_total_tva); - $sql .= ", ".price2num($this->multicurrency_total_ttc); - $sql .= ')'; - - $resql = $this->db->query($sql); - if ($resql) { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); - $this->rowid = $this->id; // backward compatibility - - if (!$error) { - $result = $this->insertExtraFields(); - if ($result < 0) { - $error++; - } - } - - // Si fk_remise_except defini, on lie la remise a la facture - // ce qui la flague comme "consommee". - if ($this->fk_remise_except) { - $discount = new DiscountAbsolute($this->db); - $result = $discount->fetch($this->fk_remise_except); - if ($result >= 0) { - // Check if discount was found - if ($result > 0) { - // Check if discount not already affected to another invoice - if ($discount->fk_facture_line > 0) { - if (empty($noerrorifdiscountalreadylinked)) { - $this->error = $langs->trans("ErrorDiscountAlreadyUsed", $discount->id); - dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); - $this->db->rollback(); - return -3; - } - } else { - $result = $discount->link_to_invoice($this->id, 0); - if ($result < 0) { - $this->error = $discount->error; - dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); - $this->db->rollback(); - return -3; - } - } - } else { - $this->error = $langs->trans("ErrorADiscountThatHasBeenRemovedIsIncluded"); - dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); - $this->db->rollback(); - return -3; - } - } else { - $this->error = $discount->error; - dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); - $this->db->rollback(); - return -3; - } - } - - if (!$error && !$notrigger) { - // Call trigger - $result = $this->call_trigger('LINEBILL_SUPPLIER_CREATE', $user); - if ($result < 0) { - $this->db->rollback(); - return -2; - } - // End call triggers - } - - $this->db->commit(); - return $this->id; - } else { - $this->error = $this->db->error(); - $this->db->rollback(); - return -2; - } - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Mise a jour de l'objet ligne de commande en base - * - * @return int Return integer <0 si ko, >0 si ok - */ - public function update_total() - { - // phpcs:enable - $this->db->begin(); - - // Mise a jour ligne en base - $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET"; - $sql .= " total_ht = ".price2num($this->total_ht); - $sql .= ", tva= ".price2num($this->total_tva); - $sql .= ", total_localtax1 = ".price2num($this->total_localtax1); - $sql .= ", total_localtax2 = ".price2num($this->total_localtax2); - $sql .= ", total_ttc = ".price2num($this->total_ttc); - $sql .= " WHERE rowid = ".((int) $this->id); - - dol_syslog("FactureFournisseurLigne.class.php::update_total", LOG_DEBUG); - - $resql = $this->db->query($sql); - if ($resql) { - $this->db->commit(); - return 1; - } else { - $this->error = $this->db->error(); - $this->db->rollback(); - return -2; - } - } -} diff --git a/htdocs/fourn/class/fournisseur.facture.ligne.class.php b/htdocs/fourn/class/fournisseur.facture.ligne.class.php new file mode 100644 index 0000000000000..d296f8e080160 --- /dev/null +++ b/htdocs/fourn/class/fournisseur.facture.ligne.class.php @@ -0,0 +1,839 @@ + + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004 Christophe Combelles + * Copyright (C) 2005 Marc Barilley + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2010-2020 Juanjo Menent + * Copyright (C) 2013-2019 Philippe Grand + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2014-2016 Marcos García + * Copyright (C) 2015 Bahfir Abbes + * Copyright (C) 2015-2022 Ferran Marcet + * Copyright (C) 2016-2023 Alexandre Spangaro + * Copyright (C) 2018 Nicolas ZABOURI + * Copyright (C) 2018-2024 Frédéric France + * Copyright (C) 2022 Gauthier VERDOL + * Copyright (C) 2023 Nick Fragoulis + * Copyright (C) 2024 MDW + * Copyright (C) 2024 William Mead + * + * 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 FITNESS 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/fourn/class/fournisseur.facture.ligne.class.php + * \ingroup fournisseur,facture + * \brief File of class to manage supplier invoice lines + */ + +require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php'; +require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; + +if (isModEnabled('accounting')) { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; +} + +/** + * Class to manage line invoices + */ +class SupplierInvoiceLine extends CommonObjectLine +{ + /** + * @var string ID to identify managed object + */ + public $element = 'facture_fourn_det'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = 'facture_fourn_det'; + + /** + * @see CommonObjectLine + */ + public $parent_element = 'facture_fourn'; + + /** + * @see CommonObjectLine + */ + public $fk_parent_attribute = 'fk_facture_fourn'; + + /** + * @var static + */ + public $oldline; + + /** + * @var string + * @deprecated See $product_ref + * @see $product_ref + */ + public $ref; + + /** + * Internal ref + * @var string + */ + public $product_ref; + + /** + * Supplier reference of price when we added the line. May have been changed after line was added. + * TODO Rename field ref to ref_supplier into table llx_facture_fourn_det and llx_commande_fournisseurdet and update fields into updateline + * @var string + */ + public $ref_supplier; + + /** + * Product description + * @var string + */ + public $product_desc; + + /** + * Unit price before taxes + * @var float + * @deprecated Use $subprice + * @see $subprice + */ + public $pu_ht; + + /** + * Unit price excluded taxes + * @var float + */ + public $subprice; + + /** + * Unit price included taxes + * @var float + */ + public $pu_ttc; + + + /** + * Id of the corresponding supplier invoice + * @var int + */ + public $fk_facture_fourn; + + /** + * This field may contains label of line (when invoice create from order) + * @var string + * @deprecated Use $product_label + */ + public $label; + + /** + * Description of the line + * @var string + * @deprecated Use $desc + */ + public $description; + + /** + * @var int|string + */ + public $date_start; + /** + * @var int|string + */ + public $date_end; + + /** + * @var int + */ + public $fk_code_ventilation; + + /** + * @var int<0,1> + */ + public $skip_update_total; // Skip update price total for special lines + + /** + * @var float Situation progress percentage + */ + public $situation_percent; + + /** + * @var int Previous situation line id reference + */ + public $fk_prev_id; + + /** + * VAT code + * @var string + */ + public $vat_src_code; + + /** + * VAT % + * @var float + */ + public $tva_tx; + + /** + * Local tax 1 % + * @var float + */ + public $localtax1_tx; + + /** + * Local tax 2 % + * @var float + */ + public $localtax2_tx; + + /** + * Quantity + * @var float + */ + public $qty; + + /** + * Percent of discount + * @var float|string + */ + public $remise_percent; + + /** + * Buying price value + * @var float + */ + public $pa_ht; + + /** + * Total amount without taxes + * @var float + */ + public $total_ht; + + /** + * Total amount with taxes + * @var float + */ + public $total_ttc; + + /** + * Total amount of taxes + * @var float + */ + public $total_tva; + + /** + * Total local tax 1 amount + * @var float + */ + public $total_localtax1; + + /** + * Total local tax 2 amount + * @var float + */ + public $total_localtax2; + + /** + * @var int ID + */ + public $fk_product; + + /** + * Type of the product. 0 for product 1 for service + * @var int + */ + public $product_type; + + /** + * Label of the product + * @var string + */ + public $product_label; + + /** + * List of cumulative options: + * Bit 0: 0 si TVA normal - 1 si TVA NPR + * Bit 1: 0 si ligne normal - 1 si bit discount (link to line into llx_remise_except) + * @var int + */ + public $info_bits; + + /** + * Link to line into llx_remise_except + * @var int + */ + public $fk_remise_except; + + /** + * @var int ID + */ + public $fk_parent_line; + + /** + * @var int special code + */ + public $special_code; + + /** + * @var int rank of line + */ + public $rang; + + /** + * Total local tax 1 amount + * @var float + */ + public $localtax1_type; + + /** + * Total local tax 2 amount + * @var float + */ + public $localtax2_type; + + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + $this->db = $db; + } + + /** + * Retrieves a supplier invoice line + * + * @param int $rowid Line id + * @return int Return integer <0 KO; 0 NOT FOUND; 1 OK + */ + public function fetch($rowid) + { + $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description as line_desc, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx'; + $sql .= ', f.localtax1_type, f.localtax2_type, f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2, f.fk_remise_except'; + $sql .= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_facture_fourn, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit'; + $sql .= ', p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.description as product_desc'; + $sql .= ', f.multicurrency_subprice, f.multicurrency_total_ht, f.multicurrency_total_tva, multicurrency_total_ttc'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det as f'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid'; + $sql .= ' WHERE f.rowid = '.((int) $rowid); + $sql .= ' ORDER BY f.rang, f.rowid'; + + $query = $this->db->query($sql); + + if (!$query) { + $this->errors[] = $this->db->error(); + return -1; + } + + if (!$this->db->num_rows($query)) { + return 0; + } + + $obj = $this->db->fetch_object($query); + + $this->id = $obj->rowid; + $this->rowid = $obj->rowid; + $this->fk_facture_fourn = $obj->fk_facture_fourn; + $this->description = $obj->line_desc; + $this->desc = $obj->line_desc; + $this->date_start = $obj->date_start; + $this->date_end = $obj->date_end; + $this->product_ref = $obj->product_ref; + $this->ref_supplier = $obj->ref_supplier; + $this->product_desc = $obj->product_desc; + + $this->subprice = $obj->pu_ht; + $this->pu_ht = $this->subprice; + $this->pu_ttc = $obj->pu_ttc; + $this->tva_tx = $obj->tva_tx; + $this->localtax1_tx = $obj->localtax1_tx; + $this->localtax2_tx = $obj->localtax2_tx; + $this->localtax1_type = $obj->localtax1_type; + $this->localtax2_type = $obj->localtax2_type; + + $this->qty = $obj->qty; + $this->remise_percent = $obj->remise_percent; + $this->fk_remise_except = $obj->fk_remise_except; + //$this->tva = $obj->total_tva; // deprecated + $this->total_ht = $obj->total_ht; + $this->total_tva = $obj->total_tva; + $this->total_localtax1 = $obj->total_localtax1; + $this->total_localtax2 = $obj->total_localtax2; + $this->total_ttc = $obj->total_ttc; + $this->fk_product = $obj->fk_product; + $this->product_type = $obj->product_type; + $this->product_label = $obj->product_label; + $this->label = $obj->product_label; + $this->info_bits = $obj->info_bits; + $this->fk_parent_line = $obj->fk_parent_line; + $this->special_code = $obj->special_code; + $this->rang = $obj->rang; + $this->fk_unit = $obj->fk_unit; + + $this->multicurrency_subprice = $obj->multicurrency_subprice; + $this->multicurrency_total_ht = $obj->multicurrency_total_ht; + $this->multicurrency_total_tva = $obj->multicurrency_total_tva; + $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; + + $this->fetch_optionals(); + + return 1; + } + + /** + * Deletes a line + * + * @param int $notrigger 1=Does not execute triggers, 0=execute triggers + * @return int 0 if KO, 1 if OK + */ + public function delete($notrigger = 0) + { + global $user; + + dol_syslog(get_class($this)."::deleteline rowid=".((int) $this->id), LOG_DEBUG); + + $error = 0; + + $this->db->begin(); + + if (!$notrigger) { + if ($this->call_trigger('LINEBILL_SUPPLIER_DELETE', $user) < 0) { + $error++; + } + } + + $this->deleteObjectLinked(); + + // Remove extrafields + if (!$error) { + $result = $this->deleteExtraFields(); + if ($result < 0) { + $error++; + dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); + } + } + + if (!$error) { + // Supprime ligne + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det '; + $sql .= " WHERE rowid = ".((int) $this->id); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { + $error++; + $this->error = $this->db->lasterror(); + } + } + + if (!$error) { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } + + /** + * Update a supplier invoice line + * + * @param int $notrigger Disable triggers + * @return int Return integer <0 if KO, >0 if OK + */ + public function update($notrigger = 0) + { + global $conf; + + $pu = price2num($this->subprice); + $qty = price2num($this->qty); + + // Check parameters + if (empty($this->qty)) { + $this->qty = 0; + } + + if ($this->product_type < 0) { + return -1; + } + + // Clean parameters + if (empty($this->remise_percent)) { + $this->remise_percent = 0; + } + if (empty($this->tva_tx)) { + $this->tva_tx = 0; + } + if (empty($this->localtax1_tx)) { + $this->localtax1_tx = 0; + } + if (empty($this->localtax2_tx)) { + $this->localtax2_tx = 0; + } + + if (empty($this->pa_ht)) { + $this->pa_ht = 0; + } + if (empty($this->multicurrency_subprice)) { + $this->multicurrency_subprice = 0; + } + if (empty($this->multicurrency_total_ht)) { + $this->multicurrency_total_ht = 0; + } + if (empty($this->multicurrency_total_tva)) { + $this->multicurrency_total_tva = 0; + } + if (empty($this->multicurrency_total_ttc)) { + $this->multicurrency_total_ttc = 0; + } + + $fk_product = (int) $this->fk_product; + $fk_unit = (int) $this->fk_unit; + + $this->db->begin(); + + $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET"; + $sql .= " description = '".$this->db->escape(empty($this->description) ? $this->desc : $this->description)."'"; + $sql .= ", ref = '".$this->db->escape($this->ref_supplier ? $this->ref_supplier : $this->ref)."'"; + $sql .= ", date_start = ".($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : "null"); + $sql .= ", date_end = ".($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : "null"); + $sql .= ", pu_ht = ".price2num($this->subprice); + $sql .= ", pu_ttc = ".price2num($this->pu_ttc); + $sql .= ", qty = ".price2num($this->qty); + $sql .= ", remise_percent = ".price2num($this->remise_percent); + if ($this->fk_remise_except > 0) { + $sql .= ", fk_remise_except=".((int) $this->fk_remise_except); + } else { + $sql .= ", fk_remise_except=null"; + } + $sql .= ", vat_src_code = '".$this->db->escape(empty($this->vat_src_code) ? '' : $this->vat_src_code)."'"; + $sql .= ", tva_tx = ".price2num($this->tva_tx); + $sql .= ", localtax1_tx = ".price2num($this->localtax1_tx); + $sql .= ", localtax2_tx = ".price2num($this->localtax2_tx); + $sql .= ", localtax1_type = '".$this->db->escape($this->localtax1_type)."'"; + $sql .= ", localtax2_type = '".$this->db->escape($this->localtax2_type)."'"; + $sql .= ", total_ht = ".price2num($this->total_ht); + $sql .= ", tva= ".price2num($this->total_tva); + $sql .= ", total_localtax1= ".price2num($this->total_localtax1); + $sql .= ", total_localtax2= ".price2num($this->total_localtax2); + $sql .= ", total_ttc = ".price2num($this->total_ttc); + $sql .= ", fk_product = ".($fk_product > 0 ? (int) $fk_product : 'null'); + $sql .= ", product_type = ".((int) $this->product_type); + $sql .= ", info_bits = ".((int) $this->info_bits); + $sql .= ", fk_unit = ".($fk_unit > 0 ? (int) $fk_unit : 'null'); + + if (!empty($this->rang)) { + $sql .= ", rang=".((int) $this->rang); + } + + // Multicurrency + $sql .= " , multicurrency_subprice=".price2num($this->multicurrency_subprice); + $sql .= " , multicurrency_total_ht=".price2num($this->multicurrency_total_ht); + $sql .= " , multicurrency_total_tva=".price2num($this->multicurrency_total_tva); + $sql .= " , multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc); + + $sql .= " WHERE rowid = ".((int) $this->id); + + dol_syslog(get_class($this)."::update", LOG_DEBUG); + $resql = $this->db->query($sql); + + if (!$resql) { + $this->db->rollback(); + $this->error = $this->db->lasterror(); + return -1; + } + + $this->rowid = $this->id; + $error = 0; + + if (!$error) { + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; + } + } + + if (!$error && !$notrigger) { + global $langs, $user; + + // Call trigger + if ($this->call_trigger('LINEBILL_SUPPLIER_MODIFY', $user) < 0) { + $this->db->rollback(); + return -1; + } + // End call triggers + } + + if ($error) { + $this->db->rollback(); + return -1; + } + + $this->db->commit(); + return 1; + } + + /** + * Insert line into database + * + * @param int $notrigger 1 no triggers + * @param int $noerrorifdiscountalreadylinked 1=Do not make error if lines is linked to a discount and discount already linked to another + * @return int Return integer <0 if KO, >0 if OK + */ + public function insert($notrigger = 0, $noerrorifdiscountalreadylinked = 0) + { + global $user, $langs; + + $error = 0; + + dol_syslog(get_class($this)."::insert rang=".$this->rang, LOG_DEBUG); + + // Clean parameters + $this->desc = trim($this->desc); + if (empty($this->tva_tx)) { + $this->tva_tx = 0; + } + if (empty($this->localtax1_tx)) { + $this->localtax1_tx = 0; + } + if (empty($this->localtax2_tx)) { + $this->localtax2_tx = 0; + } + if (empty($this->localtax1_type)) { + $this->localtax1_type = 0.0; + } + if (empty($this->localtax2_type)) { + $this->localtax2_type = 0.0; + } + if (empty($this->total_tva)) { + $this->total_tva = 0; + } + if (empty($this->total_localtax1)) { + $this->total_localtax1 = 0; + } + if (empty($this->total_localtax2)) { + $this->total_localtax2 = 0; + } + if (empty($this->rang)) { + $this->rang = 0; + } + if (empty($this->remise_percent)) { + $this->remise_percent = 0; + } + if (empty($this->info_bits)) { + $this->info_bits = 0; + } + if (empty($this->subprice)) { + $this->subprice = 0; + } + if (empty($this->special_code)) { + $this->special_code = 0; + } + if (empty($this->fk_parent_line)) { + $this->fk_parent_line = 0; + } + if (!isset($this->situation_percent) || $this->situation_percent > 100 || (string) $this->situation_percent == '') { + $this->situation_percent = 100; + } + + if (empty($this->pa_ht)) { + $this->pa_ht = 0; + } + if (empty($this->multicurrency_subprice)) { + $this->multicurrency_subprice = 0; + } + if (empty($this->multicurrency_total_ht)) { + $this->multicurrency_total_ht = 0; + } + if (empty($this->multicurrency_total_tva)) { + $this->multicurrency_total_tva = 0; + } + if (empty($this->multicurrency_total_ttc)) { + $this->multicurrency_total_ttc = 0; + } + + + // Check parameters + if ($this->product_type < 0) { + $this->error = 'ErrorProductTypeMustBe0orMore'; + return -1; + } + if (!empty($this->fk_product) && $this->fk_product > 0) { + // Check product exists + $result = Product::isExistingObject('product', $this->fk_product); + if ($result <= 0) { + $this->error = 'ErrorProductIdDoesNotExists'; + return -1; + } + } + + $this->db->begin(); + + // Insertion dans base de la ligne + $sql = 'INSERT INTO '.MAIN_DB_PREFIX.$this->table_element; + $sql .= ' (fk_facture_fourn, fk_parent_line, label, description, ref, qty,'; + $sql .= ' vat_src_code, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type,'; + $sql .= ' fk_product, product_type, remise_percent, fk_remise_except, pu_ht, pu_ttc,'; + $sql .= ' date_start, date_end, fk_code_ventilation, rang, special_code,'; + $sql .= ' info_bits, total_ht, tva, total_ttc, total_localtax1, total_localtax2, fk_unit'; + $sql .= ', fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc'; + $sql .= ')'; + $sql .= " VALUES (".$this->fk_facture_fourn.","; + $sql .= " ".($this->fk_parent_line > 0 ? "'".$this->db->escape($this->fk_parent_line)."'" : "null").","; + $product_label + = !empty($this->product_label) + ? $this->product_label : + (!empty($this->label) ? $this->label : null); + $sql .= " ".(!empty($product_label) ? "'".$this->db->escape($product_label)."'" : "null").","; + $sql .= " '".$this->db->escape($this->desc ? $this->desc : $this->description)."',"; + $sql .= " '".$this->db->escape($this->ref_supplier)."',"; + $sql .= " ".price2num($this->qty).","; + + $sql .= " ".(empty($this->vat_src_code) ? "''" : "'".$this->db->escape($this->vat_src_code)."'").","; + $sql .= " ".price2num($this->tva_tx).","; + $sql .= " ".price2num($this->localtax1_tx).","; + $sql .= " ".price2num($this->localtax2_tx).","; + $sql .= " '".$this->db->escape($this->localtax1_type)."',"; + $sql .= " '".$this->db->escape($this->localtax2_type)."',"; + $sql .= ' '.((!empty($this->fk_product) && $this->fk_product > 0) ? $this->fk_product : "null").','; + $sql .= " ".((int) $this->product_type).","; + $sql .= " ".price2num($this->remise_percent).","; + $sql .= ' '.(!empty($this->fk_remise_except) ? ((int) $this->fk_remise_except) : "null").','; + $sql .= " ".price2num($this->subprice).","; + $sql .= " ".(!empty($this->qty) ? price2num($this->total_ttc / $this->qty) : price2num($this->total_ttc)).","; + $sql .= " ".(!empty($this->date_start) ? "'".$this->db->idate($this->date_start)."'" : "null").","; + $sql .= " ".(!empty($this->date_end) ? "'".$this->db->idate($this->date_end)."'" : "null").","; + $sql .= ' '.(!empty($this->fk_code_ventilation) ? $this->fk_code_ventilation : 0).','; + $sql .= ' '.((int) $this->rang).','; + $sql .= ' '.((int) $this->special_code).','; + $sql .= " ".((int) $this->info_bits).","; + $sql .= " ".price2num($this->total_ht).","; + $sql .= " ".price2num($this->total_tva).","; + $sql .= " ".price2num($this->total_ttc).","; + $sql .= " ".price2num($this->total_localtax1).","; + $sql .= " ".price2num($this->total_localtax2); + $sql .= ", ".(!$this->fk_unit ? 'NULL' : $this->fk_unit); + $sql .= ", ".(int) $this->fk_multicurrency; + $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; + $sql .= ", ".price2num($this->multicurrency_subprice); + $sql .= ", ".price2num($this->multicurrency_total_ht); + $sql .= ", ".price2num($this->multicurrency_total_tva); + $sql .= ", ".price2num($this->multicurrency_total_ttc); + $sql .= ')'; + + $resql = $this->db->query($sql); + if ($resql) { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); + $this->rowid = $this->id; // backward compatibility + + if (!$error) { + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; + } + } + + // Si fk_remise_except defini, on lie la remise a la facture + // ce qui la flague comme "consommee". + if ($this->fk_remise_except) { + $discount = new DiscountAbsolute($this->db); + $result = $discount->fetch($this->fk_remise_except); + if ($result >= 0) { + // Check if discount was found + if ($result > 0) { + // Check if discount not already affected to another invoice + if ($discount->fk_facture_line > 0) { + if (empty($noerrorifdiscountalreadylinked)) { + $this->error = $langs->trans("ErrorDiscountAlreadyUsed", $discount->id); + dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); + $this->db->rollback(); + return -3; + } + } else { + $result = $discount->link_to_invoice($this->id, 0); + if ($result < 0) { + $this->error = $discount->error; + dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); + $this->db->rollback(); + return -3; + } + } + } else { + $this->error = $langs->trans("ErrorADiscountThatHasBeenRemovedIsIncluded"); + dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); + $this->db->rollback(); + return -3; + } + } else { + $this->error = $discount->error; + dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); + $this->db->rollback(); + return -3; + } + } + + if (!$error && !$notrigger) { + // Call trigger + $result = $this->call_trigger('LINEBILL_SUPPLIER_CREATE', $user); + if ($result < 0) { + $this->db->rollback(); + return -2; + } + // End call triggers + } + + $this->db->commit(); + return $this->id; + } else { + $this->error = $this->db->error(); + $this->db->rollback(); + return -2; + } + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Mise a jour de l'objet ligne de commande en base + * + * @return int Return integer <0 si ko, >0 si ok + */ + public function update_total() + { + // phpcs:enable + $this->db->begin(); + + // Mise a jour ligne en base + $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET"; + $sql .= " total_ht = ".price2num($this->total_ht); + $sql .= ", tva= ".price2num($this->total_tva); + $sql .= ", total_localtax1 = ".price2num($this->total_localtax1); + $sql .= ", total_localtax2 = ".price2num($this->total_localtax2); + $sql .= ", total_ttc = ".price2num($this->total_ttc); + $sql .= " WHERE rowid = ".((int) $this->id); + + dol_syslog("FactureFournisseurLigne.class.php::update_total", LOG_DEBUG); + + $resql = $this->db->query($sql); + if ($resql) { + $this->db->commit(); + return 1; + } else { + $this->error = $this->db->error(); + $this->db->rollback(); + return -2; + } + } +} From a18103187cd69f51ab8274905cc9fe14b2d6ce41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Cendrier?= <81741011+altairis-noe@users.noreply.github.com> Date: Sat, 19 Oct 2024 09:50:18 +0200 Subject: [PATCH 17/17] NEW: Management of extrafields on customer prices, level prices and default prices (#31313) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ADD: Management of extrafields on customer prices, level prices and default prices * ADD: sql table for managing extrafields on customer prices, level prices and default prices * FIX: Add actions to update, add, delete extrafields and display extrafield * FIX: colspan for customer price table * ADD: Management of extrafields on customer prices * FIX: Value and search for price label * ADD: name in the files * FIX: * * FIX: PHP-cs fail * FIX: comment in english, please * FIX: variable naming and testing * FIX: GETPOST array * FIX: return is an array of strings, object array will be modified as well * FIX: return array keys for Extrafields::fetch_name_optionals_label are string too * FIX: do not mess with extrafields code and value * Update llx_product_customer_price_extrafields.sql * Update llx_product_price_extrafields.sql * FIX: whooopsie * FIX: PHP warnings --------- Co-authored-by: Mélina JOUM Co-authored-by: Laurent Destailleur --- htdocs/core/class/extrafields.class.php | 3 +- htdocs/core/lib/product.lib.php | 21 + htdocs/langs/en_US/products.lang | 2 + htdocs/langs/fr_FR/products.lang | 2 + .../admin/product_customer_extrafields.php | 110 ++++ .../admin/product_price_extrafields.php | 111 +++++ htdocs/product/price.php | 469 +++++++++++++++++- htdocs/product/price_suppliers.php | 6 +- htdocs/societe/price.php | 186 +++++++ 9 files changed, 899 insertions(+), 11 deletions(-) create mode 100644 htdocs/product/admin/product_customer_extrafields.php create mode 100644 htdocs/product/admin/product_price_extrafields.php diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index f7eeb00577020..50f45ceb010d2 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -963,7 +963,8 @@ private function update_label($attrname, $label, $type, $size, $elementtype, $un * @param string $elementtype Type of element ('all' = all or $object->table_element like 'adherent', 'commande', 'thirdparty', 'facture', 'propal', 'product', ...). * @param boolean $forceload Force load of extra fields whatever is status of cache. * @param string $attrname The name of the attribute. - * @return array{}|array{label:array,type:array,size:array,default:array,computed:array,unique:array,required:array,param:array,perms:array,list:array|array,pos:array,totalizable:array,help:array,printable:array,enabled:array,langfile:array,css:array,csslist:array,hidden:array,mandatoryfieldsofotherentities?:array,loaded?:int,count:int} Array of attributes keys+label for all extra fields. Note: count set as present to avoid static analysis notices + * @return array Array of attributes keys+label for all extra fields. + * in addition $this->attributes will be completed with array{label:array,type:array,size:array,default:array,computed:array,unique:array,required:array,param:array,perms:array,list:array|array,pos:array,totalizable:array,help:array,printable:array,enabled:array,langfile:array,css:array,csslist:array,hidden:array,mandatoryfieldsofotherentities?:array,loaded?:int,count:int} Note: count set as present to avoid static analysis notices */ public function fetch_name_optionals_label($elementtype, $forceload = false, $attrname = '') { diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 18e34ae02eacc..f481ef7e16be9 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -7,6 +7,7 @@ * Copyright (C) 2023 Gauthier VERDOL * Copyright (C) 2024 Jean-Rémi TAPONIER * Copyright (C) 2024 MDW + * Copyright (C) 2024 Mélina Joum * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -331,6 +332,8 @@ function product_admin_prepare_head() $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label('product'); + $extrafields->fetch_name_optionals_label('product_price'); + $extrafields->fetch_name_optionals_label('product_customer_price'); $extrafields->fetch_name_optionals_label('product_fournisseur_price'); $h = 0; @@ -365,6 +368,24 @@ function product_admin_prepare_head() $head[$h][2] = 'attributes'; $h++; + $head[$h][0] = DOL_URL_ROOT.'/product/admin/product_price_extrafields.php'; + $head[$h][1] = $langs->trans("ProductLevelExtraFields"); + $nbExtrafields = $extrafields->attributes['product_price']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } + $head[$h][2] = 'levelAttributes'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/product/admin/product_customer_extrafields.php'; + $head[$h][1] = $langs->trans("ProductCustomerExtraFields"); + $nbExtrafields = $extrafields->attributes['product_customer_price']['count']; + if ($nbExtrafields > 0) { + $head[$h][1] .= ''.$nbExtrafields.''; + } + $head[$h][2] = 'customerAttributes'; + $h++; + $head[$h][0] = DOL_URL_ROOT.'/product/admin/product_supplier_extrafields.php'; $head[$h][1] = $langs->trans("ProductSupplierExtraFields"); $nbExtrafields = $extrafields->attributes['product_fournisseur_price']['count']; diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index 17d9a2f4efabf..5ea5e979b7150 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -400,6 +400,8 @@ ErrorDestinationProductNotFound=Destination product not found ErrorProductCombinationNotFound=Product variant not found ActionAvailableOnVariantProductOnly=Action only available on the variant of product ProductsPricePerCustomer=Product prices per customers +ProductLevelExtraFields=Additional Attributes (Level price) +ProductCustomerExtraFields=Additional Attributes (Customer price) ProductSupplierExtraFields=Additional Attributes (Supplier Prices) DeleteLinkedProduct=Delete the child product linked to the combination AmountUsedToUpdateWAP=Unit amount to use to update the Weighted Average Price diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index dc4f4dce330d3..2dd144775d4a2 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -396,6 +396,8 @@ ErrorDestinationProductNotFound=Produit destination non trouvé ErrorProductCombinationNotFound=Variante du produit non trouvé ActionAvailableOnVariantProductOnly=Action disponible uniquement sur la variante du produit ProductsPricePerCustomer=Prix produit par clients +ProductLevelExtraFields=Attributs supplémentaires (Prix produit par niveau) +ProductCustomerExtraFields=Attributs supplémentaires (Prix produit par clients) ProductSupplierExtraFields=Attributs supplémentaires (Prix fournisseur) DeleteLinkedProduct=Supprimer le produit enfant lié à la combinaison AmountUsedToUpdateWAP=Montant unitaire à utiliser pour mettre à jour le prix moyen pondéré diff --git a/htdocs/product/admin/product_customer_extrafields.php b/htdocs/product/admin/product_customer_extrafields.php new file mode 100644 index 0000000000000..99444184240f2 --- /dev/null +++ b/htdocs/product/admin/product_customer_extrafields.php @@ -0,0 +1,110 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2012 Marcos García + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2019 Tim Otte + * Copyright (C) 2024 Mélina Joum + * + * 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 FITNESS 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/product/admin/product_customer_extrafields.php + * \ingroup product + * \brief Page to setup extra fields of products + */ + +// Load Dolibarr environment +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array('companies', 'admin', 'products')); + +$extrafields = new ExtraFields($db); +$form = new Form($db); + +// List of supported format +$type2label = ExtraFields::getListOfTypesLabels(); + +$action = GETPOST('action', 'aZ09'); +$attrname = GETPOST('attrname', 'alpha'); +$elementtype = 'product_customer_price'; //Must be the $element of the class that manage extrafield + +if (!$user->admin) { + accessforbidden(); +} + +/* + * Actions + */ + +require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; + + + +/* + * View + */ + +$title = $langs->trans('ProductServiceSetup'); +$textobject = $langs->transnoentitiesnoconv("ProductsAndServices"); +if (!isModEnabled("product")) { + $title = $langs->trans('ServiceSetup'); + $textobject = $langs->trans('Services'); +} elseif (!isModEnabled("service")) { + $title = $langs->trans('ProductSetup'); + $textobject = $langs->trans('Products'); +} + +//$help_url='EN:Module Third Parties setup|FR:Paramétrage_du_module_Tiers'; +$help_url = ''; +llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-product page-admin_product_customer_extrafields'); + + +$linkback = ''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($title, $linkback, 'title_setup'); + + +$head = product_admin_prepare_head(); + +print dol_get_fiche_head($head, 'customerAttributes', $textobject, -1, 'product'); + +require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; + +print dol_get_fiche_end(); + + +// Creation of an optional field +if ($action == 'create') { + print '
    '; + print load_fiche_titre($langs->trans('NewAttribute')); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; +} + +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { + print "
    "; + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/product/admin/product_price_extrafields.php b/htdocs/product/admin/product_price_extrafields.php new file mode 100644 index 0000000000000..782e34554392f --- /dev/null +++ b/htdocs/product/admin/product_price_extrafields.php @@ -0,0 +1,111 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2012 Marcos García + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2019 Tim Otte + * Copyright (C) 2024 Mélina Joum + * + * 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 FITNESS 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/product/admin/product_supplier_extrafields.php + * \ingroup product + * \brief Page to setup extra fields of products + */ + +// Load Dolibarr environment +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array('companies', 'admin', 'products')); + +$extrafields = new ExtraFields($db); +$form = new Form($db); + +// List of supported format +$type2label = ExtraFields::getListOfTypesLabels(); + +$action = GETPOST('action', 'aZ09'); +$attrname = GETPOST('attrname', 'alpha'); +$elementtype = 'product_price'; //Must be the $element of the class that manage extrafield + +if (!$user->admin) { + accessforbidden(); +} + + +/* + * Actions + */ + +require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; + + + +/* + * View + */ + +$title = $langs->trans('ProductServiceSetup'); +$textobject = $langs->transnoentitiesnoconv("ProductsAndServices"); +if (!isModEnabled("product")) { + $title = $langs->trans('ServiceSetup'); + $textobject = $langs->trans('Services'); +} elseif (!isModEnabled("service")) { + $title = $langs->trans('ProductSetup'); + $textobject = $langs->trans('Products'); +} + +//$help_url='EN:Module Third Parties setup|FR:Paramétrage_du_module_Tiers'; +$help_url = ''; +llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-product page-admin_product_supplier_extrafields'); + + +$linkback = ''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($title, $linkback, 'title_setup'); + + +$head = product_admin_prepare_head(); + +print dol_get_fiche_head($head, 'levelAttributes', $textobject, -1, 'product'); + +require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; + +print dol_get_fiche_end(); + + +// Creation of an optional field +if ($action == 'create') { + print '
    '; + print load_fiche_titre($langs->trans('NewAttribute')); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; +} + +// Edition of an optional field +if ($action == 'edit' && !empty($attrname)) { + print "
    "; + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); + + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/product/price.php b/htdocs/product/price.php index a5958a553a5c7..6317d870845ec 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -14,6 +14,7 @@ * Copyright (C) 2018-2024 Frédéric France * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2024 MDW + * Copyright (C) 2024 Mélina Joum * * 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 @@ -42,6 +43,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_expression.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; @@ -75,6 +77,8 @@ $object->fetch($id, $ref); } +$extrafields = new ExtraFields($db); + // Clean param if ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !getDolGlobalString('PRODUIT_MULTIPRICES_LIMIT')) { $conf->global->PRODUIT_MULTIPRICES_LIMIT = 5; @@ -483,10 +487,55 @@ $error++; break; } - // If price has changed, we update it if (!array_key_exists($key, $object->multiprices) || $object->multiprices[$key] != $newprice || $object->multiprices_min[$key] != $newprice_min || $object->multiprices_base_type[$key] != $val['price_base_type'] || $object->multiprices_tva_tx[$key] != $newvattx) { $res = $object->updatePrice($newprice, $val['price_base_type'], $user, $val['vat_tx'], $newprice_min, $key, $val['npr'], $psq, 0, $val['localtaxes_array'], $val['default_vat_code'], $val['price_label']); + if ($res > 0) { + $extralabels = $extrafields->fetch_name_optionals_label("product"); + if (!getDolGlobalString('PRODUIT_MULTIPRICES') && !getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES') && !empty($extralabels)) { + // Default price + $extrafield_values = $extrafields->getOptionalsFromPost("product"); + foreach ($extrafield_values as $efkey => $value) { + $object->array_options[$efkey] = $value; + } + $result = $object->insertExtraFields(); + if ($result < 0) { + $error++; + } + } elseif ((getDolGlobalString('PRODUIT_MULTIPRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) && !empty($extralabels)) { + $price_extralabels = $extrafields->fetch_name_optionals_label("product_price"); + $sql = "SELECT rowid"; + $sql .= " FROM ".$object->db->prefix()."product_price"; + $sql .= " WHERE entity IN (".getEntity('productprice').")"; + $sql .= " AND price_level=".((int) $key); // $i + $sql .= " AND fk_product = ".((int) $object->id); + $sql .= " ORDER BY date_price DESC, rowid DESC"; + $sql .= " LIMIT 1"; + $resql = $object->db->query($sql); + if ($resql) { + $lineid = $object->db->fetch_object($resql); + $db->free($resql); + } + if (!empty($lineid->rowid)) { + if (!empty($price_extralabels) && is_array($price_extralabels)) { + foreach ($price_extralabels as $code => $label) { + $code_array = GETPOST($code, 'array'); + $object->array_options['options_'.$code] = $code_array[$key]; + } + // We need to force table to update product_price and not product extrafields + $object->id = $lineid->rowid; + $object->table_element = 'product_price'; + $result = $object->insertExtraFields(); + } + // Back to product table + $object->id = $id; + $object->table_element = 'product'; + if ($result < 0) { + $error++; + } + } + } + } } else { $res = 0; } @@ -652,6 +701,9 @@ $prodcustprice->price_base_type = GETPOST("price_base_type", 'alpha'); $prodcustprice->price_label = GETPOST("price_label", 'alpha'); + $extralabels = $extrafields->fetch_name_optionals_label("product_customer_price"); + $extrafield_values = $extrafields->getOptionalsFromPost("product_customer_price"); + $tva_tx_txt = GETPOST("tva_tx", 'alpha'); $tva_tx = $tva_tx_txt; @@ -738,6 +790,23 @@ if (!$error) { $result = $prodcustprice->create($user, 0, $update_child_soc); + if ($result > 0) { + if (!empty($extrafield_values) && is_array($extrafield_values)) { + $productcustomerprice = new ProductCustomerPrice($db); + $res = $productcustomerprice->fetch($prodcustprice->id); + if ($res > 0) { + foreach ($extrafield_values as $key => $value) { + $productcustomerprice->array_options[$key] = $value; + } + $result2 = $productcustomerprice->insertExtraFields(); + if ($result2 < 0) { + $prodcustprice->error = $productcustomerprice->error; + $prodcustprice->errors = $productcustomerprice->errors; + $error++; + } + } + } + } if ($result < 0) { setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); @@ -754,6 +823,14 @@ $prodcustprice->id = GETPOSTINT('lineid'); $result = $prodcustprice->delete($user); + if ($result > 0) { + $db->query("DELETE FROM ".MAIN_DB_PREFIX."product_customer_price_extrafields WHERE fk_object = ".((int) $prodcustprice->id)); + setEventMessages($langs->trans("PriceRemoved"), null, 'mesgs'); + } else { + $error++; + setEventMessages($object->error, $object->errors, 'errors'); + } + if ($result < 0) { setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); } else { @@ -776,6 +853,9 @@ $prodcustprice->price_base_type = GETPOST("price_base_type", 'alpha'); $prodcustprice->price_label = GETPOST("price_label", 'alpha'); + $extralabels = $extrafields->fetch_name_optionals_label("product_customer_price"); + $extrafield_values = $extrafields->getOptionalsFromPost("product_customer_price"); + $tva_tx_txt = GETPOST("tva_tx"); $tva_tx = $tva_tx_txt; @@ -855,6 +935,23 @@ if (!$error) { $result = $prodcustprice->update($user, 0, $update_child_soc); + if ($result > 0) { + if (!empty($extrafield_values) && is_array($extrafield_values)) { + $productcustomerprice = new ProductCustomerPrice($db); + $res = $productcustomerprice->fetch($prodcustprice->id); + if ($res > 0) { + foreach ($extrafield_values as $key => $value) { + $productcustomerprice->array_options[$key] = $value; + } + $result2 = $productcustomerprice->insertExtraFields(); + if ($result2 < 0) { + $prodcustprice->error = $productcustomerprice->error; + $prodcustprice->errors = $productcustomerprice->errors; + $error++; + } + } + } + } if ($result < 0) { setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); @@ -1064,7 +1161,7 @@ print '
    '; - print ''; + print '
    '; print ''; print ''; print ''; + // fetch optionals attributes and labels + $extrafields->fetch_name_optionals_label("product_price"); + if ($extrafields->attributes["product_price"] && array_key_exists('label', $extrafields->attributes["product_price"])) { + $extralabels = $extrafields->attributes["product_price"]['label']; + if (!empty($extralabels)) { + foreach ($extralabels as $key => $value) { + // Show field if not hidden + if (!empty($extrafields->attributes["product_price"]['list'][$key]) && $extrafields->attributes["product_price"]['list'][$key] != 3) { + if (!empty($extrafields->attributes["product_price"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product_price"]['langfile'][$key]); + } + if (!empty($extrafields->attributes["product_price"]['help'][$key])) { + $extratitle = $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_price"]['help'][$key])); + } else { + $extratitle = $langs->trans($value); + } + $field = 'ef.' . $key; + print ''; + } + } + } + } print ''; $produit_multiprices_limit = getDolGlobalInt('PRODUIT_MULTIPRICES_LIMIT'); @@ -1121,7 +1240,47 @@ } else { print price($object->multiprices_min[$i]).' '.$langs->trans($object->multiprices_base_type[$i]); } - print ''; + print ''; + if (!empty($extralabels)) { + $sql1 = "SELECT rowid"; + $sql1 .= " FROM ".$object->db->prefix()."product_price"; + $sql1 .= " WHERE entity IN (".getEntity('productprice').")"; + $sql1 .= " AND price_level=".((int) $i); + $sql1 .= " AND fk_product = ".((int) $object->id); + $sql1 .= " ORDER BY date_price DESC, rowid DESC"; + $sql1 .= " LIMIT 1"; + $resql1 = $object->db->query($sql1); + if ($resql1) { + $lineid = $object->db->fetch_object($resql1); + } + $sql2 = "SELECT"; + $sql2 .= " fk_object"; + foreach ($extralabels as $key => $value) { + $sql2 .= ", ".$key; + } + $sql2 .= " FROM ".MAIN_DB_PREFIX."product_price_extrafields"; + $sql2 .= " WHERE fk_object = ".((int) $lineid->rowid); + $resql2 = $db->query($sql2); + if ($resql2) { + if ($db->num_rows($resql2) != 1) { + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product_price"]['list'][$key]) && $extrafields->attributes["product_price"]['list'][$key] != 3) { + print ''; + } + } + } else { + $obj = $db->fetch_object($resql2); + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product_price"]['list'][$key]) && $extrafields->attributes["product_price"]['list'][$key] != 3) { + print '"; + } + } + } + $db->free($resql1); + $db->free($resql2); + } + } + print ''; // Price by quantity if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES')) { // TODO Fix the form included into a tr instead of a td @@ -1345,6 +1504,39 @@ } print ''; } + + // Extrafields + $extrafields->fetch_name_optionals_label("product"); + $extralabels = !empty($extrafields->attributes["product"]['label']) ? $extrafields->attributes["product"]['label'] : ''; + $extrafield_values = $extrafields->getOptionalsFromPost("product"); + $sql = "SELECT"; + $sql .= " fk_object"; + foreach ($extralabels as $key => $value) { + $sql .= ", ".$key; + } + $sql .= " FROM ".MAIN_DB_PREFIX."product_extrafields"; + $sql .= " WHERE fk_object = ".((int) $object->id); + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product"]['list'][$key]) && ($extrafields->attributes["product"]['list'][$key] == 1 || $extrafields->attributes["product"]['list'][$key] == 3 || ($action == "edit_price" && $extrafields->attributes["product"]['list'][$key] == 4))) { + if (!empty($extrafields->attributes["product"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product"]['langfile'][$key]); + } + + print 'attributes["product"]['required'][$key] ? ' class="fieldrequired"' : '').'>'; + if (!empty($extrafields->attributes["product"]['help'][$key])) { + print $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product"]['help'][$key])); + } else { + print $langs->trans($value); + } + + print '"; + } + } + $db->free($resql); + } } print "
    '; print $langs->trans("PriceLevel"); if ($user->admin) { @@ -1073,6 +1170,28 @@ print ''.$langs->trans("SellingPrice").''.$langs->trans("MinPrice").''.$extratitle.'
    '.$extrafields->showOutputField($key, $obj->{$key}, '', 'product_price')."
    '.$extrafields->showOutputField($key, $obj->{$key}, '', 'product')."
    \n"; @@ -1548,6 +1740,59 @@ function on_change() { print ''; print ''; + // Extrafields + $extrafields->fetch_name_optionals_label("product"); + $extralabels = !empty($extrafields->attributes["product"]['label']) ? $extrafields->attributes["product"]['label'] : ''; + $extrafield_values = $extrafields->getOptionalsFromPost("product"); + if (!empty($extralabels)) { + if (empty($object->id)) { + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product"]['list'][$key]) && ($extrafields->attributes["product"]['list'][$key] == 1 || $extrafields->attributes["product"]['list'][$key] == 3 || ($action == "edit_price" && $extrafields->attributes["product"]['list'][$key] == 4))) { + if (!empty($extrafields->attributes["product"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product"]['langfile'][$key]); + } + + print 'attributes["product"]['required'][$key] ? ' class="fieldrequired"' : '').'>'; + if (!empty($extrafields->attributes["product"]['help'][$key])) { + print $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product"]['help'][$key])); + } else { + print $langs->trans($value); + } + print ''.$extrafields->showInputField($key, GETPOSTISSET('options_'.$key) ? $extrafield_values['options_'.$key] : '', '', '', '', '', 0, 'product').''; + } + } + } else { + $sql = "SELECT"; + $sql .= " fk_object"; + foreach ($extralabels as $key => $value) { + $sql .= ", ".$key; + } + $sql .= " FROM ".MAIN_DB_PREFIX."product_extrafields"; + $sql .= " WHERE fk_object = ".((int) $object->id); + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product"]['list'][$key]) && ($extrafields->attributes["product"]['list'][$key] == 1 || $extrafields->attributes["product"]['list'][$key] == 3 || ($action == "edit_price" && $extrafields->attributes["product"]['list'][$key] == 4))) { + if (!empty($extrafields->attributes["product"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product"]['langfile'][$key]); + } + + print 'attributes["product"]['required'][$key] ? ' class="fieldrequired"' : '').'>'; + if (!empty($extrafields->attributes["product"]['help'][$key])) { + print $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product"]['help'][$key])); + } else { + print $langs->trans($value); + } + print ''.$extrafields->showInputField($key, GETPOSTISSET('options_'.$key) ? $extrafield_values['options_'.$key] : $obj->{$key}, '', '', '', '', 0, 'product'); + + print ''; + } + } + $db->free($resql); + } + } + } $parameters = array(); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook @@ -1614,6 +1859,28 @@ function on_change() { if (getDolGlobalString('PRODUCT_MINIMUM_RECOMMENDED_PRICE')) { print ''; } + + // fetch optionals attributes and labels + $extrafields->fetch_name_optionals_label("product_price"); + if ($extrafields->attributes["product_price"] && array_key_exists('label', $extrafields->attributes["product_price"])) { + $extralabels = $extrafields->attributes["product_price"]['label']; + if (!empty($extralabels)) { + foreach ($extralabels as $key => $value) { + // Show field if not hidden + if (!empty($extrafields->attributes["product_price"]['list'][$key]) && $extrafields->attributes["product_price"]['list'][$key] != 3) { + if (!empty($extrafields->attributes["product_price"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product_price"]['langfile'][$key]); + } + if (!empty($extrafields->attributes["product_price"]['help'][$key])) { + $extratitle = $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_price"]['help'][$key])); + } else { + $extratitle = $langs->trans($value); + } + print ''.$extratitle.''; + } + } + } + } print ''; print ''; @@ -1666,6 +1933,54 @@ function on_change() { } print ''; + if (!empty($extralabels)) { + $sql1 = "SELECT rowid"; + $sql1 .= " FROM ".$object->db->prefix()."product_price"; + $sql1 .= " WHERE entity IN (".getEntity('productprice').")"; + $sql1 .= " AND price_level=".((int) $i); + $sql1 .= " AND fk_product = ".((int) $object->id); + $sql1 .= " ORDER BY date_price DESC, rowid DESC"; + $sql1 .= " LIMIT 1"; + $resql1 = $object->db->query($sql1); + if ($resql1) { + $lineid = $object->db->fetch_object($resql1); + } + if (empty($lineid->rowid)) { + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product_price"]['list'][$key]) && ($extrafields->attributes["product_price"]['list'][$key] == 1 || $extrafields->attributes["product_price"]['list'][$key] == 3 || ($action == "edit_level_price" && $extrafields->attributes["product_price"]['list'][$key] == 4))) { + if (!empty($extrafields->attributes["product_price"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product_price"]['langfile'][$key]); + } + + $extravalue = GETPOSTISSET('options_'.$key) ? $extrafield_values['options_'.$key] : $obj->{$key}; + print ''; + } + } + } else { + $sql = "SELECT"; + $sql .= " fk_object"; + foreach ($extralabels as $key => $value) { + $sql .= ", ".$key; + } + $sql .= " FROM ".MAIN_DB_PREFIX."product_price_extrafields"; + $sql .= " WHERE fk_object = ".((int) $lineid->rowid); + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product_price"]['list'][$key]) && ($extrafields->attributes["product_price"]['list'][$key] == 1 || $extrafields->attributes["product_price"]['list'][$key] == 3 || ($action == "edit_level_price" && $extrafields->attributes["product_price"]['list'][$key] == 4))) { + if (!empty($extrafields->attributes["product_price"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product_price"]['langfile'][$key]); + } + + $extravalue = (GETPOSTISSET('options_'.$key) ? $extrafield_values['options_'.$key] : $obj->{$key} ?? ''); + print ''; + } + } + $db->free($resql); + } + } + } print ''; } @@ -1785,6 +2100,30 @@ function on_change() { print ''; print ''; + // Extrafields + $extrafields->fetch_name_optionals_label("product_customer_price"); + $extralabels = !empty($extrafields->attributes["product_customer_price"]['label']) ? $extrafields->attributes["product_customer_price"]['label'] : ''; + $extrafield_values = $extrafields->getOptionalsFromPost("product_customer_price"); + if (!empty($extralabels)) { + if (empty($prodcustprice->id)) { + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product_customer_price"]['list'][$key]) && ($extrafields->attributes["product_customer_price"]['list'][$key] == 1 || $extrafields->attributes["product_customer_price"]['list'][$key] == 3 || ($action == "add_customer_price" && $extrafields->attributes["product_customer_price"]['list'][$key] == 4))) { + if (!empty($extrafields->attributes["product_customer_price"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product_customer_price"]['langfile'][$key]); + } + + print 'attributes["product_customer_price"]['required'][$key] ? ' class="fieldrequired"' : '').'>'; + if (!empty($extrafields->attributes["product_customer_price"]['help'][$key])) { + print $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_customer_price"]['help'][$key])); + } else { + print $langs->trans($value); + } + print ''.$extrafields->showInputField($key, GETPOSTISSET('options_'.$key) ? $extrafield_values['options_'.$key] : '', '', '', '', '', 0, 'product_customer_price').''; + } + } + } + } + print ''; print ''; @@ -1882,8 +2221,61 @@ function on_change() { print ''; print ''; - print ''; + // Extrafields + $extrafields->fetch_name_optionals_label("product_customer_price"); + $extralabels = !empty($extrafields->attributes["product_customer_price"]['label']) ? $extrafields->attributes["product_customer_price"]['label'] : ''; + $extrafield_values = $extrafields->getOptionalsFromPost("product_customer_price"); + if (!empty($extralabels)) { + if (empty($object->id)) { + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product_customer_price"]['list'][$key]) && ($extrafields->attributes["product_customer_price"]['list'][$key] == 1 || $extrafields->attributes["product_customer_price"]['list'][$key] == 3 || ($action == "edit_price" && $extrafields->attributes["product_customer_price"]['list'][$key] == 4))) { + if (!empty($extrafields->attributes["product_customer_price"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product_customer_price"]['langfile'][$key]); + } + print 'attributes["product_customer_price"]['required'][$key] ? ' class="fieldrequired"' : '').'>'; + if (!empty($extrafields->attributes["product_customer_price"]['help'][$key])) { + print $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_customer_price"]['help'][$key])); + } else { + print $langs->trans($value); + } + print ''.$extrafields->showInputField($key, GETPOSTISSET('options_'.$key) ? $extrafield_values['options_'.$key] : '', '', '', '', '', 0, 'product_customer_price').''; + } + } + } else { + $sql = "SELECT"; + $sql .= " fk_object"; + foreach ($extralabels as $key => $value) { + $sql .= ", ".$key; + } + $sql .= " FROM ".MAIN_DB_PREFIX."product_customer_price_extrafields"; + $sql .= " WHERE fk_object = ".((int) $prodcustprice->id); + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product_customer_price"]['list'][$key]) && ($extrafields->attributes["product_customer_price"]['list'][$key] == 1 || $extrafields->attributes["product_customer_price"]['list'][$key] == 3 || ($action == "edit_price" && $extrafields->attributes["product_customer_price"]['list'][$key] == 4))) { + if (!empty($extrafields->attributes["product_customer_price"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product_customer_price"]['langfile'][$key]); + } + + print 'attributes["product_customer_price"]['required'][$key] ? ' class="fieldrequired"' : '').'>'; + if (!empty($extrafields->attributes["product_customer_price"]['help'][$key])) { + print $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_customer_price"]['help'][$key])); + } else { + print $langs->trans($value); + } + print ''.$extrafields->showInputField($key, GETPOSTISSET('options_'.$key) ? $extrafield_values['options_'.$key] : $obj->{$key}, '', '', '', '', 0, 'product_customer_price'); + + print ''; + } + } + $db->free($resql); + } + } + } + + print ''; print '
    '; print '
    '; @@ -2055,10 +2447,17 @@ function on_change() { print ''."\n"; if (count($prodcustprice->lines) > 0 || $search_soc) { - $colspan = 10; + if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { + $colspan = 10; + } else { + $colspan = 11; + } if ($mysoc->localtax1_assuj == "1" || $mysoc->localtax2_assuj == "1") { $colspan++; } + if (!empty($price_extralabels) && is_array($price_extralabels)) { + $colspan += count($price_extralabels); + } print ''; print ''; @@ -2085,6 +2484,27 @@ function on_change() { print ''; print ''; print ''; + // fetch optionals attributes and labels + $extrafields->fetch_name_optionals_label("product_customer_price"); + if ($extrafields->attributes["product_customer_price"] && array_key_exists('label', $extrafields->attributes["product_customer_price"])) { + $extralabels = $extrafields->attributes["product_customer_price"]['label']; + if (!empty($extralabels)) { + foreach ($extralabels as $key => $value) { + // Show field if not hidden + if (!empty($extrafields->attributes["product_customer_price"]['list'][$key]) && $extrafields->attributes["product_customer_price"]['list'][$key] != 3) { + if (!empty($extrafields->attributes["product_customer_price"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product_customer_price"]['langfile'][$key]); + } + if (!empty($extrafields->attributes["product_customer_price"]['help'][$key])) { + $extratitle = $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_customer_price"]['help'][$key])); + } else { + $extratitle = $langs->trans($value); + } + print ''; + } + } + } + } print ''; print ''; print ''; @@ -2146,8 +2566,12 @@ function on_change() { print ''; print ''; print ''; - print ''; + print ''; + if (!empty($extralabels)) { + foreach ($extralabels as $key) { + print ''; + } + } if ($user->hasRight('produit', 'supprimer') || $user->hasRight('service', 'supprimer')) { print ''; print ''; + // Extrafields + $extrafields->fetch_name_optionals_label("product_customer_price"); + $extralabels = $extrafields->attributes["product_customer_price"]['label'] ?? array(); + if (!empty($extralabels)) { + $sql = "SELECT"; + $sql .= " fk_object"; + foreach ($extralabels as $key => $value) { + $sql .= ", ".$key; + } + $sql .= " FROM ".MAIN_DB_PREFIX."product_customer_price_extrafields"; + $sql .= " WHERE fk_object = ".((int) $line->id); + $resql = $db->query($sql); + if ($resql) { + if ($db->num_rows($resql) != 1) { + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product_customer_price"]['list'][$key]) && $extrafields->attributes["product_customer_price"]['list'][$key] != 3) { + print ""; + } + } + } else { + $obj = $db->fetch_object($resql); + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product_customer_price"]['list'][$key]) && $extrafields->attributes["product_customer_price"]['list'][$key] != 3) { + print '"; + } + } + } + $db->free($resql); + } + } + // User $userstatic = new User($db); $userstatic->fetch($line->fk_user); diff --git a/htdocs/product/price_suppliers.php b/htdocs/product/price_suppliers.php index eea13af4a8037..eb84ed7554718 100644 --- a/htdocs/product/price_suppliers.php +++ b/htdocs/product/price_suppliers.php @@ -975,9 +975,9 @@ function edit_price_from_multicurrency() { if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { $extratitle = $langs->trans($value); $arrayfields['ef.' . $key] = array('label' => $extratitle, 'checked' => 0, - 'position' => (end($arrayfields)['position'] + 1), - 'langfile' => $extrafields->attributes["product_fournisseur_price"]['langfile'][$key], - 'help' => $extrafields->attributes["product_fournisseur_price"]['help'][$key]); + 'position' => (end($arrayfields)['position'] + 1), + 'langfile' => $extrafields->attributes["product_fournisseur_price"]['langfile'][$key], + 'help' => $extrafields->attributes["product_fournisseur_price"]['help'][$key]); } } } diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index 653976705a154..140a2f88ecba7 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -7,6 +7,7 @@ * Copyright (C) 2015 Marcos García * Copyright (C) 2023 Alexandre Spangaro * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024 Mélina Joum * * 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 @@ -146,6 +147,26 @@ $prodcustprice->localtax2_type = $localtax2_type; $result = $prodcustprice->create($user, 0, $update_child_soc); + if ($result > 0) { + $extrafields->fetch_name_optionals_label("product_customer_price"); + $extralabels = !empty($extrafields->attributes["product_customer_price"]['label']) ? $extrafields->attributes["product_customer_price"]['label'] : ''; + $extrafield_values = $extrafields->getOptionalsFromPost("product_customer_price"); + if (!empty($extralabels) && is_array($extralabels)) { + $productcustomerprice = new ProductCustomerPrice($db); + $res = $productcustomerprice->fetch($prodcustprice->id); + if ($res > 0) { + foreach ($extrafield_values as $key => $value) { + $productcustomerprice->array_options[$key] = $value; + } + $result2 = $productcustomerprice->insertExtraFields(); + if ($result2 < 0) { + $prodcustprice->error = $productcustomerprice->error; + $prodcustprice->errors = $productcustomerprice->errors; + $error++; + } + } + } + } if ($result < 0) { setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); @@ -184,6 +205,26 @@ $prodcustprice->recuperableonly = (preg_match('/\*/', GETPOST("tva_tx")) ? 1 : 0); $result = $prodcustprice->update($user, 0, $update_child_soc); + if ($result > 0) { + $extrafields->fetch_name_optionals_label("product_customer_price"); + $extralabels = !empty($extrafields->attributes["product_customer_price"]['label']) ? $extrafields->attributes["product_customer_price"]['label'] : ''; + $extrafield_values = $extrafields->getOptionalsFromPost("product_customer_price"); + if (!empty($extralabels) && is_array($extralabels)) { + $productcustomerprice = new ProductCustomerPrice($db); + $res = $productcustomerprice->fetch($prodcustprice->id); + if ($res > 0) { + foreach ($extrafield_values as $key => $value) { + $productcustomerprice->array_options[$key] = $value; + } + $result2 = $productcustomerprice->insertExtraFields(); + if ($result2 < 0) { + $prodcustprice->error = $productcustomerprice->error; + $prodcustprice->errors = $productcustomerprice->errors; + $error++; + } + } + } + } if ($result < 0) { setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); } else { @@ -363,6 +404,30 @@ print ''; print ''; + // Extrafields + $extrafields->fetch_name_optionals_label("product_customer_price"); + $extralabels = !empty($extrafields->attributes["product_customer_price"]['label']) ? $extrafields->attributes["product_customer_price"]['label'] : ''; + $extrafield_values = $extrafields->getOptionalsFromPost("product_customer_price"); + if (!empty($extralabels)) { + if (empty($prodcustprice->id)) { + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product_customer_price"]['list'][$key]) && ($extrafields->attributes["product_customer_price"]['list'][$key] == 1 || $extrafields->attributes["product_customer_price"]['list'][$key] == 3 || ($action == "add_customer_price" && $extrafields->attributes["product_customer_price"]['list'][$key] == 4))) { + if (!empty($extrafields->attributes["product_customer_price"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product_customer_price"]['langfile'][$key]); + } + + print 'attributes["product_customer_price"]['required'][$key] ? ' class="fieldrequired"' : '').'>'; + if (!empty($extrafields->attributes["product_customer_price"]['help'][$key])) { + print $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_customer_price"]['help'][$key])); + } else { + print $langs->trans($value); + } + print ''; + } + } + } + } + print '
    '.$langs->trans("MinPrice").' '.$langs->trans("HT").''.$langs->trans("MinPrice").' '.$langs->trans("TTC").''.$langs->trans("PriceLabel").''.$extratitle.''.$langs->trans("ChangedBy").'
    '.price($object->price_min).''.price($object->price_min_ttc).''.$object->price_label.''; - print ''; print 'id.'">'; @@ -2227,6 +2651,37 @@ function on_change() { print ''.price($line->price_min_ttc).''.$line->price_label.''.$extrafields->showOutputField($key, $obj->{$key}, '', 'product_customer_price')."
    '.$extrafields->showInputField($key, GETPOSTISSET('options_'.$key) ? $extrafield_values['options_'.$key] : '', '', '', '', '', 0, 'product_customer_price').'
    '; print $form->buttonsSaveCancel(); @@ -441,6 +506,60 @@ print ''; print ''; + // Extrafields + $extrafields->fetch_name_optionals_label("product_customer_price"); + $extralabels = !empty($extrafields->attributes["product_customer_price"]['label']) ? $extrafields->attributes["product_customer_price"]['label'] : ''; + $extrafield_values = $extrafields->getOptionalsFromPost("product_customer_price"); + if (!empty($extralabels)) { + if (empty($object->id)) { + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product_customer_price"]['list'][$key]) && ($extrafields->attributes["product_customer_price"]['list'][$key] == 1 || $extrafields->attributes["product_customer_price"]['list'][$key] == 3 || ($action == "edit_price" && $extrafields->attributes["product_customer_price"]['list'][$key] == 4))) { + if (!empty($extrafields->attributes["product_customer_price"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product_customer_price"]['langfile'][$key]); + } + + print 'attributes["product_customer_price"]['required'][$key] ? ' class="fieldrequired"' : '').'>'; + if (!empty($extrafields->attributes["product_customer_price"]['help'][$key])) { + print $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_customer_price"]['help'][$key])); + } else { + print $langs->trans($value); + } + print ''.$extrafields->showInputField($key, GETPOSTISSET('options_'.$key) ? $extrafield_values['options_'.$key] : '', '', '', '', '', 0, 'product_customer_price').''; + } + } + } else { + $sql = "SELECT"; + $sql .= " fk_object"; + foreach ($extralabels as $key => $value) { + $sql .= ", ".$key; + } + $sql .= " FROM ".MAIN_DB_PREFIX."product_customer_price_extrafields"; + $sql .= " WHERE fk_object = ".((int) $prodcustprice->id); + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product_customer_price"]['list'][$key]) && ($extrafields->attributes["product_customer_price"]['list'][$key] == 1 || $extrafields->attributes["product_customer_price"]['list'][$key] == 3 || ($action == "edit_price" && $extrafields->attributes["product_customer_price"]['list'][$key] == 4))) { + if (!empty($extrafields->attributes["product_customer_price"]['langfile'][$key])) { + $langs->load($extrafields->attributes["product_customer_price"]['langfile'][$key]); + } + + print 'attributes["product_customer_price"]['required'][$key] ? ' class="fieldrequired"' : '').'>'; + if (!empty($extrafields->attributes["product_customer_price"]['help'][$key])) { + print $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_customer_price"]['help'][$key])); + } else { + print $langs->trans($value); + } + print ''.$extrafields->showInputField($key, GETPOSTISSET('options_'.$key) ? $extrafield_values['options_'.$key] : $obj->{$key}, '', '', '', '', 0, 'product_customer_price'); + + print ''; + } + } + $db->free($resql); + } + } + } + print ''; print $form->buttonsSaveCancel(); @@ -555,6 +674,31 @@ ); } } + // fetch optionals attributes and labels + $extrafields->fetch_name_optionals_label("product_customer_price"); + if ($extrafields->attributes["product_customer_price"] && array_key_exists('label', $extrafields->attributes["product_customer_price"])) { + $extralabels = $extrafields->attributes["product_customer_price"]['label']; + + if (!empty($extralabels)) { + foreach ($extralabels as $key => $value) { + // Show field if not hidden + if (!empty($extrafields->attributes["product_customer_price"]['list'][$key]) && $extrafields->attributes["product_customer_price"]['list'][$key] != 3) { + $extratitle = $langs->trans($value); + if (!empty($val['visible'])) { + $visible = (int) dol_eval((string) $val['visible'], 1, 1, '1'); + $arrayfields['ef.' . $key] = array( + 'label' => $extratitle, + 'checked' => (($visible < 0) ? 0 : 1), + 'position' => (int) $extrafields->attributes['product_customer_price']['pos'][$key], + 'langfile' => $extrafields->attributes["product_customer_price"]['langfile'][$key], + 'help' => $extrafields->attributes["product_customer_price"]['help'][$key] + ); + } + } + } + } + } + $arrayfields = dol_sort_array($arrayfields, 'position'); // Count total nb of records @@ -610,6 +754,11 @@ print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], $key, '', $param, '', $sortfield, $sortorder)."\n"; } } + foreach ($extralabels as $key => $val) { + if (!empty($arrayfields['ef.'.$key]['checked'])) { + print getTitleFieldOfList($arrayfields['ef.'.$key]['label'], 0, $_SERVER['PHP_SELF'], $key, '', $param, '', $sortfield, $sortorder)."\n"; + } + } print ''; print ''; @@ -626,6 +775,12 @@ print ''; print ''; print ''; + print ''; + if (!empty($extralabels)) { + foreach ($extralabels as $key) { + print ''; + } + } // Print the search button print ''; $searchpicto = $form->showFilterAndCheckAddButtons(0); @@ -654,10 +809,41 @@ print ''.price($line->price_ttc).""; print ''.price($line->price_min).''; print ''.price($line->price_min_ttc).''; + print ''.$line->price_label.''; // User print ''; print $userstatic->getNomUrl(-1); print ''; + // Extrafields + $extrafields->fetch_name_optionals_label("product_customer_price"); + $extralabels = $extrafields->attributes["product_customer_price"]['label']; + if (!empty($extralabels)) { + $sql = "SELECT"; + $sql .= " fk_object"; + foreach ($extralabels as $key => $value) { + $sql .= ", ".$key; + } + $sql .= " FROM ".MAIN_DB_PREFIX."product_customer_price_extrafields"; + $sql .= " WHERE fk_object = ".((int) $line->id); + $resql = $db->query($sql); + if ($resql) { + if ($db->num_rows($resql) != 1) { + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product_customer_price"]['list'][$key]) && $extrafields->attributes["product_customer_price"]['list'][$key] != 3) { + print ""; + } + } + } else { + $obj = $db->fetch_object($resql); + foreach ($extralabels as $key => $value) { + if (!empty($extrafields->attributes["product_customer_price"]['list'][$key]) && $extrafields->attributes["product_customer_price"]['list'][$key] != 3) { + print ''.$extrafields->showOutputField($key, $obj->{$key}, '', 'product_customer_price').""; + } + } + } + $db->free($resql); + } + } // Action if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) { print '';