fix(vat): fill YGB date in Əlavə 1 (change field to Date)
ygbnintarixi was a Float field, so the YGB date could not be stored. Change it to Date and map posting_date from the YGB report. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d6488a68cf
commit
93d7be9ee1
|
|
@ -65,12 +65,11 @@ def populate_vat_tables(year, month):
|
|||
filters = _period_filters(year, month)
|
||||
|
||||
# Əlavə 1 — one row per YGB purchase document.
|
||||
# (ygbnintarixi is a Float field on the declaration, so the date is not
|
||||
# mapped here — see the note returned to the client.)
|
||||
elave_1 = []
|
||||
for r in (ygb_get_data(filters) or []):
|
||||
elave_1.append({
|
||||
"sətirkodu": r.get("line_code"),
|
||||
"ygbnintarixi": r.get("posting_date"),
|
||||
"ygbninnömrəsi": r.get("ygb"),
|
||||
"ygbüzrəalınmışmalınədvsizdəyərimanatla": r.get("amount_without_vat"),
|
||||
"ygbüzrəalınmışmalınədvməbləğimanatla": r.get("vat_amount"),
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@
|
|||
},
|
||||
{
|
||||
"fieldname": "ygbnintarixi",
|
||||
"fieldtype": "Float",
|
||||
"precision": "2",
|
||||
"fieldtype": "Date",
|
||||
"in_list_view": 1,
|
||||
"label": "YGB-nin tarixi"
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue