diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 035387834bd..84deea18f00 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -3,7 +3,7 @@
*Please:*
- *only keep the "Fix", "Close" or "New" section*
- *follow the project [contributing guidelines](/.github/CONTRIBUTING.md)*
-- *replace the bracket enclosed textswith meaningful informations*
+- *replace the bracket enclosed texts with meaningful information*
# Fix #[*issue_number Short description*]
diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php
index 09156e08588..1b6fa5bebe7 100644
--- a/htdocs/admin/workflow.php
+++ b/htdocs/admin/workflow.php
@@ -91,15 +91,21 @@ $workflowcodes = array(
),
// Automatic classification of order
- 'WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING'=>array(
+ 'WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING'=>array( // when shipping validated
'family'=>'classify_order',
'position'=>40,
'enabled'=>(!empty($conf->expedition->enabled) && !empty($conf->commande->enabled)),
'picto'=>'order'
),
- 'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER'=>array(
+ 'WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING_CLOSED'=>array( // when shipping closed
'family'=>'classify_order',
'position'=>41,
+ 'enabled'=>(!empty($conf->expedition->enabled) && !empty($conf->commande->enabled)),
+ 'picto'=>'order'
+ ),
+ 'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER'=>array(
+ 'family'=>'classify_order',
+ 'position'=>42,
'enabled'=>(!empty($conf->facture->enabled) && !empty($conf->commande->enabled)),
'picto'=>'order',
'warning'=>''
diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php
index 1094eabf0c6..f7795a14f47 100644
--- a/htdocs/bookmarks/card.php
+++ b/htdocs/bookmarks/card.php
@@ -40,7 +40,7 @@ $action = GETPOST("action", "alpha");
$title = (string) GETPOST("title", "alpha");
$url = (string) GETPOST("url", "alpha");
$urlsource = GETPOST("urlsource", "alpha");
-$target = GETPOST("target", "alpha");
+$target = GETPOST("target", "int");
$userid = GETPOST("userid", "int");
$position = GETPOST("position", "int");
$backtopage = GETPOST('backtopage', 'alpha');
@@ -169,7 +169,7 @@ if ($action == 'create') {
// Target
print '
| '.$langs->trans("BehaviourOnClick").' | ';
$liste = array(0=>$langs->trans("ReplaceWindow"), 1=>$langs->trans("OpenANewWindow"));
- print $form->selectarray('target', $liste, 1);
+ print $form->selectarray('target', $liste, GETPOSTISSET('target') ? GETPOST('target', 'int') : 1);
print ' | '.$langs->trans("ChooseIfANewWindowMustBeOpenedOnClickOnBookmark").' |
';
// Owner
diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php
index c6c0d277edd..bbf86d87c59 100644
--- a/htdocs/comm/action/class/actioncomm.class.php
+++ b/htdocs/comm/action/class/actioncomm.class.php
@@ -261,7 +261,7 @@ class ActionComm extends CommonObject
/**
* @var int socpeople id linked to action
*/
- public $contactid;
+ public $contact_id;
/**
* @var Societe|null Company linked to action (optional)
@@ -273,7 +273,7 @@ class ActionComm extends CommonObject
/**
* @var Contact|null Contact linked to action (optional)
* @deprecated
- * @see $contactid
+ * @see $contact_id
*/
public $contact;
diff --git a/htdocs/core/modules/modWorkflow.class.php b/htdocs/core/modules/modWorkflow.class.php
index fbf7927ed1c..eaaf15d40a1 100644
--- a/htdocs/core/modules/modWorkflow.class.php
+++ b/htdocs/core/modules/modWorkflow.class.php
@@ -87,6 +87,7 @@ class modWorkflow extends DolibarrModules
0=>array('WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL', 'chaine', '1', 'WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL', 0, 'current', 0),
1=>array('WORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL', 'chaine', '1', 'WORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL', 0, 'current', 0),
2=>array('WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING', 'chaine', '1', 'WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING', 0, 'current', 0),
+ 3=>array('WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING_CLOSED', 'chaine', '1', 'WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING_CLOSED', 0, 'current', 0),
4=>array('WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER', 'chaine', '1', 'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER', 0, 'current', 0),
5=>array('WORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL', 'chaine', '1', 'WORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL', 0, 'current', 0),
6=>array('WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER', 'chaine', '1', 'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER', 0, 'current', 0),
diff --git a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php
index 72a08d22494..8235348f21f 100644
--- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php
+++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php
@@ -256,10 +256,15 @@ class InterfaceWorkflowManager extends DolibarrTriggers
}
}
- if ($action == 'SHIPPING_VALIDATE') {
+ if (($action == 'SHIPPING_VALIDATE') || ($action == 'SHIPPING_CLOSED')) {
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
- if (!empty($conf->commande->enabled) && !empty($conf->expedition->enabled) && !empty($conf->workflow->enabled) && !empty($conf->global->WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING)) {
+ if (!empty($conf->commande->enabled) && !empty($conf->expedition->enabled) && !empty($conf->workflow->enabled) &&
+ (
+ (!empty($conf->global->WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING) && ($action == 'SHIPPING_VALIDATE')) ||
+ (!empty($conf->global->WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING_CLOSED) && ($action == 'SHIPPING_CLOSED'))
+ )
+ ) {
$qtyshipped = array();
$qtyordred = array();
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
@@ -318,6 +323,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
}
}
}
+
// classify billed reception
if ($action == 'BILL_SUPPLIER_VALIDATE') {
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id, LOG_DEBUG);
diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php
index fe2c42b0d1b..8a294a47e2c 100644
--- a/htdocs/hrm/index.php
+++ b/htdocs/hrm/index.php
@@ -234,7 +234,7 @@ if (!empty($conf->holiday->enabled) && $user->rights->holiday->read) {
print '';
print '| '.$holidaystatic->getNomUrl(1).' | ';
print ''.$userstatic->getNomUrl(-1, 'leave').' | ';
- print ''.dol_escape_htmltag($typeleaves[$obj->fk_type]['label']).' | ';
+ print ''.dol_escape_htmltag($langs->trans($typeleaves[$obj->fk_type]['code'])).' | ';
$starthalfday = ($obj->halfday == -1 || $obj->halfday == 2) ? 'afternoon' : 'morning';
$endhalfday = ($obj->halfday == 1 || $obj->halfday == 2) ? 'morning' : 'afternoon';
diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang
index 86fdfd753a5..3b2d704a453 100644
--- a/htdocs/langs/en_US/cashdesk.lang
+++ b/htdocs/langs/en_US/cashdesk.lang
@@ -128,3 +128,4 @@ PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts
WeighingScale=Weighing scale
ShowPriceHT = Display the column with the price excluding tax (on screen)
ShowPriceHTOnReceipt = Display the column with the price excluding tax (on the receipt)
+CustomerDisplay=Customer display
diff --git a/htdocs/langs/en_US/workflow.lang b/htdocs/langs/en_US/workflow.lang
index 15fd8ef07c2..fafbc6e8d8a 100644
--- a/htdocs/langs/en_US/workflow.lang
+++ b/htdocs/langs/en_US/workflow.lang
@@ -13,6 +13,7 @@ descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as b
descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order)
descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order)
descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update)
+descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING_CLOSED=Classify linked source sales order as shipped when a shipment is closed (and if the quantity shipped by all shipments is the same as in the order to update)
# Autoclassify purchase order
descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal)
descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order)
diff --git a/htdocs/langs/fr_FR/workflow.lang b/htdocs/langs/fr_FR/workflow.lang
index 2af480afa83..13fbbace793 100644
--- a/htdocs/langs/fr_FR/workflow.lang
+++ b/htdocs/langs/fr_FR/workflow.lang
@@ -13,6 +13,7 @@ descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classer la/les proposition(s) commer
descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classer la/les commande(s) client(s) source(s) facturée(s) à la validation de la facture client (et si le montant de la facture est le même que le montant total des commandes liées)
descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classer la/les commande(s) client(s) source(s) à Facturée quand une facture client est passée à Payé (et si le montant de la facture est identique à la somme des commandes sources)
descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classer la commande source à expédiée à la validation d'une expédition (et si les quantités expédiées dans le bon d'expédition sont les même que dans la commande mise à jour)
+descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING_CLOSED=Classer la commande source à expédiée à la cloture d'une expédition (et si les quantités expédiées dans le bon d'expédition sont les même que dans la commande mise à jour)
# Autoclassify purchase order
descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classer la ou les proposition(s) commerciale(s) fournisseur sources facturées quand une facture fournisseur est validée (et si le montant de la facture est le même que le total des propositions sources liées)
descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classer la ou les commande(s) fournisseur(s) de source(s) à facturée(s) lorsque la facture fournisseur est validée (et si le montant de la facture est le même que le montant total des commandes liées)
diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php
index ee4b64471c3..df5dcba60ad 100644
--- a/htdocs/mrp/class/mo.class.php
+++ b/htdocs/mrp/class/mo.class.php
@@ -118,7 +118,7 @@ class Mo extends CommonObject
'date_end_planned' => array('type'=>'datetime', 'label'=>'DateEndPlannedMo', 'enabled'=>1, 'visible'=>1, 'position'=>56, 'notnull'=>-1, 'index'=>1,),
'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>1000, 'notnull'=>-1,),
'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'position'=>1010),
- 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>2, 'position'=>1000, 'default'=>0, 'notnull'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Brouillon', '1'=>'Validated', '2'=>'InProgress', '3'=>'StatusMOProduced', '9'=>'Canceled')),
+ 'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>2, 'position'=>1000, 'default'=>0, 'notnull'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Validated', '2'=>'InProgress', '3'=>'StatusMOProduced', '9'=>'Canceled')),
);
public $rowid;
public $ref;
diff --git a/htdocs/takepos/admin/receipt.php b/htdocs/takepos/admin/receipt.php
index 9b236fc837a..74a54400fef 100644
--- a/htdocs/takepos/admin/receipt.php
+++ b/htdocs/takepos/admin/receipt.php
@@ -254,6 +254,14 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && filter_var($con
print "
\n";
}
+if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector" && filter_var($conf->global->TAKEPOS_PRINT_SERVER, FILTER_VALIDATE_URL) == true) {
+ print '| ';
+ print $langs->trans('CustomerDisplay');
+ print ' | ';
+ print ajax_constantonoff("TAKEPOS_CUSTOMER_DISPLAY", array(), $conf->entity, 0, 0, 1, 0);
+ print " |
\n";
+}
+
print '';
print '';
diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php
index e7b8b8af438..d11a081280c 100644
--- a/htdocs/takepos/index.php
+++ b/htdocs/takepos/index.php
@@ -434,7 +434,7 @@ function ClickProduct(position) {
if (idproduct=="") return;
// Call page invoice.php to generate the section with product lines
$("#poslines").load("invoice.php?action=addline&place="+place+"&idproduct="+idproduct+"&selectedline="+selectedline, function() {
- //$('#poslines').scrollTop($('#poslines')[0].scrollHeight);
+ global->TAKEPOS_CUSTOMER_DISPLAY)) echo "CustomerDisplay();";?>
});
}
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index 721a7b92ae8..5526a5607d1 100644
--- a/htdocs/takepos/invoice.php
+++ b/htdocs/takepos/invoice.php
@@ -550,6 +550,10 @@ if ($action == "addline") {
if ($idoflineadded <= 0) {
$invoice->fetch_thirdparty();
$idoflineadded = $invoice->addline($prod->description, $price, 1, $tva_tx, $localtax1_tx, $localtax2_tx, $idproduct, $customer->remise_percent, '', 0, 0, 0, '', $price_base_type, $price_ttc, $prod->type, -1, 0, '', 0, $parent_line, null, '', '', 0, 100, '', null, 0);
+ if (!empty($conf->global->TAKEPOS_CUSTOMER_DISPLAY)) {
+ $CUSTOMER_DISPLAY_line1 = $prod->label;
+ $CUSTOMER_DISPLAY_line2 = price($price_ttc);
+ }
}
$invoice->fetch($placeid);
@@ -1176,6 +1180,23 @@ $( document ).ready(function() {
});
+
+global->TAKEPOS_CUSTOMER_DISPLAY)) {
+ echo "function CustomerDisplay(){";
+ echo "var line1='".$CUSTOMER_DISPLAY_line1."'.substring(0,20);";
+ echo "line1=line1.padEnd(20);";
+ echo "var line2='".$CUSTOMER_DISPLAY_line2."'.substring(0,20);";
+ echo "line2=line2.padEnd(20);";
+ echo "$.ajax({
+ type: 'GET',
+ data: { text: line1+line2 },
+ url: '".getDolGlobalString('TAKEPOS_PRINT_SERVER')."/display/index.php',
+ });";
+ echo "}";
+}
+?>
+
global->TAKEPOS_NUMPAD == 0) {
});
}, 2500);
}
+
+global->TAKEPOS_CUSTOMER_DISPLAY)) {
+ echo "var line1='".$langs->trans('TotalTTC')."'.substring(0,20);";
+ echo "line1=line1.padEnd(20);";
+ echo "var line2='".price($invoice->total_ttc, 1, '', 1, -1, -1)."'.substring(0,20);";
+ echo "line2=line2.padEnd(20);";
+ echo "$.ajax({
+ type: 'GET',
+ data: { text: line1+line2 },
+ url: '".getDolGlobalString('TAKEPOS_PRINT_SERVER')."/display/index.php',
+ });";
+}
+?>