commit
423361946d
@ -12,7 +12,7 @@ def execute(filters=None):
|
||||
employee_filters = filters.get("company") and \
|
||||
[["Employee", "company", "=", filters.get("company")]] or None
|
||||
employees = runreport(doctype="Employee", fields=["name", "employee_name", "department"],
|
||||
filters=employee_filters)
|
||||
filters=employee_filters, limit_page_length=None)
|
||||
|
||||
if not employees:
|
||||
frappe.throw(_("No employee found!"))
|
||||
|
@ -26,7 +26,7 @@ erpnext.TransactionController = erpnext.stock.StockController.extend({
|
||||
me.frm.set_value(fieldname, value);
|
||||
});
|
||||
|
||||
if(this.frm.doc.company) {
|
||||
if(this.frm.doc.company && !this.frm.doc.amended_from) {
|
||||
cur_frm.script_manager.trigger("company");
|
||||
}
|
||||
}
|
||||
|
@ -265,41 +265,59 @@ erpnext.stock.StockEntry = erpnext.stock.StockController.extend({
|
||||
},
|
||||
|
||||
customer: function() {
|
||||
return this.frm.call({
|
||||
method: "erpnext.accounts.party.get_party_details",
|
||||
args: { party: this.frm.doc.customer, party_type:"Customer", doctype: this.frm.doc.doctype }
|
||||
this.get_party_details({
|
||||
party: this.frm.doc.customer,
|
||||
party_type:"Customer",
|
||||
doctype: this.frm.doc.doctype
|
||||
});
|
||||
},
|
||||
|
||||
supplier: function() {
|
||||
return this.frm.call({
|
||||
this.get_party_details({
|
||||
party: this.frm.doc.supplier,
|
||||
party_type:"Supplier",
|
||||
doctype: this.frm.doc.doctype
|
||||
});
|
||||
},
|
||||
|
||||
get_party_details: function(args) {
|
||||
var me = this;
|
||||
frappe.call({
|
||||
method: "erpnext.accounts.party.get_party_details",
|
||||
args: { party: this.frm.doc.supplier, party_type:"Supplier", doctype: this.frm.doc.doctype }
|
||||
args: args,
|
||||
callback: function(r) {
|
||||
if(r.message) {
|
||||
me.frm.set_value({
|
||||
"customer_name": r.message["customer_name"],
|
||||
"customer_address": r.message["address_display"]
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
delivery_note_no: function() {
|
||||
this.get_party_details({
|
||||
this.get_party_details_from_against_voucher({
|
||||
ref_dt: "Delivery Note",
|
||||
ref_dn: this.frm.doc.delivery_note_no
|
||||
})
|
||||
},
|
||||
|
||||
sales_invoice_no: function() {
|
||||
this.get_party_details({
|
||||
this.get_party_details_from_against_voucher({
|
||||
ref_dt: "Sales Invoice",
|
||||
ref_dn: this.frm.doc.sales_invoice_no
|
||||
})
|
||||
},
|
||||
|
||||
purchase_receipt_no: function() {
|
||||
this.get_party_details({
|
||||
this.get_party_details_from_against_voucher({
|
||||
ref_dt: "Purchase Receipt",
|
||||
ref_dn: this.frm.doc.purchase_receipt_no
|
||||
})
|
||||
},
|
||||
|
||||
get_party_details: function(args) {
|
||||
get_party_details_from_against_voucher: function(args) {
|
||||
return this.frm.call({
|
||||
method: "erpnext.stock.doctype.stock_entry.stock_entry.get_party_details",
|
||||
args: args,
|
||||
|
@ -153,10 +153,10 @@ class StockReconciliation(StockController):
|
||||
flt(previous_sle.get("qty_after_transaction")) <= 0:
|
||||
frappe.throw(_("Valuation Rate required for Item {0}").format(row.item_code))
|
||||
|
||||
change_in_qty = row.qty != "" and \
|
||||
change_in_qty = row.qty not in ["", None] and \
|
||||
(flt(row.qty) - flt(previous_sle.get("qty_after_transaction")))
|
||||
|
||||
change_in_rate = row.valuation_rate != "" and \
|
||||
|
||||
change_in_rate = row.valuation_rate not in ["", None] and \
|
||||
(flt(row.valuation_rate) - flt(previous_sle.get("valuation_rate")))
|
||||
|
||||
if get_valuation_method(row.item_code) == "Moving Average":
|
||||
|
@ -6,12 +6,12 @@
|
||||
"doctype": "Report",
|
||||
"idx": 1,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2014-06-03 07:18:17.249961",
|
||||
"modified": "2014-07-25 12:33:26.483404",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Purchase Order Items To Be Received",
|
||||
"owner": "Administrator",
|
||||
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n\t`tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project_name` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.qty as \"Qty:Float:100\",\n\t`tabPurchase Order Item`.received_qty as \"Received Qty:Float:100\", \n\t(`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0)) as \"Qty to Receive:Float:100\",\n `tabPurchase Order Item`.warehouse as \"Warehouse:Link/Warehouse:150\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n `tabPurchase Order Item`.brand as \"Brand::100\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Stopped\"\n\tand ifnull(`tabPurchase Order Item`.received_qty, 0) < ifnull(`tabPurchase Order Item`.qty, 0)\norder by `tabPurchase Order`.transaction_date asc",
|
||||
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n\t`tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order Item`.`schedule_date` as \"Reqd by Date:Date:110\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project_name` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.qty as \"Qty:Float:100\",\n\t`tabPurchase Order Item`.received_qty as \"Received Qty:Float:100\", \n\t(`tabPurchase Order Item`.qty - ifnull(`tabPurchase Order Item`.received_qty, 0)) as \"Qty to Receive:Float:100\",\n `tabPurchase Order Item`.warehouse as \"Warehouse:Link/Warehouse:150\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n `tabPurchase Order Item`.brand as \"Brand::100\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Stopped\"\n\tand ifnull(`tabPurchase Order Item`.received_qty, 0) < ifnull(`tabPurchase Order Item`.qty, 0)\norder by `tabPurchase Order`.transaction_date asc",
|
||||
"ref_doctype": "Purchase Receipt",
|
||||
"report_name": "Purchase Order Items To Be Received",
|
||||
"report_type": "Query Report"
|
||||
|
Loading…
x
Reference in New Issue
Block a user