Merge pull request #50884 from rohitwaghchaure/fixed-donot-override-source

fix: do not override source document in serial no
This commit is contained in:
rohitwaghchaure
2025-12-02 20:55:22 +05:30
committed by GitHub

View File

@@ -1301,7 +1301,7 @@ class SerialandBatchBundle(Document):
sn_table.purchase_document_no,
self.voucher_no if not sn_table.purchase_document_no else self.voucher_no,
)
.where(sn_table.name.isin(serial_nos))
.where((sn_table.name.isin(serial_nos)) & (sn_table.purchase_document_no.isnull()))
).run()
def validate_serial_and_batch_inventory(self):