Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
This commit is contained in:
commit
18f0a0f73e
@ -936,6 +936,7 @@ class AccountancyExport
|
|||||||
foreach ($objectLines as $line) {
|
foreach ($objectLines as $line) {
|
||||||
$date_document = dol_print_date($line->doc_date, '%Y%m%d');
|
$date_document = dol_print_date($line->doc_date, '%Y%m%d');
|
||||||
$date_creation = dol_print_date($line->date_creation, '%Y%m%d');
|
$date_creation = dol_print_date($line->date_creation, '%Y%m%d');
|
||||||
|
$date_lim_reglement = dol_print_date($line->date_lim_reglement, '%Y%m%d');
|
||||||
|
|
||||||
// TYPE
|
// TYPE
|
||||||
$type_enregistrement = 'E'; // For write movement
|
$type_enregistrement = 'E'; // For write movement
|
||||||
@ -951,7 +952,7 @@ class AccountancyExport
|
|||||||
// LIBE
|
// LIBE
|
||||||
print $line->label_operation.$separator;
|
print $line->label_operation.$separator;
|
||||||
// DATH
|
// DATH
|
||||||
print $line->date_lim_reglement.$separator;
|
print $date_lim_reglement.$separator;
|
||||||
// CNPI
|
// CNPI
|
||||||
if ($line->doc_type == 'supplier_invoice') {
|
if ($line->doc_type == 'supplier_invoice') {
|
||||||
if ($line->montant < 0) {
|
if ($line->montant < 0) {
|
||||||
@ -970,21 +971,19 @@ class AccountancyExport
|
|||||||
}
|
}
|
||||||
print $nature_piece.$separator;
|
print $nature_piece.$separator;
|
||||||
// RACI
|
// RACI
|
||||||
/*
|
// if (! empty($line->subledger_account)) {
|
||||||
if (! empty($line->subledger_account)) {
|
// if ($line->doc_type == 'supplier_invoice') {
|
||||||
if ($line->doc_type == 'supplier_invoice') {
|
// $racine_subledger_account = '40';
|
||||||
$racine_subledger_account = '40';
|
// } elseif ($line->doc_type == 'customer_invoice') {
|
||||||
} elseif ($line->doc_type == 'customer_invoice') {
|
// $racine_subledger_account = '41';
|
||||||
$racine_subledger_account = '41';
|
// } else {
|
||||||
} else {
|
// $racine_subledger_account = '';
|
||||||
$nature_piece = '';
|
// }
|
||||||
}
|
// } else {
|
||||||
print $racine_subledger_account . $separator;
|
$racine_subledger_account = ''; // for records of type E leave this field blank
|
||||||
} else {
|
// }
|
||||||
print $separator;
|
|
||||||
}
|
print $racine_subledger_account . $separator; // deprecated CPTG & CPTA use instead
|
||||||
*/
|
|
||||||
print $separator; // deprecated CPTG & CPTA use instead
|
|
||||||
// MONT
|
// MONT
|
||||||
print price(abs($line->montant), 0, '', 1, 2).$separator;
|
print price(abs($line->montant), 0, '', 1, 2).$separator;
|
||||||
// CODC
|
// CODC
|
||||||
|
|||||||
@ -926,6 +926,7 @@ class BookKeeping extends CommonObject
|
|||||||
$sql .= " t.debit,";
|
$sql .= " t.debit,";
|
||||||
$sql .= " t.credit,";
|
$sql .= " t.credit,";
|
||||||
$sql .= " t.lettering_code,";
|
$sql .= " t.lettering_code,";
|
||||||
|
$sql .= " t.date_lettering,";
|
||||||
$sql .= " t.montant,";
|
$sql .= " t.montant,";
|
||||||
$sql .= " t.sens,";
|
$sql .= " t.sens,";
|
||||||
$sql .= " t.fk_user_author,";
|
$sql .= " t.fk_user_author,";
|
||||||
@ -934,6 +935,7 @@ class BookKeeping extends CommonObject
|
|||||||
$sql .= " t.journal_label,";
|
$sql .= " t.journal_label,";
|
||||||
$sql .= " t.piece_num,";
|
$sql .= " t.piece_num,";
|
||||||
$sql .= " t.date_creation,";
|
$sql .= " t.date_creation,";
|
||||||
|
$sql .= " t.date_lim_reglement,";
|
||||||
$sql .= " t.tms as date_modification,";
|
$sql .= " t.tms as date_modification,";
|
||||||
$sql .= " t.date_export";
|
$sql .= " t.date_export";
|
||||||
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
|
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
|
||||||
@ -1006,12 +1008,14 @@ class BookKeeping extends CommonObject
|
|||||||
$line->montant = $obj->montant;
|
$line->montant = $obj->montant;
|
||||||
$line->sens = $obj->sens;
|
$line->sens = $obj->sens;
|
||||||
$line->lettering_code = $obj->lettering_code;
|
$line->lettering_code = $obj->lettering_code;
|
||||||
|
$line->date_lettering = $obj->date_lettering;
|
||||||
$line->fk_user_author = $obj->fk_user_author;
|
$line->fk_user_author = $obj->fk_user_author;
|
||||||
$line->import_key = $obj->import_key;
|
$line->import_key = $obj->import_key;
|
||||||
$line->code_journal = $obj->code_journal;
|
$line->code_journal = $obj->code_journal;
|
||||||
$line->journal_label = $obj->journal_label;
|
$line->journal_label = $obj->journal_label;
|
||||||
$line->piece_num = $obj->piece_num;
|
$line->piece_num = $obj->piece_num;
|
||||||
$line->date_creation = $this->db->jdate($obj->date_creation);
|
$line->date_creation = $this->db->jdate($obj->date_creation);
|
||||||
|
$line->date_lim_reglement = $this->db->jdate($obj->date_lim_reglement);
|
||||||
$line->date_modification = $this->db->jdate($obj->date_modification);
|
$line->date_modification = $this->db->jdate($obj->date_modification);
|
||||||
$line->date_export = $this->db->jdate($obj->date_export);
|
$line->date_export = $this->db->jdate($obj->date_export);
|
||||||
|
|
||||||
|
|||||||
@ -504,7 +504,7 @@ function measuring_units_string($scale = '', $measuring_style = '', $unit = 0, $
|
|||||||
* Return translation label of a unit key
|
* Return translation label of a unit key
|
||||||
*
|
*
|
||||||
* @param int $unit ID of unit (rowid in llx_c_units table)
|
* @param int $unit ID of unit (rowid in llx_c_units table)
|
||||||
* @param string $measuring_style Style of unit: weight, volume,...
|
* @param string $measuring_style Style of unit: 'weight', 'volume', ..., '' = 'net_measure' for option PRODUCT_ADD_NET_MEASURE
|
||||||
* @param string $scale Scale of unit: '0', '-3', '6', ...
|
* @param string $scale Scale of unit: '0', '-3', '6', ...
|
||||||
* @param int $use_short_label 1=Use short label ('g' instead of 'gram'). Short labels are not translated.
|
* @param int $use_short_label 1=Use short label ('g' instead of 'gram'). Short labels are not translated.
|
||||||
* @return string Unit string
|
* @return string Unit string
|
||||||
@ -520,7 +520,14 @@ function measuringUnitString($unit, $measuring_style = '', $scale = '', $use_sho
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php';
|
||||||
$measuringUnits= new CUnits($db);
|
$measuringUnits= new CUnits($db);
|
||||||
|
|
||||||
if ($scale !== '')
|
if ($measuring_style == '' && $scale == '')
|
||||||
|
{
|
||||||
|
$arrayforfilter = array(
|
||||||
|
't.rowid' => $unit,
|
||||||
|
't.active' => 1
|
||||||
|
);
|
||||||
|
}
|
||||||
|
elseif ($scale !== '')
|
||||||
{
|
{
|
||||||
$arrayforfilter = array(
|
$arrayforfilter = array(
|
||||||
't.scale' => $scale,
|
't.scale' => $scale,
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
||||||
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
* Copyright (C) 2019-2020 Thibault FOUCART <support@ptibogxiv.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -1513,7 +1513,7 @@ else
|
|||||||
// Net Measure
|
// Net Measure
|
||||||
print '<tr><td>'.$langs->trans("NetMeasure").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("NetMeasure").'</td><td colspan="3">';
|
||||||
print '<input name="net_measure" size="5" value="'.$object->net_measure.'"> ';
|
print '<input name="net_measure" size="5" value="'.$object->net_measure.'"> ';
|
||||||
print $formproduct->selectMeasuringUnits($object->net_measure_units, '', 0, 0, 0);
|
print $formproduct->selectMeasuringUnits("net_measure_units", "", $object->net_measure_units, 0, 0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1955,7 +1955,7 @@ else
|
|||||||
print '<tr><td class="titlefield">'.$langs->trans("NetMeasure").'</td><td colspan="2">';
|
print '<tr><td class="titlefield">'.$langs->trans("NetMeasure").'</td><td colspan="2">';
|
||||||
if ($object->net_measure != '')
|
if ($object->net_measure != '')
|
||||||
{
|
{
|
||||||
print $object->net_measure." ".measuringUnitString(0, "weight", $object->net_measure_units);
|
print $object->net_measure." ".measuringUnitString($object->net_measure_units);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user