mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 03:58:27 +02:00
parent
cbbfbae99e
commit
0cdc3451fd
1 changed files with 8 additions and 6 deletions
|
@ -22,11 +22,13 @@ class Directo < ApplicationRecord
|
||||||
counter += 1
|
counter += 1
|
||||||
|
|
||||||
num = invoice.number
|
num = invoice.number
|
||||||
|
paid_at = invoice.account_activity.bank_transaction&.paid_at&.strftime("%Y-%m-%d")
|
||||||
mappers[num] = invoice
|
mappers[num] = invoice
|
||||||
xml.invoice(
|
xml.invoice(
|
||||||
"SalesAgent" => Setting.directo_sales_agent,
|
"SalesAgent" => Setting.directo_sales_agent,
|
||||||
"Number" => num,
|
"Number" => num,
|
||||||
"InvoiceDate" => invoice.issue_date.strftime("%Y-%m-%d"),
|
"InvoiceDate" => invoice.issue_date.strftime("%Y-%m-%d"),
|
||||||
|
'TransactionDate' => paid_at,
|
||||||
"PaymentTerm" => Setting.directo_receipt_payment_term,
|
"PaymentTerm" => Setting.directo_receipt_payment_term,
|
||||||
"Currency" => invoice.currency,
|
"Currency" => invoice.currency,
|
||||||
"CustomerCode"=> invoice.buyer.accounting_customer_code
|
"CustomerCode"=> invoice.buyer.accounting_customer_code
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue