Update accountancyexport.class.php

This commit is contained in:
Laurent Destailleur 2021-08-17 01:08:18 +02:00 committed by GitHub
parent 9b43327af0
commit 15020c99e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1462,14 +1462,14 @@ class AccountancyExport
print $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->amount) < 0) { // Currently, only the sign of amount allows to know the type of invoice (standard or credit note). Other solution is to analyse debit/credit/role of account. TODO Add column doc_type_long if (($line->amount) < 0) { // Currently, only the sign of amount allows to know the type of invoice (standard or credit note). Other solution is to analyse debit/credit/role of account. TODO Add column doc_type_long or make amount mandatory with rule on sign.
$nature_piece = 'AF'; $nature_piece = 'AF';
} else { } else {
$nature_piece = 'FF'; $nature_piece = 'FF';
} }
} elseif ($line->doc_type == 'customer_invoice') { } elseif ($line->doc_type == 'customer_invoice') {
if (($line->amount) < 0) { if (($line->amount) < 0) {
$nature_piece = 'AC'; // Currently, only the sign of amount allows to know the type of invoice (standard or credit note). Other solution is to analyse debit/credit/role of account. TODO Add column doc_type_long $nature_piece = 'AC'; // Currently, only the sign of amount allows to know the type of invoice (standard or credit note). Other solution is to analyse debit/credit/role of account. TODO Add column doc_type_long or make amount mandatory with rule on sign.
} else { } else {
$nature_piece = 'FC'; $nature_piece = 'FC';
} }