diff --git a/ecommerce_integrations/unicommerce/grn.py b/ecommerce_integrations/unicommerce/grn.py index 5ead0347..601ec9a5 100644 --- a/ecommerce_integrations/unicommerce/grn.py +++ b/ecommerce_integrations/unicommerce/grn.py @@ -150,10 +150,12 @@ def _prepare_grn_import_csv(stock_entry) -> str: batch_details = frappe.db.get_value( "Batch", item.batch_no, fieldname=["manufacturing_date", "expiry_date"], as_dict=True ) - manufacturing_date = ( - _get_unicommerce_format_date(batch_details.manufacturing_date) if batch_details else "" + manufacturing_date = _get_unicommerce_format_date( + batch_details.manufacturing_date if batch_details else getdate() + ) + expiry_date = _get_unicommerce_format_date( + batch_details.expiry_date if batch_details else getdate("2099-01-01") ) - expiry_date = _get_unicommerce_format_date(batch_details.expiry_date) if batch_details else "" sku = frappe.db.get_value( "Ecommerce Item",