Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	ChangeLog
	htdocs/comm/action/card.php
	htdocs/core/lib/functions.lib.php
	htdocs/filefunc.inc.php
	htdocs/fourn/class/fournisseur.commande.class.php
	htdocs/langs/ar_IQ/bills.lang
	htdocs/langs/ar_IQ/cashdesk.lang
	htdocs/langs/ar_IQ/modulebuilder.lang
	htdocs/langs/ar_IQ/partnership.lang
	htdocs/langs/ar_IQ/propal.lang
	htdocs/langs/ar_IQ/stocks.lang
	htdocs/langs/ar_IQ/ticket.lang
	htdocs/langs/en_AE/admin.lang
	htdocs/langs/en_US/receptions.lang
	htdocs/langs/en_ZA/admin.lang
	htdocs/product/stock/class/mouvementstock.class.php
	htdocs/reception/class/reception.class.php
This commit is contained in:
Laurent Destailleur 2021-11-19 23:13:32 +01:00
commit 48d7378282
78 changed files with 390 additions and 79 deletions

117
ChangeLog
View File

@ -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

View File

@ -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 '</td></tr>';
}

View File

@ -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']) {

View File

@ -7817,7 +7817,7 @@ abstract class CommonObject
if ($display_type == 'card') {
$out .= '<tr '.($html_id ? 'id="'.$html_id.'" ' : '').$csstyle.' class="valuefieldcreate '.$class.$this->element.'_extras_'.$key.' trextrafields_collapse'.$extrafields_collapse_num.(!empty($this->id)?'_'.$this->id:'').'" '.$domData.' >';
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 .= '<td></td>';
}
$out .= '<td class="wordbreak';

View File

@ -9,7 +9,7 @@
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2014-2017 Francis Appels <francis.appels@yahoo.com>
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2016-2021 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2020 Lenin Rivas <lenin@leninrivas.com>
@ -368,11 +368,11 @@ class Expedition extends CommonObject
$num = count($this->lines);
for ($i = 0; $i < $num; $i++) {
if (!isset($this->lines[$i]->detail_batch)) { // no batch management
if (!$this->create_line($this->lines[$i]->entrepot_id, $this->lines[$i]->origin_line_id, $this->lines[$i]->qty, $this->lines[$i]->rang, $this->lines[$i]->array_options) > 0) {
if ($this->create_line($this->lines[$i]->entrepot_id, $this->lines[$i]->origin_line_id, $this->lines[$i]->qty, $this->lines[$i]->rang, $this->lines[$i]->array_options) <= 0) {
$error++;
}
} else { // with batch management
if (!$this->create_line_batch($this->lines[$i], $this->lines[$i]->array_options) > 0) {
if ($this->create_line_batch($this->lines[$i], $this->lines[$i]->array_options) <= 0) {
$error++;
}
}
@ -414,7 +414,6 @@ class Expedition extends CommonObject
}
} else {
$error++;
$this->error = $this->db->lasterror()." - sql=$sql";
$this->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;
}
}
/**

View File

@ -10,7 +10,7 @@
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2021 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2021 Josep Lluís Amador <joseplluis@lliuretic.cat>
*
* This program is free software; you can redistribute it and/or modify

View File

@ -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);

View File

@ -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).

View File

@ -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).

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -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)

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - cashdesk
NotAvailableWithBrowserPrinter=Not available when printer for receipt is set to browser

View File

@ -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)

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - errors
ErrorRecordHasAtLeastOneChildOfType=Object %s has at least one child of type %s

View File

@ -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)

View File

@ -0,0 +1,3 @@
# Dolibarr language file - Source file is en_US - members
MembersTickets=Membership address sheet
NewSubscription=New contribution

View File

@ -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).

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - mrp
ConfirmDeleteMo=Are you sure you want to delete this Manufacturing Order?

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - orders
SaleOrderLines=Sales order lines

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - ticket
BoxNewTicketVSClose=Number of tickets versus closed tickets (today)

View File

@ -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)

View File

@ -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).

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - ticket
BoxNewTicketVSClose=Number of tickets versus closed tickets (today)

View File

@ -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).

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - ticket
BoxNewTicketVSClose=Number of tickets versus closed tickets (today)

View File

@ -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).

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - ticket
BoxNewTicketVSClose=Number of tickets versus closed tickets (today)

View File

@ -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).

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - ticket
BoxNewTicketVSClose=Number of tickets versus closed tickets (today)

View File

@ -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).

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - ticket
BoxNewTicketVSClose=Number of tickets versus closed tickets (today)

View File

@ -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)

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - cashdesk
NotAvailableWithBrowserPrinter=Not available when printer for receipt is set to browser

View File

@ -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)

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - errors
ErrorRecordHasAtLeastOneChildOfType=Object %s has at least one child of type %s

View File

@ -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)

View File

@ -0,0 +1,3 @@
# Dolibarr language file - Source file is en_US - members
MembersTickets=Membership address sheet
NewSubscription=New contribution

View File

@ -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).

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - mrp
ConfirmDeleteMo=Are you sure you want to delete this Manufacturing Order?

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - orders
SaleOrderLines=Sales order lines

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - ticket
BoxNewTicketVSClose=Number of tickets versus closed tickets (today)

View File

@ -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)

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -0,0 +1,2 @@
# Dolibarr language file - Source file is en_US - propal
PdfCommercialProposalTitle=Proposal

View File

@ -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
*

View File

@ -1649,7 +1649,14 @@ if ($action == 'create') {
}
print '</td>';
} 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 '<td class="center">'.$langs->trans("QtyToReceive").'</td>';
} else {
print '<td class="center">'.$langs->trans("QtyReceived").'</td>';
@ -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 '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=valid">'.$langs->trans("Validate").'</a>';
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=valid&token='.newToken().'">'.$langs->trans("Validate").'</a>';
} else {
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotAllowed").'">'.$langs->trans("Validate").'</a>';
}
}
// Edit
// Back to draft
if ($object->statut == Reception::STATUS_VALIDATED && $user->rights->reception->creer) {
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?id='.$object->id.'&amp;action=modif">'.$langs->trans('Modify').'</a></div>';
print '<div class="inline-block divButAction"><a class="butAction" href="card.php?id='.$object->id.'&action=modif&token='.newToken().'">'.$langs->trans('SetToDraft').'</a></div>';
}
// TODO add alternative status

View File

@ -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;

View File

@ -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);
}

View File

@ -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)');
}
/**