fix: fixed asset register report and made skip-dn field hidden

This commit is contained in:
Nabin Hait
2019-10-22 14:28:37 +05:30
parent bebbc6371b
commit bd6b1806cd
3 changed files with 13 additions and 11 deletions

View File

@@ -1,13 +1,13 @@
{ {
"add_total_row": 0, "add_total_row": 0,
"creation": "2019-09-23 16:35:02.836134", "creation": "2019-09-23 16:35:02.836134",
"disable_prepared_report": 0, "disable_prepared_report": 1,
"disabled": 0, "disabled": 0,
"docstatus": 0, "docstatus": 0,
"doctype": "Report", "doctype": "Report",
"idx": 0, "idx": 0,
"is_standard": "Yes", "is_standard": "Yes",
"modified": "2019-09-23 16:35:02.836134", "modified": "2019-10-22 13:00:31.539726",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Assets", "module": "Assets",
"name": "Fixed Asset Register", "name": "Fixed Asset Register",

View File

@@ -4,6 +4,7 @@
from __future__ import unicode_literals from __future__ import unicode_literals
import frappe import frappe
from frappe import _ from frappe import _
from frappe.utils import cstr
def execute(filters=None): def execute(filters=None):
filters = frappe._dict(filters or {}) filters = frappe._dict(filters or {})
@@ -149,12 +150,12 @@ def get_finance_book_value_map(finance_book=''):
FROM `tabAsset Finance Book` FROM `tabAsset Finance Book`
WHERE WHERE
parentfield='finance_books' parentfield='finance_books'
AND finance_book=%s''', (finance_book))) AND ifnull(finance_book, '')=%s''', cstr(finance_book)))
def get_purchase_receipt_supplier_map(): def get_purchase_receipt_supplier_map():
return frappe._dict(frappe.db.sql(''' Select return frappe._dict(frappe.db.sql(''' Select
pr.name, pr.supplier pr.name, pr.supplier
FROM `tabPurchase Receipt` pr, `tabPurchase Receipt Item` pri FROM `tabPurchase Receipt` pr, `tabPurchase Receipt Item` pri
WHERE WHERE
pri.parent = pr.name pri.parent = pr.name
AND pri.is_fixed_asset=1 AND pri.is_fixed_asset=1
@@ -164,7 +165,7 @@ def get_purchase_receipt_supplier_map():
def get_purchase_invoice_supplier_map(): def get_purchase_invoice_supplier_map():
return frappe._dict(frappe.db.sql(''' Select return frappe._dict(frappe.db.sql(''' Select
pi.name, pi.supplier pi.name, pi.supplier
FROM `tabPurchase Invoice` pi, `tabPurchase Invoice Item` pii FROM `tabPurchase Invoice` pi, `tabPurchase Invoice Item` pii
WHERE WHERE
pii.parent = pi.name pii.parent = pi.name
AND pii.is_fixed_asset=1 AND pii.is_fixed_asset=1

View File

@@ -682,10 +682,10 @@
"label": "Additional Discount and Coupon Code" "label": "Additional Discount and Coupon Code"
}, },
{ {
"fieldname": "coupon_code", "fieldname": "coupon_code",
"fieldtype": "Link", "fieldtype": "Link",
"label": "Coupon Code", "label": "Coupon Code",
"options": "Coupon Code" "options": "Coupon Code"
}, },
{ {
"default": "Grand Total", "default": "Grand Total",
@@ -1185,6 +1185,7 @@
"default": "0", "default": "0",
"fieldname": "skip_delivery_note", "fieldname": "skip_delivery_note",
"fieldtype": "Check", "fieldtype": "Check",
"hidden": 1,
"label": "Skip Delivery Note", "label": "Skip Delivery Note",
"print_hide": 1 "print_hide": 1
} }
@@ -1192,7 +1193,7 @@
"icon": "fa fa-file-text", "icon": "fa fa-file-text",
"idx": 105, "idx": 105,
"is_submittable": 1, "is_submittable": 1,
"modified": "2019-10-14 08:46:07.540565", "modified": "2019-10-22 14:26:42.767189",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Selling", "module": "Selling",
"name": "Sales Order", "name": "Sales Order",
@@ -1269,4 +1270,4 @@
"title_field": "title", "title_field": "title",
"track_changes": 1, "track_changes": 1,
"track_seen": 1 "track_seen": 1
} }