Skip to content
Extraits de code Groupes Projets
Valider 8c376fda rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

[fix] refund export PCA

parent 5eb335a5
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -167,22 +167,22 @@ class PCAExportController(http.Controller): ...@@ -167,22 +167,22 @@ class PCAExportController(http.Controller):
if pca.year > invoice.fiscal_year: if pca.year > invoice.fiscal_year:
lignes_export.append({ lignes_export.append({
'date': invoice.date_invoice, 'date': invoice.date_invoice,
'journal': 'OD', 'journal': 'CH',
'compte': line.account_id.code, 'compte': line.account_id.code,
'debit': line.price_subtotal_signed * pca.year_percent * 0.01, 'debit': line.price_subtotal_signed * pca.year_percent * 0.01 if line.price_subtotal_signed > 0 else 0.0,
'credit': 0.0, 'credit': line.price_subtotal_signed * pca.year_percent * 0.01 if line.price_subtotal_signed < 0 else 0.0,
'libelle': invoice.partner_id.name + ' - Facture ' + invoice.number + ' - ' + line.name, 'libelle': 'PCA-' + invoice.partner_id.name + ' - Facture ' + invoice.number + ' - ' + line.name,
'piece': invoice.number, 'piece': invoice.number,
'echeance': invoice.date_due, 'echeance': invoice.date_due,
'ref_piece': invoice.number 'ref_piece': invoice.number
}) })
lignes_export.append({ lignes_export.append({
'date': invoice.date_invoice, 'date': invoice.date_invoice,
'journal': 'OD', 'journal': 'CH',
'compte': '487000', 'compte': '487000',
'debit': 0.0, 'debit': line.price_subtotal_signed * pca.year_percent * 0.01 if line.price_subtotal_signed < 0 else 0.0,
'credit': line.price_subtotal_signed * pca.year_percent * 0.01, 'credit': line.price_subtotal_signed * pca.year_percent * 0.01 if line.price_subtotal_signed > 0 else 0.0,
'libelle': invoice.partner_id.name + ' - Facture ' + invoice.number + ' - ' + line.name, 'libelle': 'PCA-' + invoice.partner_id.name + ' - Facture ' + invoice.number + ' - ' + line.name,
'piece': invoice.number, 'piece': invoice.number,
'echeance': invoice.date_due, 'echeance': invoice.date_due,
'ref_piece': invoice.number 'ref_piece': invoice.number
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter