diff --git a/ChangeLog b/ChangeLog index 1c0e96fc27c..2c9e138e1f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -143,6 +143,123 @@ Following changes may create regressions for some external modules, but were nec +***** ChangeLog for 14.0.4 compared to 14.0.3 ***** + +FIX: $totalarray is overwritten, totals were lost +FIX: 13.0 - due to a typo in the 'mode' parameter, the "first name" column of the list of members displays the full name +FIX: 13.0: end date required to edit a ticket message +FIX: 13.0 feedback of PR #18993: make ticket messages punctual events with attr percentage = -1 +FIX: 13.0 PR #18993: add comment on modified part +FIX: 13.0: sometimes firstname was mistyped as fistname +FIX: 14.0 - civility field of private third party creation form has inadequate width +FIX: 14.0 - civility field width inadequate due to select2 calculating the width while the field has no width (display: none) +FIX: 14.0 - due to a typo in the 'mode' parameter, the "first name" co… +FIX: #18634 : Problem of virtual stock with reception module enabled +FIX: #18695 Added ref_ext to supplier invoice +FIX: #18698 Supplier invoice list - "alert" checkbox not working +FIX: #18735 +FIX: #18767 : Adherent delete +FIX: #18797 +FIX: #18854 +FIX: #18875 in v14 +FIX: #18910 +FIX: #18910 : MRP List SQL query syntax error with more than one extrafileds. +FIX: #18912 Accountancy - SQL error when custom group is added without country defined +FIX: #18934 on-registration in the extrafieldsline database for deliveries +FIX: #18968 +FIX: #19008 +FIX: #19014 - the properties of some fields are not updated when you submit the form +FIX: #19210 +FIX: #19214 : PostgreSQL error on admin/limits.php +FIX: #19241 Project - Fix display salary in overview +FIX: #19305 +FIX: 2 columns for total labels +FIX: Accountancy - Format Quadra export - Missing line type C to create automaticly a subledger account with label +FIX: Accountancy - If deposit invoice is used, force binding in deposit accounting account to solve transaction +FIX: Accountancy - Missing specific filename for export on format FEC2, Ciel & repare it +FIX: Accountancy - Option of export popup are inverted +FIX: Accountancy - PHP8 +FIX: Accountancy - Product admin - SQL error when we affect accounting account with product_perentity activated +FIX: Accountancy simplified - Salaries are not present in report +FIX: Accountancy - Some correction on export name +FIX: Accountancy - Trunc code_journal to 2 in format XIMPORT (Ciel, Sage50) +FIX: add warehouse in projects' overview count +FIX: also on customer index for automatic binding +FIX: Attachment of pdf into shipment when sending email +FIX: autocalculation of the supplier price in main currency. +FIX: avoid warning if $categories is an id +FIX: bad sign of amount stored for multicurrency columns on credit notes +FIX: Bad use of a forced contact of another company on PDF/ODT documents +FIX: Bad use of dol_concatdesc() +FIX: Button text on proposal card for create a invoice +FIX: calculateCosts of BOM must not be included into fetch +FIX: calculation of balance in conciliation page on desc sorting. +FIX: card.php +FIX: Change date format of the inventorycode to be equal as mass stock transfert +FIX: check if greater 0 +FIX: close cash with some terminals in TakePOS +FIX: compatibility with Multicompany +FIX: consistent UX when calling a tab from the invoice card with empty ref/id +FIX: default language defined for IN country +FIX: Expense report - In edit mode, field qty doesn't accept decimal unlike the create mode +FIX: fetch of product with modulebuilder load too much data +FIX: filter for export of accounting documents +FIX: Filter on categories +FIX: generate documents with PDF options +FIX: indentation +FIX: init hookmanager after loading $conf values +FIX: invoice: inpossible to create an invoice because of very bad check + warnings when trying to print tabs for invoice with no ID +FIX: legal issue on expense report pdf (must also show price without tax) +FIX: list of categories in stats of supplier invoices +FIX: load tranlate array after setting lang +FIX: lost superadmin grade after edit user card +FIX: missing filter status=1 on rss feeds +FIX: missing permission check reported by me@lainwir3d.net on product api +FIX: missing return status +FIX: missing sql filter by entity +FIX: move fetch_optionnal into $ac_static->fetch() +FIX: only a superadmin can modify entity +FIX: only ones value is return for dictionaries +FIX: optional visibility on create card +FIX: payment style and html5 tags +FIX: payment using wrong type in takepos when too many payment mode +FIX: PR#18931 Remove useless explicit call to dol_shutdown +FIX: Product accountancy affectation with product_perentity activated (PR #18620) +FIX: products/services card: hidden extrafields were overridden +FIX: project task list: extrafields could not be displayed +FIX: Propal list - Problem of pagination on date +FIX: reload user lang +FIX: Remove not complete order from the virtual stock +FIX: Replenish: SQL error when no warehouse has been created + Warning when there are no warehouses +FIX: resource list : Use standard code to handle list filters +FIX: restrictedArea for payment delete +FIX: Ret PR +FIX: second approval back in stable feature as is the setting for minimum amount (last part from PR#14286) +FIX: selected lines on supplier invoice create +FIX: Selection of type "people" for membership must hide the company +FIX: select list of orders not complete when field type of company is on +FIX: show end hours in events linked to objects +FIX: support of localtax on expense report +FIX: task time: can't filter by user with pgsql + show error message +FIX: task time: keep on using natural_search +FIX: tcpdf vulnerability to roman numeral bomb, cf. tecnickom/TCPDF issue #315 +FIX: Test when date of invoie is in future (pb with TZ and offset) +FIX: Ticket - Card - Wrong font awesome library +FIX: Ticket - Duplicate field project when we create ticket from project +FIX: translation into email for member at membership validation. +FIX: Travis Sanitize SQL +FIX: unprivileged user can see task associated with a not allowed project +FIX: URGENT: impossible to create an invoice +FIX: Use of accent into filename of GED +FIX: user date timezone offset +FIX: User salary card - translation problem +FIX: user without permission can set ticket subject +FIX: We need a default price base type in variant creation case with multiprices when parent has been created with only one level price +FIX: wrong array key value +FIX: wrong check +FIX: wrong position of error message +Sync transifex. + ***** ChangeLog for 14.0.3 compared to 14.0.2 ***** FIX: #18698 Supplier invoice list - "alert" checkbox not working diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 74c7a6d272f..e1792958324 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1247,7 +1247,9 @@ if ($action == 'create') { if (!empty($projectid)) { $projectsListId = $projectid; } + $tid = GETPOSTISSET("projecttaskid") ? GETPOST("projecttaskid", 'int') : (GETPOSTISSET("taskid") ? GETPOST("taskid", 'int') : ''); + $formproject->selectTasks((!empty($societe->id) ? $societe->id : -1), $tid, 'taskid', 24, 0, '1', 1, 0, 0, 'maxwidth500', $projectsListId); print ''; } diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 82c26b559d2..f333d67b336 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -75,7 +75,11 @@ $search_phone_pro = GETPOST("search_phone_pro", 'alpha'); $search_phone_mobile = GETPOST("search_phone_mobile", 'alpha'); $search_fax = GETPOST("search_fax", 'alpha'); $search_email = GETPOST("search_email", 'alpha'); -$search_no_email = GETPOST("search_no_email", 'int'); +if (!empty($conf->mailing->enabled)) { + $search_no_email = GETPOST("search_no_email", 'int'); +} else { + $search_no_email = -1; +} if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { if ($value['active']) { diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index aed5bc9515f..e44d42c53bb 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7817,7 +7817,7 @@ abstract class CommonObject if ($display_type == 'card') { $out .= ''; - if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER) && ($action == 'view' || $action == 'editline')) { + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER) && ($action == 'view' || $action == 'valid' || $action == 'editline')) { $out .= ''; } $out .= 'db->rollback(); return -3; } @@ -2771,21 +2770,23 @@ class ExpeditionLigne extends CommonObjectLine // End call triggers } - if (!$error) { - $this->db->commit(); - return $this->id; + if ($error) { + foreach ($this->errors as $errmsg) { + dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); + $this->error .= ($this->error ? ', '.$errmsg : $errmsg); + } } - - foreach ($this->errors as $errmsg) { - dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); - $this->error .= ($this->error ? ', '.$errmsg : $errmsg); - } - - $this->db->rollback(); - return -1 * $error; } else { $error++; } + + if ($error) { + $this->db->rollback(); + return -1; + } else { + $this->db->commit(); + return $this->id; + } } /** diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 27f7bac5b94..15d93bfae2c 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -10,7 +10,7 @@ * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2018-2020 Frédéric France - * Copyright (C) 2018 Ferran Marcet + * Copyright (C) 2018-2021 Ferran Marcet * Copyright (C) 2021 Josep Lluís Amador * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 6419d233d43..a1db1826684 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -2270,6 +2270,7 @@ class FactureFournisseur extends CommonInvoice if ($result) { if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); + $this->id = $obj->rowid; if ($obj->fk_user_author) { $cuser = new User($this->db); @@ -2286,8 +2287,8 @@ class FactureFournisseur extends CommonInvoice $muser->fetch($obj->fk_user_modif); $this->user_modification = $muser; } - $this->date_creation = $this->db->idate($obj->datec); - $this->date_modification = $this->db->idate($obj->datem); + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = $this->db->jdate($obj->datem); //$this->date_validation = $obj->datev; // This field is not available. Should be store into log table and using this function should be replaced with showing content of log (like for supplier orders) } $this->db->free($result); diff --git a/htdocs/langs/de_AT/modulebuilder.lang b/htdocs/langs/de_AT/modulebuilder.lang new file mode 100644 index 00000000000..5db0d6ffc2c --- /dev/null +++ b/htdocs/langs/de_AT/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +TriggerDefDesc=Define in the trigger file the code that you want to execute when a business event external to your module is executed (events recorded by other modules). diff --git a/htdocs/langs/de_CH/modulebuilder.lang b/htdocs/langs/de_CH/modulebuilder.lang new file mode 100644 index 00000000000..5db0d6ffc2c --- /dev/null +++ b/htdocs/langs/de_CH/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +TriggerDefDesc=Define in the trigger file the code that you want to execute when a business event external to your module is executed (events recorded by other modules). diff --git a/htdocs/langs/el_CY/propal.lang b/htdocs/langs/el_CY/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/el_CY/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/en_AE/accountancy.lang b/htdocs/langs/en_AE/accountancy.lang new file mode 100644 index 00000000000..fd4bce2d49b --- /dev/null +++ b/htdocs/langs/en_AE/accountancy.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - accountancy +NotifiedExportDate=Flag exported lines as exported (modification of the lines will not be possible) +NotifiedValidationDate=Validate the exported entries (modification or deletion of the lines will not be possible) diff --git a/htdocs/langs/en_AE/cashdesk.lang b/htdocs/langs/en_AE/cashdesk.lang new file mode 100644 index 00000000000..19dc45d5847 --- /dev/null +++ b/htdocs/langs/en_AE/cashdesk.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - cashdesk +NotAvailableWithBrowserPrinter=Not available when printer for receipt is set to browser diff --git a/htdocs/langs/en_AE/compta.lang b/htdocs/langs/en_AE/compta.lang new file mode 100644 index 00000000000..21e186d2a79 --- /dev/null +++ b/htdocs/langs/en_AE/compta.lang @@ -0,0 +1,8 @@ +# Dolibarr language file - Source file is en_US - compta +VATReportByThirdParties=Sales tax report by third party +InvoiceLate30Days =Invoices late (> 30 days) +InvoiceLate15Days =Invoices late (15 to 30 days) +InvoiceLateMinus15Days =Invoices late (< 15 days) +InvoiceNotLate =To be collected (< 15 days) +InvoiceNotLate15Days =To be collected (15 to 30 days) +InvoiceNotLate30Days =To be collected (> 30 days) diff --git a/htdocs/langs/en_AE/errors.lang b/htdocs/langs/en_AE/errors.lang new file mode 100644 index 00000000000..b701bac654c --- /dev/null +++ b/htdocs/langs/en_AE/errors.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - errors +ErrorRecordHasAtLeastOneChildOfType=Object %s has at least one child of type %s diff --git a/htdocs/langs/en_AE/eventorganization.lang b/htdocs/langs/en_AE/eventorganization.lang new file mode 100644 index 00000000000..dac8822b8d7 --- /dev/null +++ b/htdocs/langs/en_AE/eventorganization.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - eventorganization +EventOrganizationDescriptionLong=Manage the organization of an event (show, conferences, attendees or speakers, with public pages for suggestion, vote or registration) diff --git a/htdocs/langs/en_AE/members.lang b/htdocs/langs/en_AE/members.lang new file mode 100644 index 00000000000..a4efe013601 --- /dev/null +++ b/htdocs/langs/en_AE/members.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - members +MembersTickets=Membership address sheet +NewSubscription=New contribution diff --git a/htdocs/langs/en_AE/modulebuilder.lang b/htdocs/langs/en_AE/modulebuilder.lang new file mode 100644 index 00000000000..5db0d6ffc2c --- /dev/null +++ b/htdocs/langs/en_AE/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +TriggerDefDesc=Define in the trigger file the code that you want to execute when a business event external to your module is executed (events recorded by other modules). diff --git a/htdocs/langs/en_AE/mrp.lang b/htdocs/langs/en_AE/mrp.lang new file mode 100644 index 00000000000..e0e12fc5350 --- /dev/null +++ b/htdocs/langs/en_AE/mrp.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - mrp +ConfirmDeleteMo=Are you sure you want to delete this Manufacturing Order? diff --git a/htdocs/langs/en_AE/orders.lang b/htdocs/langs/en_AE/orders.lang new file mode 100644 index 00000000000..bed33ccde24 --- /dev/null +++ b/htdocs/langs/en_AE/orders.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - orders +SaleOrderLines=Sales order lines diff --git a/htdocs/langs/en_AE/printing.lang b/htdocs/langs/en_AE/printing.lang new file mode 100644 index 00000000000..31440f79aed --- /dev/null +++ b/htdocs/langs/en_AE/printing.lang @@ -0,0 +1,7 @@ +# Dolibarr language file - Source file is en_US - printing +Module64000Name=One click Printing +Module64000Desc=Enable One click Printing System +PrintingSetup=Setup of One click Printing System +PrintingDesc=This module adds a Print button to various modules to allow documents to be printed directly to a printer with no need to open the document into another application. +MenuDirectPrinting=One click Printing jobs +DirectPrint=One click Print diff --git a/htdocs/langs/en_AE/products.lang b/htdocs/langs/en_AE/products.lang new file mode 100644 index 00000000000..a50a97fd8db --- /dev/null +++ b/htdocs/langs/en_AE/products.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - products +IncludingProductWithTag=Including products/services with the tag +UseProductFournDesc=Add a feature to define the product description defined by the vendors (for each vendor reference) in addition to the description for customers diff --git a/htdocs/langs/en_AE/propal.lang b/htdocs/langs/en_AE/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/en_AE/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/en_AE/receptions.lang b/htdocs/langs/en_AE/receptions.lang new file mode 100644 index 00000000000..088c09f1f33 --- /dev/null +++ b/htdocs/langs/en_AE/receptions.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - receptions +ReceptionCreationIsDoneFromOrder=For the moment, creation of a new reception is done from the Purchase Order record. diff --git a/htdocs/langs/en_AE/sendings.lang b/htdocs/langs/en_AE/sendings.lang new file mode 100644 index 00000000000..c4a28b980b9 --- /dev/null +++ b/htdocs/langs/en_AE/sendings.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - sendings +ShipmentCreationIsDoneFromOrder=For the moment, creation of a new shipment is done from the Sales Order record. diff --git a/htdocs/langs/en_AE/stocks.lang b/htdocs/langs/en_AE/stocks.lang new file mode 100644 index 00000000000..eaebe0207bc --- /dev/null +++ b/htdocs/langs/en_AE/stocks.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - stocks +WarehouseAskWarehouseDuringOrder=Set a warehouse on Sales Orders +VirtualStockAtDate=Virtual stock at a future date diff --git a/htdocs/langs/en_AE/ticket.lang b/htdocs/langs/en_AE/ticket.lang new file mode 100644 index 00000000000..64a5c8d3778 --- /dev/null +++ b/htdocs/langs/en_AE/ticket.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - ticket +BoxNewTicketVSClose=Number of tickets versus closed tickets (today) diff --git a/htdocs/langs/en_AE/trips.lang b/htdocs/langs/en_AE/trips.lang new file mode 100644 index 00000000000..dd9decdd4fe --- /dev/null +++ b/htdocs/langs/en_AE/trips.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - trips +ExpenseReportRulesDesc=You can define max amount rules for expense reports. These rules will be applied when a new expense is added to an expense report +ExpenseReportLimitAmount=Max amount +ExpenseReportRestrictive=Exceeding forbidden +ExpenseReportConstraintViolationError=Max amount exceeded (rule %s): %s is higher than %s (Exceeding forbidden) +ExpenseReportConstraintViolationWarning=Max amount exceeded (rule %s): %s is higher than %s (Exceeding authorized) diff --git a/htdocs/langs/en_AU/modulebuilder.lang b/htdocs/langs/en_AU/modulebuilder.lang new file mode 100644 index 00000000000..5db0d6ffc2c --- /dev/null +++ b/htdocs/langs/en_AU/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +TriggerDefDesc=Define in the trigger file the code that you want to execute when a business event external to your module is executed (events recorded by other modules). diff --git a/htdocs/langs/en_AU/propal.lang b/htdocs/langs/en_AU/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/en_AU/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/en_AU/ticket.lang b/htdocs/langs/en_AU/ticket.lang new file mode 100644 index 00000000000..64a5c8d3778 --- /dev/null +++ b/htdocs/langs/en_AU/ticket.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - ticket +BoxNewTicketVSClose=Number of tickets versus closed tickets (today) diff --git a/htdocs/langs/en_CA/modulebuilder.lang b/htdocs/langs/en_CA/modulebuilder.lang new file mode 100644 index 00000000000..5db0d6ffc2c --- /dev/null +++ b/htdocs/langs/en_CA/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +TriggerDefDesc=Define in the trigger file the code that you want to execute when a business event external to your module is executed (events recorded by other modules). diff --git a/htdocs/langs/en_CA/propal.lang b/htdocs/langs/en_CA/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/en_CA/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/en_CA/ticket.lang b/htdocs/langs/en_CA/ticket.lang new file mode 100644 index 00000000000..64a5c8d3778 --- /dev/null +++ b/htdocs/langs/en_CA/ticket.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - ticket +BoxNewTicketVSClose=Number of tickets versus closed tickets (today) diff --git a/htdocs/langs/en_GB/modulebuilder.lang b/htdocs/langs/en_GB/modulebuilder.lang new file mode 100644 index 00000000000..5db0d6ffc2c --- /dev/null +++ b/htdocs/langs/en_GB/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +TriggerDefDesc=Define in the trigger file the code that you want to execute when a business event external to your module is executed (events recorded by other modules). diff --git a/htdocs/langs/en_GB/ticket.lang b/htdocs/langs/en_GB/ticket.lang new file mode 100644 index 00000000000..64a5c8d3778 --- /dev/null +++ b/htdocs/langs/en_GB/ticket.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - ticket +BoxNewTicketVSClose=Number of tickets versus closed tickets (today) diff --git a/htdocs/langs/en_IN/modulebuilder.lang b/htdocs/langs/en_IN/modulebuilder.lang new file mode 100644 index 00000000000..5db0d6ffc2c --- /dev/null +++ b/htdocs/langs/en_IN/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +TriggerDefDesc=Define in the trigger file the code that you want to execute when a business event external to your module is executed (events recorded by other modules). diff --git a/htdocs/langs/en_IN/ticket.lang b/htdocs/langs/en_IN/ticket.lang new file mode 100644 index 00000000000..64a5c8d3778 --- /dev/null +++ b/htdocs/langs/en_IN/ticket.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - ticket +BoxNewTicketVSClose=Number of tickets versus closed tickets (today) diff --git a/htdocs/langs/en_SG/modulebuilder.lang b/htdocs/langs/en_SG/modulebuilder.lang new file mode 100644 index 00000000000..5db0d6ffc2c --- /dev/null +++ b/htdocs/langs/en_SG/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +TriggerDefDesc=Define in the trigger file the code that you want to execute when a business event external to your module is executed (events recorded by other modules). diff --git a/htdocs/langs/en_SG/propal.lang b/htdocs/langs/en_SG/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/en_SG/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/en_SG/ticket.lang b/htdocs/langs/en_SG/ticket.lang new file mode 100644 index 00000000000..64a5c8d3778 --- /dev/null +++ b/htdocs/langs/en_SG/ticket.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - ticket +BoxNewTicketVSClose=Number of tickets versus closed tickets (today) diff --git a/htdocs/langs/en_ZA/accountancy.lang b/htdocs/langs/en_ZA/accountancy.lang new file mode 100644 index 00000000000..fd4bce2d49b --- /dev/null +++ b/htdocs/langs/en_ZA/accountancy.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - accountancy +NotifiedExportDate=Flag exported lines as exported (modification of the lines will not be possible) +NotifiedValidationDate=Validate the exported entries (modification or deletion of the lines will not be possible) diff --git a/htdocs/langs/en_ZA/cashdesk.lang b/htdocs/langs/en_ZA/cashdesk.lang new file mode 100644 index 00000000000..19dc45d5847 --- /dev/null +++ b/htdocs/langs/en_ZA/cashdesk.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - cashdesk +NotAvailableWithBrowserPrinter=Not available when printer for receipt is set to browser diff --git a/htdocs/langs/en_ZA/compta.lang b/htdocs/langs/en_ZA/compta.lang new file mode 100644 index 00000000000..21e186d2a79 --- /dev/null +++ b/htdocs/langs/en_ZA/compta.lang @@ -0,0 +1,8 @@ +# Dolibarr language file - Source file is en_US - compta +VATReportByThirdParties=Sales tax report by third party +InvoiceLate30Days =Invoices late (> 30 days) +InvoiceLate15Days =Invoices late (15 to 30 days) +InvoiceLateMinus15Days =Invoices late (< 15 days) +InvoiceNotLate =To be collected (< 15 days) +InvoiceNotLate15Days =To be collected (15 to 30 days) +InvoiceNotLate30Days =To be collected (> 30 days) diff --git a/htdocs/langs/en_ZA/errors.lang b/htdocs/langs/en_ZA/errors.lang new file mode 100644 index 00000000000..b701bac654c --- /dev/null +++ b/htdocs/langs/en_ZA/errors.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - errors +ErrorRecordHasAtLeastOneChildOfType=Object %s has at least one child of type %s diff --git a/htdocs/langs/en_ZA/eventorganization.lang b/htdocs/langs/en_ZA/eventorganization.lang new file mode 100644 index 00000000000..dac8822b8d7 --- /dev/null +++ b/htdocs/langs/en_ZA/eventorganization.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - eventorganization +EventOrganizationDescriptionLong=Manage the organization of an event (show, conferences, attendees or speakers, with public pages for suggestion, vote or registration) diff --git a/htdocs/langs/en_ZA/members.lang b/htdocs/langs/en_ZA/members.lang new file mode 100644 index 00000000000..a4efe013601 --- /dev/null +++ b/htdocs/langs/en_ZA/members.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - members +MembersTickets=Membership address sheet +NewSubscription=New contribution diff --git a/htdocs/langs/en_ZA/modulebuilder.lang b/htdocs/langs/en_ZA/modulebuilder.lang new file mode 100644 index 00000000000..5db0d6ffc2c --- /dev/null +++ b/htdocs/langs/en_ZA/modulebuilder.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - modulebuilder +TriggerDefDesc=Define in the trigger file the code that you want to execute when a business event external to your module is executed (events recorded by other modules). diff --git a/htdocs/langs/en_ZA/mrp.lang b/htdocs/langs/en_ZA/mrp.lang new file mode 100644 index 00000000000..e0e12fc5350 --- /dev/null +++ b/htdocs/langs/en_ZA/mrp.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - mrp +ConfirmDeleteMo=Are you sure you want to delete this Manufacturing Order? diff --git a/htdocs/langs/en_ZA/orders.lang b/htdocs/langs/en_ZA/orders.lang new file mode 100644 index 00000000000..bed33ccde24 --- /dev/null +++ b/htdocs/langs/en_ZA/orders.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - orders +SaleOrderLines=Sales order lines diff --git a/htdocs/langs/en_ZA/printing.lang b/htdocs/langs/en_ZA/printing.lang new file mode 100644 index 00000000000..31440f79aed --- /dev/null +++ b/htdocs/langs/en_ZA/printing.lang @@ -0,0 +1,7 @@ +# Dolibarr language file - Source file is en_US - printing +Module64000Name=One click Printing +Module64000Desc=Enable One click Printing System +PrintingSetup=Setup of One click Printing System +PrintingDesc=This module adds a Print button to various modules to allow documents to be printed directly to a printer with no need to open the document into another application. +MenuDirectPrinting=One click Printing jobs +DirectPrint=One click Print diff --git a/htdocs/langs/en_ZA/products.lang b/htdocs/langs/en_ZA/products.lang new file mode 100644 index 00000000000..a50a97fd8db --- /dev/null +++ b/htdocs/langs/en_ZA/products.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - products +IncludingProductWithTag=Including products/services with the tag +UseProductFournDesc=Add a feature to define the product description defined by the vendors (for each vendor reference) in addition to the description for customers diff --git a/htdocs/langs/en_ZA/propal.lang b/htdocs/langs/en_ZA/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/en_ZA/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/en_ZA/receptions.lang b/htdocs/langs/en_ZA/receptions.lang new file mode 100644 index 00000000000..088c09f1f33 --- /dev/null +++ b/htdocs/langs/en_ZA/receptions.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - receptions +ReceptionCreationIsDoneFromOrder=For the moment, creation of a new reception is done from the Purchase Order record. diff --git a/htdocs/langs/en_ZA/sendings.lang b/htdocs/langs/en_ZA/sendings.lang new file mode 100644 index 00000000000..c4a28b980b9 --- /dev/null +++ b/htdocs/langs/en_ZA/sendings.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - sendings +ShipmentCreationIsDoneFromOrder=For the moment, creation of a new shipment is done from the Sales Order record. diff --git a/htdocs/langs/en_ZA/stocks.lang b/htdocs/langs/en_ZA/stocks.lang new file mode 100644 index 00000000000..eaebe0207bc --- /dev/null +++ b/htdocs/langs/en_ZA/stocks.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - stocks +WarehouseAskWarehouseDuringOrder=Set a warehouse on Sales Orders +VirtualStockAtDate=Virtual stock at a future date diff --git a/htdocs/langs/en_ZA/ticket.lang b/htdocs/langs/en_ZA/ticket.lang new file mode 100644 index 00000000000..64a5c8d3778 --- /dev/null +++ b/htdocs/langs/en_ZA/ticket.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - ticket +BoxNewTicketVSClose=Number of tickets versus closed tickets (today) diff --git a/htdocs/langs/en_ZA/trips.lang b/htdocs/langs/en_ZA/trips.lang new file mode 100644 index 00000000000..dd9decdd4fe --- /dev/null +++ b/htdocs/langs/en_ZA/trips.lang @@ -0,0 +1,6 @@ +# Dolibarr language file - Source file is en_US - trips +ExpenseReportRulesDesc=You can define max amount rules for expense reports. These rules will be applied when a new expense is added to an expense report +ExpenseReportLimitAmount=Max amount +ExpenseReportRestrictive=Exceeding forbidden +ExpenseReportConstraintViolationError=Max amount exceeded (rule %s): %s is higher than %s (Exceeding forbidden) +ExpenseReportConstraintViolationWarning=Max amount exceeded (rule %s): %s is higher than %s (Exceeding authorized) diff --git a/htdocs/langs/es_BO/propal.lang b/htdocs/langs/es_BO/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/es_BO/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/es_DO/propal.lang b/htdocs/langs/es_DO/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/es_DO/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/es_GT/propal.lang b/htdocs/langs/es_GT/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/es_GT/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/es_HN/propal.lang b/htdocs/langs/es_HN/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/es_HN/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/es_PA/propal.lang b/htdocs/langs/es_PA/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/es_PA/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/es_PY/propal.lang b/htdocs/langs/es_PY/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/es_PY/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/es_US/propal.lang b/htdocs/langs/es_US/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/es_US/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/es_UY/propal.lang b/htdocs/langs/es_UY/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/es_UY/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/fr_BE/propal.lang b/htdocs/langs/fr_BE/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/fr_BE/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/fr_CH/propal.lang b/htdocs/langs/fr_CH/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/fr_CH/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/fr_CI/propal.lang b/htdocs/langs/fr_CI/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/fr_CI/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/fr_CM/propal.lang b/htdocs/langs/fr_CM/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/fr_CM/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/fr_GA/propal.lang b/htdocs/langs/fr_GA/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/fr_GA/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/it_CH/propal.lang b/htdocs/langs/it_CH/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/it_CH/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/pt_AO/propal.lang b/htdocs/langs/pt_AO/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/pt_AO/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/langs/ru_UA/propal.lang b/htdocs/langs/ru_UA/propal.lang new file mode 100644 index 00000000000..de4e2e63224 --- /dev/null +++ b/htdocs/langs/ru_UA/propal.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - propal +PdfCommercialProposalTitle=Proposal diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 3a43d9ee6bb..da06076fe97 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -156,7 +156,7 @@ class MouvementStock extends CommonObject * @param int $price Unit price HT of product, used to calculate average weighted price (AWP or PMP in french). If 0, average weighted price is not changed. * @param string $label Label of stock movement * @param string $inventorycode Inventory code - * @param string $datem Force date of movement + * @param integer|string $datem Force date of movement * @param integer|string $eatby eat-by date. Will be used if lot does not exists yet and will be created. * @param integer|string $sellby sell-by date. Will be used if lot does not exists yet and will be created. * @param string $batch batch number @@ -439,7 +439,7 @@ class MouvementStock extends CommonObject $sql .= " datem, fk_product, batch, eatby, sellby,"; $sql .= " fk_entrepot, value, type_mouvement, fk_user_author, label, inventorycode, price, fk_origin, origintype, fk_projet"; $sql .= ")"; - $sql .= " VALUES ('".$this->db->idate($now)."', ".((int) $this->product_id).", "; + $sql .= " VALUES ('".$this->db->idate($this->datem)."', ".((int) $this->product_id).", "; $sql .= " ".($batch ? "'".$this->db->escape($batch)."'" : "null").", "; $sql .= " ".($eatby ? "'".$this->db->idate($eatby)."'" : "null").", "; $sql .= " ".($sellby ? "'".$this->db->idate($sellby)."'" : "null").", "; @@ -764,19 +764,19 @@ class MouvementStock extends CommonObject /** * Decrease stock for product and subproducts * - * @param User $user Object user - * @param int $fk_product Id product - * @param int $entrepot_id Warehouse id - * @param int $qty Quantity - * @param int $price Price - * @param string $label Label of stock movement - * @param string $datem Force date of movement - * @param integer $eatby eat-by date - * @param integer $sellby sell-by date - * @param string $batch batch number - * @param int $id_product_batch Id product_batch - * @param string $inventorycode Inventory code - * @return int <0 if KO, >0 if OK + * @param User $user Object user + * @param int $fk_product Id product + * @param int $entrepot_id Warehouse id + * @param int $qty Quantity + * @param int $price Price + * @param string $label Label of stock movement + * @param integer|string $datem Force date of movement + * @param integer $eatby eat-by date + * @param integer $sellby sell-by date + * @param string $batch batch number + * @param int $id_product_batch Id product_batch + * @param string $inventorycode Inventory code + * @return int <0 if KO, >0 if OK */ public function livraison($user, $fk_product, $entrepot_id, $qty, $price = 0, $label = '', $datem = '', $eatby = '', $sellby = '', $batch = '', $id_product_batch = 0, $inventorycode = '') { @@ -799,7 +799,7 @@ class MouvementStock extends CommonObject * @param integer|string $eatby eat-by date * @param integer|string $sellby sell-by date * @param string $batch batch number - * @param string $datem Force date of movement + * @param integer|string $datem Force date of movement * @param int $id_product_batch Id product_batch * @param string $inventorycode Inventory code * @return int <0 if KO, >0 if OK @@ -813,28 +813,6 @@ class MouvementStock extends CommonObject return $this->_create($user, $fk_product, $entrepot_id, $qty, 3, $price, $label, $inventorycode, $datem, $eatby, $sellby, $batch, $skip_batch, $id_product_batch); } - - // /** - // * Return nb of subproducts lines for a product - // * - // * @param int $id Id of product - // * @return int <0 if KO, nb of subproducts if OK - // * @deprecated A count($product->getChildsArbo($id,1)) is same. No reason to have this in this class. - // */ - // public function nbOfSubProducts($id) - // { - // $nbSP=0; - - // $resql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."product_association"; - // $resql.= " WHERE fk_product_pere = ".((int) $id); - // if ($this->db->query($resql)) - // { - // $obj=$this->db->fetch_object($resql); - // $nbSP=$obj->nb; - // } - // return $nbSP; - // } - /** * Count number of product in stock before a specific date * diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 63eda493c9a..9f326e8d36b 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -1649,7 +1649,14 @@ if ($action == 'create') { } print ''; } else { - if ($object->statut <= 1) { + $statusreceived = $object::STATUS_CLOSED; + if (getDolGlobalInt("STOCK_CALCULATE_ON_RECEPTION")) { + $statusreceived = $object::STATUS_VALIDATED; + } + if (getDolGlobalInt("STOCK_CALCULATE_ON_RECEPTION_CLOSE")) { + $statusreceived = $object::STATUS_CLOSED; + } + if ($object->statut < $statusreceived) { print ''.$langs->trans("QtyToReceive").''; } else { print ''.$langs->trans("QtyReceived").''; @@ -1988,14 +1995,14 @@ if ($action == 'create') { if ($object->statut == Reception::STATUS_DRAFT && $num_prod > 0) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->reception->reception_advance->validate))) { - print ''.$langs->trans("Validate").''; + print ''.$langs->trans("Validate").''; } else { print ''.$langs->trans("Validate").''; } } - // Edit + // Back to draft if ($object->statut == Reception::STATUS_VALIDATED && $user->rights->reception->creer) { - print ''; + print ''; } // TODO add alternative status diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 7f3451ad1ba..bdf53d5d2b7 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -138,7 +138,14 @@ class Reception extends CommonObject $this->statuts = array(); $this->statuts[-1] = 'StatusReceptionCanceled'; $this->statuts[0] = 'StatusReceptionDraft'; + // product to receive if stock increase is on close or already received if stock increase is on validation $this->statuts[1] = 'StatusReceptionValidated'; + if (getDolGlobalInt("STOCK_CALCULATE_ON_RECEPTION")) { + $this->statuts[1] = 'StatusReceptionValidatedReceived'; + } + if (getDolGlobalInt("STOCK_CALCULATE_ON_RECEPTION_CLOSE")) { + $this->statuts[1] = 'StatusReceptionValidatedToReceive'; + } $this->statuts[2] = 'StatusReceptionProcessed'; // List of short language codes for status @@ -590,10 +597,11 @@ class Reception extends CommonObject // line without batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record. + $inventorycode = ''; if (!empty($conf->global->STOCK_CALCULATE_ON_RECEPTION || $conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) { - $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->cost_price, $langs->trans("ReceptionValidatedInDolibarr", $numref)); + $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->cost_price, $langs->trans("ReceptionValidatedInDolibarr", $numref), '', '', '', '', 0, $inventorycode); } else { - $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ReceptionValidatedInDolibarr", $numref)); + $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ReceptionValidatedInDolibarr", $numref), '', '', '', '', 0, $inventorycode); } if ($result < 0) { $error++; @@ -606,10 +614,11 @@ class Reception extends CommonObject // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record. // Note: ->fk_origin_stock = id into table llx_product_batch (may be rename into llx_product_stock_batch in another version) + $inventorycode = ''; if (!empty($conf->global->STOCK_CALCULATE_ON_RECEPTION || $conf->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE)) { - $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->cost_price, $langs->trans("ReceptionValidatedInDolibarr", $numref), $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch); + $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->cost_price, $langs->trans("ReceptionValidatedInDolibarr", $numref), $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch, '', 0, $inventorycode); } else { - $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ReceptionValidatedInDolibarr", $numref), $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch); + $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ReceptionValidatedInDolibarr", $numref), $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch, '', 0, $inventorycode); } if ($result < 0) { $error++; @@ -1444,7 +1453,7 @@ class Reception extends CommonObject } /** - * Classify the reception as closed. + * Classify the reception as closed (this record also the stock movement) * * @return int <0 if KO, >0 if OK */ @@ -1526,7 +1535,8 @@ class Reception extends CommonObject // line without batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record - $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ReceptionClassifyClosedInDolibarr", $numref)); + $inventorycode = ''; + $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ReceptionClassifyClosedInDolibarr", $this->ref), '', '', '', '', 0, $inventorycode); if ($result < 0) { $this->error = $mouvS->error; $this->errors = $mouvS->errors; @@ -1536,7 +1546,8 @@ class Reception extends CommonObject // line with batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record - $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ReceptionClassifyClosedInDolibarr", $numref), $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch); + $inventorycode = ''; + $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $qty, $obj->subprice, $langs->trans("ReceptionClassifyClosedInDolibarr", $this->ref), $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch, '', 0, $inventorycode); if ($result < 0) { $this->error = $mouvS->error; @@ -1688,7 +1699,9 @@ class Reception extends CommonObject // line without batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record - $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, -$qty, $obj->subprice, $langs->trans("ReceptionUnClassifyCloseddInDolibarr", $numref)); + $inventorycode = ''; + $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, -$qty, $obj->subprice, $langs->trans("ReceptionUnClassifyCloseddInDolibarr", $numref), '', '', '', '', 0, $inventorycode); + if ($result < 0) { $this->error = $mouvS->error; $this->errors = $mouvS->errors; @@ -1698,7 +1711,8 @@ class Reception extends CommonObject // line with batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record - $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, -$qty, $obj->subprice, $langs->trans("ReceptionUnClassifyCloseddInDolibarr", $numref), $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch, $obj->fk_origin_stock); + $inventorycode = ''; + $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, -$qty, $obj->subprice, $langs->trans("ReceptionUnClassifyCloseddInDolibarr", $numref), $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch, '', $obj->fk_origin_stock, $inventorycode); if ($result < 0) { $this->error = $mouvS->error; $this->errors = $mouvS->errors; @@ -1720,10 +1734,15 @@ class Reception extends CommonObject } } - if ($this->origin == 'order_supplier') { + if (!$error && $this->origin == 'order_supplier') { $commande = new CommandeFournisseur($this->db); $commande->fetch($this->origin_id); - $commande->setStatus($user, 4); + $result = $commande->setStatus($user, 4); + if ($result < 0) { + $error++; + $this->error = $commande->error; + $this->errors = $commande->errors; + } } } else { $error++; @@ -1810,7 +1829,8 @@ class Reception extends CommonObject // line without batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record - $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, -$qty, $obj->subprice, $langs->trans("ReceptionBackToDraftInDolibarr", $this->ref)); + $inventorycode = ''; + $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, -$qty, $obj->subprice, $langs->trans("ReceptionBackToDraftInDolibarr", $this->ref), '', '', '', '', 0, $inventorycode); if ($result < 0) { $this->error = $mouvS->error; $this->errors = $mouvS->errors; @@ -1821,7 +1841,8 @@ class Reception extends CommonObject // line with batch detail // We decrement stock of product (and sub-products) -> update table llx_product_stock (key of this table is fk_product+fk_entrepot) and add a movement record - $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, -$qty, $obj->subprice, $langs->trans("ReceptionBackToDraftInDolibarr", $this->ref), $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch); + $inventorycode = ''; + $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, -$qty, $obj->subprice, $langs->trans("ReceptionBackToDraftInDolibarr", $this->ref), $this->db->jdate($obj->eatby), $this->db->jdate($obj->sellby), $obj->batch, '', 0, $inventorycode); if ($result < 0) { $this->error = $mouvS->error; $this->errors = $mouvS->errors; diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index faef5e5beaf..40da31fa619 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -343,6 +343,7 @@ if (empty($reshook)) { $search_town = ""; $search_zip = ""; $search_state = ""; + $search_region = ""; $search_country = ''; $search_email = ''; $search_phone = ''; @@ -492,7 +493,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_effectif as staff on (staff.id = s.fk_effectif)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_regions as region on (region. code_region = state.fk_region)"; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_regions as region on (region.code_region = state.fk_region)"; // We'll need this table joined to the select in order to filter by categ if (!empty($search_categ_cus) && $search_categ_cus != '-1') { $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cc ON s.rowid = cc.fk_soc"; // We'll need this table joined to the select in order to filter by categ @@ -774,6 +775,9 @@ if ($search_url != '') { if ($search_state != '') { $param .= "&search_state=".urlencode($search_state); } +if ($search_region != '') { + $param .= "&search_region=".urlencode($search_region); +} if ($search_country != '') { $param .= "&search_country=".urlencode($search_country); } diff --git a/test/phpunit/FunctionsLibTest.php b/test/phpunit/FunctionsLibTest.php index 5287b65b0c7..1bf3b6378fb 100644 --- a/test/phpunit/FunctionsLibTest.php +++ b/test/phpunit/FunctionsLibTest.php @@ -1048,13 +1048,19 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase $this->assertFalse($verifcond, 'Test a false comparison'); $verifcond=verifCond('$conf->facture->enabled'); - $this->assertTrue($verifcond, 'Test that conf property of a module report true when enabled'); + $this->assertTrue($verifcond, 'Test that the conf property of a module reports true when enabled'); $verifcond=verifCond('$conf->moduledummy->enabled'); - $this->assertFalse($verifcond, 'Test that conf property of a module report false when disabled'); + $this->assertFalse($verifcond, 'Test that the conf property of a module reports false when disabled'); + + $verifcond=verifCond(0); + $this->assertFalse($verifcond, 'Test that verifConf(0) return False'); + + $verifcond=verifCond("0"); + $this->assertFalse($verifcond, 'Test that verifConf("0") return False'); $verifcond=verifCond(''); - $this->assertTrue($verifcond); + $this->assertTrue($verifcond, 'Test that verifConf("") return False (special case)'); } /**