[fixes] hide drop ship section and typo

This commit is contained in:
Saurabh 2015-11-18 12:48:41 +05:30
parent 20628f5bd8
commit 2c85efe31a
2 changed files with 5 additions and 3 deletions

View File

@ -35,7 +35,9 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
break;
}
}
cur_frm.set_df_property("drop_ship", "hidden", !allow_delivery);
if(doc.docstatus == 1 && !in_list(["Stopped", "Closed", "Delivered"], doc.status)) {
if (this.frm.has_perm("submit")) {
if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100) {

View File

@ -51,7 +51,7 @@ class PurchaseOrder(BuyingController):
self.validate_for_subcontracting()
self.validate_minimum_order_qty()
self.create_raw_materials_supplied("supplied_items")
self.set_received_qtyand_billed_amount_for_drop_ship_items()
self.set_received_qty_and_billed_amount_for_drop_ship_items()
def validate_with_previous_doc(self):
super(PurchaseOrder, self).validate_with_previous_doc({
@ -254,7 +254,7 @@ class PurchaseOrder(BuyingController):
return is_drop_ship
def set_received_qtyand_billed_amount_for_drop_ship_items(self):
def set_received_qty_and_billed_amount_for_drop_ship_items(self):
for item in self.items:
if item.delivered_by_supplier == 1:
item.received_qty = item.qty