@@ -7739,7 +7739,7 @@ class Form
print '';
print '';
print ' | ';
- print ''.$objp->ref_client.' | ';
+ print ''.(!empty($objp->ref_client) ? $objp->ref_client : $objp->ref_supplier).' | ';
print '';
if ($possiblelink['label'] == 'LinkToContract') {
$form = new Form($this->db);
diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php
index 15710d71dfa..ce984d8b374 100644
--- a/htdocs/core/modules/modAccounting.class.php
+++ b/htdocs/core/modules/modAccounting.class.php
@@ -285,15 +285,15 @@ class modAccounting extends DolibarrModules
//'b.doc_type'=>'Doctype',
'b.doc_ref'=>'Piece',
'b.code_journal'=>'Codejournal',
- //'b.journal_label'=>'JournalLabel',
+ 'b.journal_label'=>'JournalLabel',
'b.numero_compte'=>'AccountAccounting',
- //'b.label_compte'=>'LabelAccount',
+ 'b.label_compte'=>'LabelAccount',
'b.subledger_account'=>'SubledgerAccount',
'b.subledger_label'=>'SubledgerAccountLabel',
'b.label_operation'=>'LabelOperation',
'b.debit'=>"Debit",
'b.credit'=>"Credit",
- 'b.sens'=>'Direction' // This field is still used by accounting export. We can remove it once it has been replace into accountancyexport.class.php by a detection using ->debit and ->credit
+ 'b.sens'=>'Direction' // This field is still used by accounting export. We can remove it once it has been replaced into accountancyexport.class.php by a detection using ->debit and ->credit
);
$this->import_fieldshidden_array[$r] = array('b.doc_type'=>'const-import_from_external', 'b.fk_doc'=>'const-0', 'b.fk_docdet'=>'const-0', 'b.fk_user_author'=>'user->id', 'b.date_creation'=>'const-'.dol_print_date(dol_now(), 'standard')); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent)
$this->import_regex_array[$r] = array('b.doc_date'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$');
@@ -303,9 +303,9 @@ class modAccounting extends DolibarrModules
//'b.doc_type'=>'import',
'b.doc_ref'=>'My document ABC',
'b.code_journal'=>"VTE",
- //'b.journal_label'=>"Sale journal",
+ 'b.journal_label'=>"Sale journal",
'b.numero_compte'=>"707",
- //'b.label_compte'=>'Product account 707',
+ 'b.label_compte'=>'Product account 707',
'b.subledger_account'=>'',
'b.subledger_label'=>'',
'b.label_operation'=>"Sale of ABC",
diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php
index 9392844adf2..1e78c6636ce 100644
--- a/htdocs/reception/card.php
+++ b/htdocs/reception/card.php
@@ -259,8 +259,6 @@ if (empty($reshook)) {
$objectsrc = new $classname($db);
$objectsrc->fetch($object->origin_id);
-
-
$object->socid = $objectsrc->socid;
$object->ref_supplier = GETPOST('ref_supplier', 'alpha');
$object->model_pdf = GETPOST('model');
@@ -299,15 +297,12 @@ if (empty($reshook)) {
$stockLocation = "ent1".$i."_0";
$qty = "qtyl".$i;
-
-
- //var_dump(GETPOST($qty,'int')); var_dump($_POST); var_dump($batch);exit;
- //reception line for product with no batch management and no multiple stock location
- if (GETPOST($qty, 'int') > 0) {
- $totalqty += GETPOST($qty, 'int');
+ //var_dump(GETPOST($qty,'int')); var_dump($_POST); var_dump($batch);exit;
+ //reception line for product with no batch management and no multiple stock location
+ if (GETPOST($qty, 'alpha') > 0) {
+ $totalqty += price2num(GETPOST($qty, 'alpha'), 'MS');
}
-
// Extrafields
$array_options[$i] = $extrafields->getOptionalsFromPost($object->table_element_line, $i);
}
@@ -342,10 +337,16 @@ if (empty($reshook)) {
$entrepot_id = is_numeric(GETPOST($ent, 'int')) ? GETPOST($ent, 'int') : GETPOST('entrepot_id', 'int');
+ if (!empty($lineToTest)) {
+ $fk_product = $lineToTest->fk_product;
+ } else {
+ $fk_product = $linesrc->fk_product;
+ }
+
if ($entrepot_id < 0) {
$entrepot_id = '';
}
- if (!($lineToTest->fk_product > 0) && empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
+ if (!($fk_product > 0) && empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
$entrepot_id = 0;
}
$eatby = GETPOST($eatby, 'alpha');
|