Merge pull request #40040 from GursheenK/skip-discount-validation-for-rate-adjustment-entries

fix: skip max discount validation for rate adjustment
This commit is contained in:
Gursheen Kaur Anand 2024-02-23 12:56:38 +05:30 committed by GitHub
commit 26ec697a0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -270,7 +270,7 @@ class SalesInvoice(SellingController):
super(SalesInvoice, self).validate() super(SalesInvoice, self).validate()
self.validate_auto_set_posting_time() self.validate_auto_set_posting_time()
if not self.is_pos: if not (self.is_pos or self.is_debit_note):
self.so_dn_required() self.so_dn_required()
self.set_tax_withholding() self.set_tax_withholding()

View File

@ -28,7 +28,8 @@ class SellingController(StockController):
def validate(self): def validate(self):
super(SellingController, self).validate() super(SellingController, self).validate()
self.validate_items() self.validate_items()
self.validate_max_discount() if not self.get("is_debit_note"):
self.validate_max_discount()
self.validate_selling_price() self.validate_selling_price()
self.set_qty_as_per_stock_uom() self.set_qty_as_per_stock_uom()
self.set_po_nos(for_validate=True) self.set_po_nos(for_validate=True)