fix: Restore "allow delivery" condition checks (#18246)
* fix: Remove `allow_delivery` flag - User was not able to create delivery note because allow_delivery flag was false and it never used to get updated * fix: Restore allow_delivery condition checks
This commit is contained in:
parent
c6c6b05522
commit
bc2ff785f1
@ -107,7 +107,7 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
||||
refresh: function(doc, dt, dn) {
|
||||
var me = this;
|
||||
this._super();
|
||||
var allow_delivery = false;
|
||||
let allow_delivery = false;
|
||||
|
||||
if(doc.docstatus==1) {
|
||||
if(this.frm.has_perm("submit")) {
|
||||
@ -132,6 +132,8 @@ erpnext.selling.SalesOrderController = erpnext.selling.SellingController.extend(
|
||||
if(doc.status !== 'Closed') {
|
||||
if(doc.status !== 'On Hold') {
|
||||
|
||||
allow_delivery = this.frm.doc.items.some(item => item.delivered_by_supplier === 0 && item.qty > flt(item.delivered_qty))
|
||||
|
||||
if (this.frm.has_perm("submit")) {
|
||||
if(flt(doc.per_delivered, 6) < 100 || flt(doc.per_billed) < 100) {
|
||||
// hold
|
||||
|
Loading…
x
Reference in New Issue
Block a user