Merge pull request #16042 from aspangaro/13a29
Accountancy - Gestimum v3 / v5 Added a sort to excluse line at zero
This commit is contained in:
commit
641e2d9906
@ -57,8 +57,8 @@ class AccountancyExport
|
|||||||
public static $EXPORT_TYPE_OPENCONCERTO = 100;
|
public static $EXPORT_TYPE_OPENCONCERTO = 100;
|
||||||
public static $EXPORT_TYPE_LDCOMPTA = 110;
|
public static $EXPORT_TYPE_LDCOMPTA = 110;
|
||||||
public static $EXPORT_TYPE_LDCOMPTA10 = 120;
|
public static $EXPORT_TYPE_LDCOMPTA10 = 120;
|
||||||
public static $EXPORT_TYPE_GESTINUMV3 = 130;
|
public static $EXPORT_TYPE_GESTIMUMV3 = 130;
|
||||||
public static $EXPORT_TYPE_GESTINUMV5 = 135;
|
public static $EXPORT_TYPE_GESTIMUMV5 = 135;
|
||||||
public static $EXPORT_TYPE_FEC = 1000;
|
public static $EXPORT_TYPE_FEC = 1000;
|
||||||
public static $EXPORT_TYPE_FEC2 = 1010;
|
public static $EXPORT_TYPE_FEC2 = 1010;
|
||||||
|
|
||||||
@ -119,8 +119,8 @@ class AccountancyExport
|
|||||||
self::$EXPORT_TYPE_CHARLEMAGNE => $langs->trans('Modelcsv_charlemagne'),
|
self::$EXPORT_TYPE_CHARLEMAGNE => $langs->trans('Modelcsv_charlemagne'),
|
||||||
self::$EXPORT_TYPE_LDCOMPTA => $langs->trans('Modelcsv_LDCompta'),
|
self::$EXPORT_TYPE_LDCOMPTA => $langs->trans('Modelcsv_LDCompta'),
|
||||||
self::$EXPORT_TYPE_LDCOMPTA10 => $langs->trans('Modelcsv_LDCompta10'),
|
self::$EXPORT_TYPE_LDCOMPTA10 => $langs->trans('Modelcsv_LDCompta10'),
|
||||||
self::$EXPORT_TYPE_GESTINUMV3 => $langs->trans('Modelcsv_Gestinum_v3'),
|
self::$EXPORT_TYPE_GESTIMUMV3 => $langs->trans('Modelcsv_Gestinum_v3'),
|
||||||
self::$EXPORT_TYPE_GESTINUMV5 => $langs->trans('Modelcsv_Gestinum_v5'),
|
self::$EXPORT_TYPE_GESTIMUMV5 => $langs->trans('Modelcsv_Gestinum_v5'),
|
||||||
self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'),
|
self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'),
|
||||||
self::$EXPORT_TYPE_FEC2 => $langs->trans('Modelcsv_FEC2'),
|
self::$EXPORT_TYPE_FEC2 => $langs->trans('Modelcsv_FEC2'),
|
||||||
);
|
);
|
||||||
@ -154,8 +154,8 @@ class AccountancyExport
|
|||||||
self::$EXPORT_TYPE_CHARLEMAGNE => 'charlemagne',
|
self::$EXPORT_TYPE_CHARLEMAGNE => 'charlemagne',
|
||||||
self::$EXPORT_TYPE_LDCOMPTA => 'ldcompta',
|
self::$EXPORT_TYPE_LDCOMPTA => 'ldcompta',
|
||||||
self::$EXPORT_TYPE_LDCOMPTA10 => 'ldcompta10',
|
self::$EXPORT_TYPE_LDCOMPTA10 => 'ldcompta10',
|
||||||
self::$EXPORT_TYPE_GESTINUMV3 => 'gestinumv3',
|
self::$EXPORT_TYPE_GESTIMUMV3 => 'gestimumv3',
|
||||||
self::$EXPORT_TYPE_GESTINUMV5 => 'gestinumv5',
|
self::$EXPORT_TYPE_GESTIMUMV5 => 'gestimumv5',
|
||||||
self::$EXPORT_TYPE_FEC => 'fec',
|
self::$EXPORT_TYPE_FEC => 'fec',
|
||||||
self::$EXPORT_TYPE_FEC2 => 'fec2',
|
self::$EXPORT_TYPE_FEC2 => 'fec2',
|
||||||
);
|
);
|
||||||
@ -227,11 +227,13 @@ class AccountancyExport
|
|||||||
self::$EXPORT_TYPE_LDCOMPTA10 => array(
|
self::$EXPORT_TYPE_LDCOMPTA10 => array(
|
||||||
'label' => $langs->trans('Modelcsv_LDCompta10'),
|
'label' => $langs->trans('Modelcsv_LDCompta10'),
|
||||||
),
|
),
|
||||||
self::$EXPORT_TYPE_GESTINUMV3 => array(
|
self::$EXPORT_TYPE_GESTIMUMV3 => array(
|
||||||
'label' => $langs->trans('Modelcsv_Gestinumv3'),
|
'label' => $langs->trans('Modelcsv_Gestinumv3'),
|
||||||
|
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
|
||||||
),
|
),
|
||||||
self::$EXPORT_TYPE_GESTINUMV5 => array(
|
self::$EXPORT_TYPE_GESTIMUMV5 => array(
|
||||||
'label' => $langs->trans('Modelcsv_Gestinumv5'),
|
'label' => $langs->trans('Modelcsv_Gestinumv5'),
|
||||||
|
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
|
||||||
),
|
),
|
||||||
self::$EXPORT_TYPE_FEC => array(
|
self::$EXPORT_TYPE_FEC => array(
|
||||||
'label' => $langs->trans('Modelcsv_FEC'),
|
'label' => $langs->trans('Modelcsv_FEC'),
|
||||||
@ -320,10 +322,10 @@ class AccountancyExport
|
|||||||
case self::$EXPORT_TYPE_LDCOMPTA10 :
|
case self::$EXPORT_TYPE_LDCOMPTA10 :
|
||||||
$this->exportLDCompta10($TData);
|
$this->exportLDCompta10($TData);
|
||||||
break;
|
break;
|
||||||
case self::$EXPORT_TYPE_GESTINUMV3 :
|
case self::$EXPORT_TYPE_GESTIMUMV3 :
|
||||||
$this->exportGestimumV3($TData);
|
$this->exportGestimumV3($TData);
|
||||||
break;
|
break;
|
||||||
case self::$EXPORT_TYPE_GESTINUMV5 :
|
case self::$EXPORT_TYPE_GESTIMUMV5 :
|
||||||
$this->exportGestimumV5($TData);
|
$this->exportGestimumV5($TData);
|
||||||
break;
|
break;
|
||||||
case self::$EXPORT_TYPE_FEC :
|
case self::$EXPORT_TYPE_FEC :
|
||||||
@ -1628,6 +1630,9 @@ class AccountancyExport
|
|||||||
$invoices_infos = array();
|
$invoices_infos = array();
|
||||||
$supplier_invoices_infos = array();
|
$supplier_invoices_infos = array();
|
||||||
foreach ($objectLines as $line) {
|
foreach ($objectLines as $line) {
|
||||||
|
if ($line->debit == 0 && $line->credit == 0) {
|
||||||
|
unset($array[$line]);
|
||||||
|
} else {
|
||||||
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
||||||
|
|
||||||
$invoice_ref = $line->doc_ref;
|
$invoice_ref = $line->doc_ref;
|
||||||
@ -1705,6 +1710,7 @@ class AccountancyExport
|
|||||||
print $this->end_line;
|
print $this->end_line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export format : Gestimum V5
|
* Export format : Gestimum V5
|
||||||
@ -1719,6 +1725,9 @@ class AccountancyExport
|
|||||||
$this->separator = ',';
|
$this->separator = ',';
|
||||||
|
|
||||||
foreach ($objectLines as $line) {
|
foreach ($objectLines as $line) {
|
||||||
|
if ($line->debit == 0 && $line->credit == 0) {
|
||||||
|
unset($array[$line]);
|
||||||
|
} else {
|
||||||
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
$date = dol_print_date($line->doc_date, '%d%m%Y');
|
||||||
|
|
||||||
print $line->id . $this->separator;
|
print $line->id . $this->separator;
|
||||||
@ -1731,10 +1740,10 @@ class AccountancyExport
|
|||||||
}
|
}
|
||||||
print $this->separator;
|
print $this->separator;
|
||||||
//print '"'.dol_trunc(str_replace('"', '', $line->label_operation),40,'right','UTF-8',1).'"' . $this->separator;
|
//print '"'.dol_trunc(str_replace('"', '', $line->label_operation),40,'right','UTF-8',1).'"' . $this->separator;
|
||||||
print '"'.dol_trunc(str_replace('"', '', $line->doc_ref), 40, 'right', 'UTF-8', 1).'"' . $this->separator;
|
print '"' . dol_trunc(str_replace('"', '', $line->doc_ref), 40, 'right', 'UTF-8', 1) . '"' . $this->separator;
|
||||||
print '"'.dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1).'"'.$this->separator;
|
print '"' . dol_trunc(str_replace('"', '', $line->piece_num), 10, 'right', 'UTF-8', 1) . '"' . $this->separator;
|
||||||
print price2num($line->montant).$this->separator;
|
print price2num($line->montant) . $this->separator;
|
||||||
print $line->sens.$this->separator;
|
print $line->sens . $this->separator;
|
||||||
print $date . $this->separator;
|
print $date . $this->separator;
|
||||||
print $this->separator;
|
print $this->separator;
|
||||||
print $this->separator;
|
print $this->separator;
|
||||||
@ -1742,6 +1751,7 @@ class AccountancyExport
|
|||||||
print $this->end_line;
|
print $this->end_line;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* trunc
|
* trunc
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user