diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 6453baee8b1..07bbd4ed74b 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -3044,7 +3044,7 @@ if ($action == 'create' && $usercancreate) {
// Cancel order
if ($object->statut == Commande::STATUS_VALIDATED && !empty($usercancancel)) {
- print 'id.'&action=cancel&token='.newToken().'">'.$langs->trans("Cancel").' ';
+ print 'id.'&action=cancel&token='.newToken().'">'.$langs->trans("CancelOrder").' ';
}
// Delete order
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index 8c8f661fac8..d3cbb3c2367 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -1312,7 +1312,7 @@ if ($permissiontoclose) {
$arrayofmassactions['setbilled'] = img_picto('', 'bill', 'class="pictofixedwidth"').$langs->trans("ClassifyBilled");
}
if ($permissiontocancel) {
- $arrayofmassactions['cancelorders'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("Cancel");
+ $arrayofmassactions['cancelorders'] = img_picto('', 'close_title', 'class="pictofixedwidth"').$langs->trans("CancelOrder");
}
if (!empty($permissiontodelete)) {
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php
index 84131a90fc3..038663e4dc5 100644
--- a/htdocs/compta/bank/bankentries_list.php
+++ b/htdocs/compta/bank/bankentries_list.php
@@ -1290,6 +1290,9 @@ if ($resql) {
$savnbfield = $totalarray['nbfield'];
$totalarray = array();
$totalarray['nbfield'] = 0;
+ $totalarray['totaldeb'] = 0;
+ $totalarray['totalcred'] = 0;
+
$imaxinloop = ($limit ? min($num, $limit) : $num);
while ($i < $imaxinloop) {
$objp = $db->fetch_object($resql);
diff --git a/htdocs/compta/stats/byratecountry.php b/htdocs/compta/stats/byratecountry.php
index a8c5f88e435..dced36d44a6 100644
--- a/htdocs/compta/stats/byratecountry.php
+++ b/htdocs/compta/stats/byratecountry.php
@@ -374,9 +374,9 @@ if ($modecompta == 'CREANCES-DETTES') {
$j -= 12;
}
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
- print '
'.$langs->trans('RefSupplier').' '.$langs->trans('RefSupplierBill').' id) && $societe->id > 0) {
print ' autofocus';
}
@@ -2961,7 +2961,7 @@ if ($action == 'create') {
if ($action == 'clone') {
// Create an array for form
$formquestion = array(
- array('type' => 'text', 'name' => 'newsupplierref', 'label' => $langs->trans("RefSupplier"), 'value' => $langs->trans("CopyOf").' '.$object->ref_supplier),
+ array('type' => 'text', 'name' => 'newsupplierref', 'label' => $langs->trans("RefSupplierBill"), 'value' => $langs->trans("CopyOf").' '.$object->ref_supplier),
array('type' => 'date', 'name' => 'newdate', 'label' => $langs->trans("Date"), 'value' => dol_now())
);
// Ask confirmation to clone
@@ -3193,8 +3193,8 @@ if ($action == 'create') {
$morehtmlref = '';
// Ref supplier
- $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string', '', 0, 1);
- $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string', '', null, null, '', 1);
+ $morehtmlref .= $form->editfieldkey("RefSupplierBill", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string', '', 0, 1);
+ $morehtmlref .= $form->editfieldval("RefSupplierBill", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string', '', null, null, '', 1);
// Thirdparty
$morehtmlref .= ' '.$object->thirdparty->getNomUrl(1, 'supplier');
if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) {
diff --git a/htdocs/fourn/facture/rapport.php b/htdocs/fourn/facture/rapport.php
index 60cf47d3d80..d2ff9442df6 100644
--- a/htdocs/fourn/facture/rapport.php
+++ b/htdocs/fourn/facture/rapport.php
@@ -36,7 +36,7 @@ $socid = '';
if (!empty($user->socid)) {
$socid = $user->socid;
}
-$result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture');
+$result = restrictedArea($user, 'fournisseur', 0, 'facture_fourn', 'facture');
$action = GETPOST('action', 'aZ09');
diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang
index 63c86001b28..e45de1d3553 100644
--- a/htdocs/langs/en_US/bills.lang
+++ b/htdocs/langs/en_US/bills.lang
@@ -268,6 +268,8 @@ NoDraftBills=No draft invoices
NoOtherDraftBills=No other draft invoices
NoDraftInvoices=No draft invoices
RefBill=Invoice ref
+RefSupplierBill=Supplier invoice ref
+SupplierOrderCreateBill=Create invoice
ToBill=To bill
RemainderToBill=Remainder to bill
SendBillByMail=Send invoice by email
diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php
index f39df3b4085..f70639a6a05 100644
--- a/htdocs/product/composition/card.php
+++ b/htdocs/product/composition/card.php
@@ -389,6 +389,10 @@ if ($id > 0 || !empty($ref)) {
if (isModEnabled('stock')) {
print '
'.$langs->trans('Stock').' ';
}
+ // Hook fields
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
+ print $hookmanager->resPrint;
// Qty in kit
print ''.$langs->trans('Qty').' ';
// Stoc inc/dev
@@ -467,6 +471,11 @@ if ($id > 0 || !empty($ref)) {
print ''.$value['stock'].' '; // Real stock
}
+ // Hook fields
+ $parameters = array();
+ $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $productstatic); // Note that $action and $object may have been modified by hook
+ print $hookmanager->resPrint;
+
// Qty + IncDec
if ($user->hasRight('produit', 'creer') || $user->hasRight('service', 'creer')) {
print ' ';
@@ -517,6 +526,11 @@ if ($id > 0 || !empty($ref)) {
print ' '; // Real stock
}
+ // Hook fields
+ $parameters = array();
+ $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $productstatic); // Note that $action and $object may have been modified by hook
+ print $hookmanager->resPrint;
+
// Qty in kit
print ''.dol_escape_htmltag($value['nb']).' ';
diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php
index a03270f809b..1239a6dc2c4 100644
--- a/htdocs/reception/list.php
+++ b/htdocs/reception/list.php
@@ -677,7 +677,16 @@ if ($search_ref_supplier) {
if ($search_all) {
$sql .= natural_search(array_keys($fieldstosearchall), $search_all);
}
-
+// Search on sale representative
+/*
+if ($search_sale && $search_sale != '-1') {
+ if ($search_sale == -2) {
+ $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = c.fk_soc)";
+ } elseif ($search_sale > 0) {
+ $sql .= " AND EXISTS (SELECT sc.fk_soc FROM ".MAIN_DB_PREFIX."societe_commerciaux as sc WHERE sc.fk_soc = c.fk_soc AND sc.fk_user = ".((int) $search_sale).")";
+ }
+}
+*/
// Add where from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
// Add where from hooks