Skip to content

Commit

Permalink
fix: added posting date column for export
Browse files Browse the repository at this point in the history
(cherry picked from commit 20f6e44)
  • Loading branch information
Ninad1306 authored and mergify[bot] committed Jan 24, 2025
1 parent 58399cf commit 894eab4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def __init__(self):
self.PI_ITEM = frappe.qb.DocType("Purchase Invoice Item")

def get_all(self, names=None, filters=None):
query = self.get_query(filters=filters)
query = self.get_query(filters=filters, additional_fields=["posting_date"])

if names:
query = query.where(self.PI.name.isin(names))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import format_date

from india_compliance.gst_india.api_classes.taxpayer_base import (
TaxpayerBaseAPI,
Expand Down Expand Up @@ -96,6 +97,8 @@ def get_invoice_data(self, inward_supply=None, purchase=None, filters=None):

invoice_data = []
for doc in inward_supplies:
_purchase_invoice = purchases.pop(doc.link_name, frappe._dict())

invoice_data.append(
frappe._dict(
{
Expand All @@ -105,10 +108,11 @@ def get_invoice_data(self, inward_supply=None, purchase=None, filters=None):
"is_pending_action_allowed": doc.is_pending_action_allowed,
"is_supplier_return_filed": doc.is_supplier_return_filed,
"doc_type": doc.doc_type,
"_inward_supply": doc,
"_purchase_invoice": purchases.pop(
doc.link_name, frappe._dict()
"posting_date": format_date(
_purchase_invoice.pop("posting_date", None)
),
"_inward_supply": doc,
"_purchase_invoice": _purchase_invoice,
}
)
)
Expand Down Expand Up @@ -503,6 +507,10 @@ def get_invoice_columns(self):
"label": "Linked Voucher",
"fieldname": "purchase_invoice_name",
},
{
"label": "Posting Date",
"fieldname": "posting_date",
},
{
"label": "Taxable Amount Diff \n 2A/2B - Purchase",
"fieldname": "taxable_value_difference",
Expand Down

0 comments on commit 894eab4

Please sign in to comment.