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:
Ali 2026-06-26 14:56:50 +00:00
parent d6488a68cf
commit 93d7be9ee1
2 changed files with 2 additions and 4 deletions

View File

@ -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"),

View File

@ -22,8 +22,7 @@
},
{
"fieldname": "ygbnintarixi",
"fieldtype": "Float",
"precision": "2",
"fieldtype": "Date",
"in_list_view": 1,
"label": "YGB-nin tarixi"
},