mirror of
https://github.com/frappe/books.git
synced 2026-08-24 10:04:45 -05:00
fix:remove redundant quantity check in return validation
This commit is contained in:
@@ -388,15 +388,13 @@ export default defineComponent({
|
||||
const manualDiscountAmount = this.row.itemDiscountAmount;
|
||||
const manualDiscountPercent = this.row.itemDiscountPercent;
|
||||
if (!this.row.isReturn && quantity <= 0) {
|
||||
if (quantity <= 0) {
|
||||
showToast({
|
||||
type: 'error',
|
||||
message: 'Quantity must be greater than zero.',
|
||||
duration: 'short',
|
||||
});
|
||||
showToast({
|
||||
type: 'error',
|
||||
message: 'Quantity must be greater than zero.',
|
||||
duration: 'short',
|
||||
});
|
||||
|
||||
quantity = this.row.quantity ?? 1;
|
||||
}
|
||||
quantity = this.row.quantity ?? 1;
|
||||
}
|
||||
|
||||
this.row.set('quantity', quantity);
|
||||
|
||||
Reference in New Issue
Block a user