mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 19:49:18 +00:00
Merge branch 'version-11-hotfix' into v11-work-order-bugs
This commit is contained in:
@@ -5,7 +5,7 @@ import frappe
|
|||||||
from erpnext.hooks import regional_overrides
|
from erpnext.hooks import regional_overrides
|
||||||
from frappe.utils import getdate
|
from frappe.utils import getdate
|
||||||
|
|
||||||
__version__ = '11.1.62'
|
__version__ = '11.1.64'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
|||||||
@@ -58,7 +58,6 @@ class ReceivablePayableReport(object):
|
|||||||
self.invoices = set()
|
self.invoices = set()
|
||||||
|
|
||||||
def get_data(self):
|
def get_data(self):
|
||||||
t1 = now()
|
|
||||||
self.get_gl_entries()
|
self.get_gl_entries()
|
||||||
self.voucher_balance = OrderedDict()
|
self.voucher_balance = OrderedDict()
|
||||||
self.init_voucher_balance() # invoiced, paid, credit_note, outstanding
|
self.init_voucher_balance() # invoiced, paid, credit_note, outstanding
|
||||||
@@ -72,6 +71,9 @@ class ReceivablePayableReport(object):
|
|||||||
# fetch future payments against invoices
|
# fetch future payments against invoices
|
||||||
self.get_future_payments()
|
self.get_future_payments()
|
||||||
|
|
||||||
|
# Get return entries
|
||||||
|
self.get_return_entries()
|
||||||
|
|
||||||
self.data = []
|
self.data = []
|
||||||
for gle in self.gl_entries:
|
for gle in self.gl_entries:
|
||||||
self.update_voucher_balance(gle)
|
self.update_voucher_balance(gle)
|
||||||
@@ -90,6 +92,7 @@ class ReceivablePayableReport(object):
|
|||||||
party = gle.party,
|
party = gle.party,
|
||||||
posting_date = gle.posting_date,
|
posting_date = gle.posting_date,
|
||||||
remarks = gle.remarks,
|
remarks = gle.remarks,
|
||||||
|
account_currency = gle.account_currency,
|
||||||
invoiced = 0.0,
|
invoiced = 0.0,
|
||||||
paid = 0.0,
|
paid = 0.0,
|
||||||
credit_note = 0.0,
|
credit_note = 0.0,
|
||||||
@@ -105,7 +108,6 @@ class ReceivablePayableReport(object):
|
|||||||
# get the row where this balance needs to be updated
|
# get the row where this balance needs to be updated
|
||||||
# if its a payment, it will return the linked invoice or will be considered as advance
|
# if its a payment, it will return the linked invoice or will be considered as advance
|
||||||
row = self.get_voucher_balance(gle)
|
row = self.get_voucher_balance(gle)
|
||||||
|
|
||||||
# gle_balance will be the total "debit - credit" for receivable type reports and
|
# gle_balance will be the total "debit - credit" for receivable type reports and
|
||||||
# and vice-versa for payable type reports
|
# and vice-versa for payable type reports
|
||||||
gle_balance = self.get_gle_balance(gle)
|
gle_balance = self.get_gle_balance(gle)
|
||||||
@@ -130,7 +132,18 @@ class ReceivablePayableReport(object):
|
|||||||
|
|
||||||
if gle.against_voucher:
|
if gle.against_voucher:
|
||||||
# find invoice
|
# find invoice
|
||||||
voucher_balance = self.voucher_balance.get((gle.against_voucher_type, gle.against_voucher, gle.party))
|
against_voucher = gle.against_voucher
|
||||||
|
|
||||||
|
# If payment is made against credit note
|
||||||
|
# and credit note is made against a Sales Invoice
|
||||||
|
# then consider the payment against original sales invoice.
|
||||||
|
if gle.against_voucher_type in ('Sales Invoice', 'Purchase Invoice'):
|
||||||
|
if gle.against_voucher in self.return_entries:
|
||||||
|
return_against = self.return_entries.get(gle.against_voucher)
|
||||||
|
if return_against:
|
||||||
|
against_voucher = return_against
|
||||||
|
|
||||||
|
voucher_balance = self.voucher_balance.get((gle.against_voucher_type, against_voucher, gle.party))
|
||||||
|
|
||||||
if not voucher_balance:
|
if not voucher_balance:
|
||||||
# no invoice, this is an invoice / stand-alone payment / credit note
|
# no invoice, this is an invoice / stand-alone payment / credit note
|
||||||
@@ -257,7 +270,6 @@ class ReceivablePayableReport(object):
|
|||||||
# customer / supplier name
|
# customer / supplier name
|
||||||
party_details = self.get_party_details(row.party)
|
party_details = self.get_party_details(row.party)
|
||||||
row.update(party_details)
|
row.update(party_details)
|
||||||
|
|
||||||
if self.filters.get(scrub(self.filters.party_type)):
|
if self.filters.get(scrub(self.filters.party_type)):
|
||||||
row.currency = row.account_currency
|
row.currency = row.account_currency
|
||||||
else:
|
else:
|
||||||
@@ -422,6 +434,19 @@ class ReceivablePayableReport(object):
|
|||||||
if row.future_ref:
|
if row.future_ref:
|
||||||
row.future_ref = ', '.join(row.future_ref)
|
row.future_ref = ', '.join(row.future_ref)
|
||||||
|
|
||||||
|
def get_return_entries(self):
|
||||||
|
doctype = "Sales Invoice" if self.party_type == "Customer" else "Purchase Invoice"
|
||||||
|
filters={
|
||||||
|
'is_return': 1,
|
||||||
|
'docstatus': 1
|
||||||
|
}
|
||||||
|
party_field = scrub(self.filters.party_type)
|
||||||
|
if self.filters.get(party_field):
|
||||||
|
filters.update({party_field: self.filters.get(party_field)})
|
||||||
|
self.return_entries = frappe._dict(
|
||||||
|
frappe.get_all(doctype, filters, ['name', 'return_against'], as_list=1)
|
||||||
|
)
|
||||||
|
|
||||||
def set_ageing(self, row):
|
def set_ageing(self, row):
|
||||||
if self.filters.ageing_based_on == "Due Date":
|
if self.filters.ageing_based_on == "Due Date":
|
||||||
entry_date = row.due_date
|
entry_date = row.due_date
|
||||||
@@ -445,6 +470,10 @@ class ReceivablePayableReport(object):
|
|||||||
|
|
||||||
row.age = (getdate(self.age_as_on) - getdate(entry_date)).days or 0
|
row.age = (getdate(self.age_as_on) - getdate(entry_date)).days or 0
|
||||||
index = None
|
index = None
|
||||||
|
|
||||||
|
if not (self.filters.range1 and self.filters.range2 and self.filters.range3 and self.filters.range4):
|
||||||
|
self.filters.range1, self.filters.range2, self.filters.range3, self.filters.range4 = 30, 60, 90, 120
|
||||||
|
|
||||||
for i, days in enumerate([self.filters.range1, self.filters.range2, self.filters.range3, self.filters.range4]):
|
for i, days in enumerate([self.filters.range1, self.filters.range2, self.filters.range3, self.filters.range4]):
|
||||||
if row.age <= days:
|
if row.age <= days:
|
||||||
index = i
|
index = i
|
||||||
@@ -673,11 +702,11 @@ class ReceivablePayableReport(object):
|
|||||||
def get_chart_data(self):
|
def get_chart_data(self):
|
||||||
rows = []
|
rows = []
|
||||||
for row in self.data:
|
for row in self.data:
|
||||||
rows.append(
|
values = [row.range1, row.range2, row.range3, row.range4, row.range5]
|
||||||
{
|
precision = cint(frappe.db.get_default("float_precision")) or 2
|
||||||
'values': [row.range1, row.range2, row.range3, row.range4, row.range5]
|
rows.append({
|
||||||
}
|
'values': [flt(val, precision) for val in values]
|
||||||
)
|
})
|
||||||
|
|
||||||
self.chart = {
|
self.chart = {
|
||||||
"data": {
|
"data": {
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ class AccountsReceivableSummary(ReceivablePayableReport):
|
|||||||
|
|
||||||
row.party = party
|
row.party = party
|
||||||
if self.party_naming_by == "Naming Series":
|
if self.party_naming_by == "Naming Series":
|
||||||
row.party_name = frappe.get_cached_value(self.party_type, party, [self.party_type + "_name"])
|
row.party_name = frappe.get_cached_value(self.party_type,
|
||||||
|
party, frappe.scrub(self.party_type) + "_name")
|
||||||
|
|
||||||
row.update(party_dict)
|
row.update(party_dict)
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ def _execute(filters=None, additional_table_columns=None, additional_query_colum
|
|||||||
filters.update({"from_date": filters.get("date_range") and filters.get("date_range")[0], "to_date": filters.get("date_range") and filters.get("date_range")[1]})
|
filters.update({"from_date": filters.get("date_range") and filters.get("date_range")[0], "to_date": filters.get("date_range") and filters.get("date_range")[1]})
|
||||||
columns = get_columns(additional_table_columns)
|
columns = get_columns(additional_table_columns)
|
||||||
|
|
||||||
company_currency = erpnext.get_company_currency(filters.get('company'))
|
company_currency = frappe.get_cached_value('Company', filters.get("company"), "default_currency")
|
||||||
|
|
||||||
item_list = get_items(filters, additional_query_columns)
|
item_list = get_items(filters, additional_query_columns)
|
||||||
if item_list:
|
if item_list:
|
||||||
|
|||||||
@@ -4,11 +4,13 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from erpnext.accounts.report.accounts_receivable.accounts_receivable import get_ageing_data
|
from erpnext.accounts.report.accounts_receivable.accounts_receivable import ReceivablePayableReport
|
||||||
from frappe.utils import getdate, flt
|
from frappe.utils import getdate, flt
|
||||||
|
|
||||||
def execute(filters=None):
|
def execute(filters=None):
|
||||||
if not filters: filters = {}
|
if not filters:
|
||||||
|
filters = {}
|
||||||
|
|
||||||
validate_filters(filters)
|
validate_filters(filters)
|
||||||
|
|
||||||
columns = get_columns(filters)
|
columns = get_columns(filters)
|
||||||
@@ -19,18 +21,29 @@ def execute(filters=None):
|
|||||||
for d in entries:
|
for d in entries:
|
||||||
invoice = invoice_details.get(d.against_voucher) or frappe._dict()
|
invoice = invoice_details.get(d.against_voucher) or frappe._dict()
|
||||||
|
|
||||||
if d.reference_type=="Purchase Invoice":
|
if d.reference_type == "Purchase Invoice":
|
||||||
payment_amount = flt(d.debit) or -1 * flt(d.credit)
|
payment_amount = flt(d.debit) or -1 * flt(d.credit)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
payment_amount = flt(d.credit) or -1 * flt(d.debit)
|
payment_amount = flt(d.credit) or -1 * flt(d.debit)
|
||||||
|
|
||||||
row = [d.voucher_type, d.voucher_no, d.party_type, d.party, d.posting_date, d.against_voucher,
|
d.update({
|
||||||
invoice.posting_date, invoice.due_date, d.debit, d.credit, d.remarks]
|
"range1": 0,
|
||||||
|
"range2": 0,
|
||||||
|
"range3": 0,
|
||||||
|
"range4": 0,
|
||||||
|
"outstanding": payment_amount
|
||||||
|
})
|
||||||
|
|
||||||
if d.against_voucher:
|
if d.against_voucher:
|
||||||
row += get_ageing_data(30, 60, 90, 120, d.posting_date, invoice.posting_date, payment_amount)
|
ReceivablePayableReport(filters).get_ageing_data(invoice.posting_date, d)
|
||||||
else:
|
|
||||||
row += ["", "", "", "", ""]
|
row = [
|
||||||
|
d.voucher_type, d.voucher_no, d.party_type, d.party, d.posting_date, d.against_voucher,
|
||||||
|
invoice.posting_date, invoice.due_date, d.debit, d.credit, d.remarks,
|
||||||
|
d.age, d.range1, d.range2, d.range3, d.range4
|
||||||
|
]
|
||||||
|
|
||||||
if invoice.due_date:
|
if invoice.due_date:
|
||||||
row.append((getdate(d.posting_date) - getdate(invoice.due_date)).days or 0)
|
row.append((getdate(d.posting_date) - getdate(invoice.due_date)).days or 0)
|
||||||
|
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ def _execute(filters, additional_table_columns=None, additional_query_columns=No
|
|||||||
total_tax = 0
|
total_tax = 0
|
||||||
for tax_acc in tax_accounts:
|
for tax_acc in tax_accounts:
|
||||||
if tax_acc not in income_accounts:
|
if tax_acc not in income_accounts:
|
||||||
tax_amount = flt(invoice_tax_map.get(inv.name, {}).get(tax_acc))
|
tax_amount_precision = get_field_precision(frappe.get_meta("Sales Taxes and Charges").get_field("tax_amount"), currency=company_currency) or 2
|
||||||
total_tax += tax_amount
|
tax_amount = flt(invoice_tax_map.get(inv.name, {}).get(tax_acc), tax_amount_precision)
|
||||||
row.append(tax_amount)
|
row.append(tax_amount)
|
||||||
|
|
||||||
# total tax, grand total, outstanding amount & rounded total
|
# total tax, grand total, outstanding amount & rounded total
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "Capital Traders",
|
"modified": "2019-02-12 05:10:02.987274",
|
||||||
"modified": "2018-12-12 05:10:02.987274",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Supplier Ledger Summary",
|
"name": "Supplier Ledger Summary",
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "Gadgets International",
|
"modified": "2018-09-21 11:25:00.551823",
|
||||||
"modified": "2018-08-21 11:25:00.551823",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "TDS Computation Summary",
|
"name": "TDS Computation Summary",
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "Gadgets International",
|
"modified": "2019-09-24 13:46:16.473711",
|
||||||
"modified": "2018-08-21 11:33:40.804532",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "TDS Payable Monthly",
|
"name": "TDS Payable Monthly",
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ frappe.ui.form.on("Purchase Order", {
|
|||||||
frm.custom_make_buttons = {
|
frm.custom_make_buttons = {
|
||||||
'Purchase Receipt': 'Receipt',
|
'Purchase Receipt': 'Receipt',
|
||||||
'Purchase Invoice': 'Invoice',
|
'Purchase Invoice': 'Invoice',
|
||||||
'Stock Entry': 'Material to Supplier'
|
'Stock Entry': 'Material to Supplier',
|
||||||
|
'Payment Entry': 'Payment'
|
||||||
}
|
}
|
||||||
|
|
||||||
frm.set_query("reserve_warehouse", "supplied_items", function() {
|
frm.set_query("reserve_warehouse", "supplied_items", function() {
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ def copy_attributes_to_variant(item, variant):
|
|||||||
if not variant.description:
|
if not variant.description:
|
||||||
variant.description = ""
|
variant.description = ""
|
||||||
|
|
||||||
|
else:
|
||||||
if item.variant_based_on=='Item Attribute':
|
if item.variant_based_on=='Item Attribute':
|
||||||
if variant.attributes:
|
if variant.attributes:
|
||||||
attributes_description = item.description + " "
|
attributes_description = item.description + " "
|
||||||
@@ -299,7 +300,7 @@ def copy_attributes_to_variant(item, variant):
|
|||||||
attributes_description += "<div>" + d.attribute + ": " + cstr(d.attribute_value) + "</div>"
|
attributes_description += "<div>" + d.attribute + ": " + cstr(d.attribute_value) + "</div>"
|
||||||
|
|
||||||
if attributes_description not in variant.description:
|
if attributes_description not in variant.description:
|
||||||
variant.description += attributes_description
|
variant.description = attributes_description
|
||||||
|
|
||||||
def make_variant_item_code(template_item_code, template_item_name, variant):
|
def make_variant_item_code(template_item_code, template_item_name, variant):
|
||||||
"""Uses template's item code and abbreviations to make variant's item code"""
|
"""Uses template's item code and abbreviations to make variant's item code"""
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "",
|
"modified": "2019-04-17 00:20:27.248275",
|
||||||
"modified": "2017-04-17 00:20:27.248275",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "CRM",
|
"module": "CRM",
|
||||||
"name": "Campaign Efficiency",
|
"name": "Campaign Efficiency",
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "",
|
"modified": "2019-09-19 14:40:52.035394",
|
||||||
"modified": "2018-09-17 14:40:52.035394",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "CRM",
|
"module": "CRM",
|
||||||
"name": "Lead Conversion Time",
|
"name": "Lead Conversion Time",
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "Shishuvan Secondary School",
|
"modified": "2019-02-08 15:11:35.339434",
|
||||||
"modified": "2018-02-08 15:11:35.339434",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Education",
|
"module": "Education",
|
||||||
"name": "Final Assessment Grades",
|
"name": "Final Assessment Grades",
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "basic_info",
|
"fieldname": "basic_info",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -56,6 +57,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "inpatient_status",
|
"fieldname": "inpatient_status",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -89,6 +91,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "inpatient_record",
|
"fieldname": "inpatient_record",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -123,6 +126,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"default": "",
|
"default": "",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "naming_series",
|
"fieldname": "naming_series",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -156,6 +160,7 @@
|
|||||||
"bold": 1,
|
"bold": 1,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "patient_name",
|
"fieldname": "patient_name",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -189,6 +194,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "sex",
|
"fieldname": "sex",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -222,6 +228,7 @@
|
|||||||
"bold": 1,
|
"bold": 1,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "blood_group",
|
"fieldname": "blood_group",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -255,6 +262,7 @@
|
|||||||
"bold": 1,
|
"bold": 1,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "dob",
|
"fieldname": "dob",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Date",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -287,6 +295,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "age_html",
|
"fieldname": "age_html",
|
||||||
"fieldtype": "HTML",
|
"fieldtype": "HTML",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -320,6 +329,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"default": "Active",
|
"default": "Active",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "status",
|
"fieldname": "status",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -353,6 +363,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "image",
|
"fieldname": "image",
|
||||||
"fieldtype": "Attach Image",
|
"fieldtype": "Attach Image",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -386,6 +397,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "column_break_14",
|
"fieldname": "column_break_14",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -417,6 +429,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "customer",
|
"fieldname": "customer",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -450,6 +463,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "report_preference",
|
"fieldname": "report_preference",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -483,6 +497,7 @@
|
|||||||
"bold": 1,
|
"bold": 1,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "mobile",
|
"fieldname": "mobile",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -515,6 +530,7 @@
|
|||||||
"bold": 1,
|
"bold": 1,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "email",
|
"fieldname": "email",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -548,6 +564,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "phone",
|
"fieldname": "phone",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -581,6 +598,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"default": "0",
|
"default": "0",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "disabled",
|
"fieldname": "disabled",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -613,6 +631,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "sb_relation",
|
"fieldname": "sb_relation",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -645,6 +664,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "patient_relation",
|
"fieldname": "patient_relation",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -678,6 +698,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "allergy_medical_and_surgical_history",
|
"fieldname": "allergy_medical_and_surgical_history",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -710,6 +731,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "allergies",
|
"fieldname": "allergies",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -742,6 +764,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "medication",
|
"fieldname": "medication",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -774,6 +797,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "column_break_20",
|
"fieldname": "column_break_20",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -805,6 +829,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "medical_history",
|
"fieldname": "medical_history",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -837,6 +862,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "surgical_history",
|
"fieldname": "surgical_history",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -869,6 +895,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "personal_and_social_history",
|
"fieldname": "personal_and_social_history",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -901,6 +928,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "occupation",
|
"fieldname": "occupation",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -933,6 +961,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "column_break_25",
|
"fieldname": "column_break_25",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -964,6 +993,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "marital_status",
|
"fieldname": "marital_status",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -997,6 +1027,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "risk_factors",
|
"fieldname": "risk_factors",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -1029,6 +1060,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "tobacco_past_use",
|
"fieldname": "tobacco_past_use",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -1061,6 +1093,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "tobacco_current_use",
|
"fieldname": "tobacco_current_use",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -1093,6 +1126,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "alcohol_past_use",
|
"fieldname": "alcohol_past_use",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -1125,6 +1159,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "alcohol_current_use",
|
"fieldname": "alcohol_current_use",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -1157,6 +1192,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "column_break_32",
|
"fieldname": "column_break_32",
|
||||||
"fieldtype": "Column Break",
|
"fieldtype": "Column Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -1188,6 +1224,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "surrounding_factors",
|
"fieldname": "surrounding_factors",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -1220,6 +1257,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "other_risk_factors",
|
"fieldname": "other_risk_factors",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -1253,6 +1291,7 @@
|
|||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
"collapsible_depends_on": "patient_details",
|
"collapsible_depends_on": "patient_details",
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "more_info",
|
"fieldname": "more_info",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -1288,6 +1327,7 @@
|
|||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
"description": "Additional information regarding the patient",
|
"description": "Additional information regarding the patient",
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "patient_details",
|
"fieldname": "patient_details",
|
||||||
"fieldtype": "Text",
|
"fieldtype": "Text",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -1320,6 +1360,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 1,
|
"collapsible": 1,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "ac_sb",
|
"fieldname": "ac_sb",
|
||||||
"fieldtype": "Section Break",
|
"fieldtype": "Section Break",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@@ -1352,6 +1393,7 @@
|
|||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 0,
|
||||||
|
"fetch_if_empty": 0,
|
||||||
"fieldname": "default_currency",
|
"fieldname": "default_currency",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"hidden": 1,
|
"hidden": 1,
|
||||||
@@ -1391,7 +1433,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 50,
|
"max_attachments": 50,
|
||||||
"modified": "2018-11-23 12:11:14.336657",
|
"modified": "2019-09-23 16:02:32.667663",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Healthcare",
|
"module": "Healthcare",
|
||||||
"name": "Patient",
|
"name": "Patient",
|
||||||
@@ -1402,7 +1444,7 @@
|
|||||||
"amend": 0,
|
"amend": 0,
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 0,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
"export": 1,
|
"export": 1,
|
||||||
"if_owner": 0,
|
"if_owner": 0,
|
||||||
@@ -1421,7 +1463,7 @@
|
|||||||
"amend": 0,
|
"amend": 0,
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 0,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
"export": 1,
|
"export": 1,
|
||||||
"if_owner": 0,
|
"if_owner": 0,
|
||||||
@@ -1440,7 +1482,7 @@
|
|||||||
"amend": 0,
|
"amend": 0,
|
||||||
"cancel": 0,
|
"cancel": 0,
|
||||||
"create": 1,
|
"create": 1,
|
||||||
"delete": 0,
|
"delete": 1,
|
||||||
"email": 1,
|
"email": 1,
|
||||||
"export": 1,
|
"export": 1,
|
||||||
"if_owner": 0,
|
"if_owner": 0,
|
||||||
|
|||||||
@@ -648,7 +648,7 @@ def get_bom_items_as_dict(bom, company, qty=1, fetch_exploded=1, fetch_scrap_ite
|
|||||||
item_dict[key] = item
|
item_dict[key] = item
|
||||||
|
|
||||||
for item, item_details in item_dict.items():
|
for item, item_details in item_dict.items():
|
||||||
for d in [["Account", "expense_account", "default_expense_account"],
|
for d in [["Account", "expense_account", "stock_adjustment_account"],
|
||||||
["Cost Center", "cost_center", "cost_center"], ["Warehouse", "default_warehouse", ""]]:
|
["Cost Center", "cost_center", "cost_center"], ["Warehouse", "default_warehouse", ""]]:
|
||||||
company_in_record = frappe.db.get_value(d[0], item_details.get(d[1]), "company")
|
company_in_record = frappe.db.get_value(d[0], item_details.get(d[1]), "company")
|
||||||
if not item_details.get(d[1]) or (company_in_record and company != company_in_record):
|
if not item_details.get(d[1]) or (company_in_record and company != company_in_record):
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ class JobCard(Document):
|
|||||||
for_quantity, time_in_mins = 0, 0
|
for_quantity, time_in_mins = 0, 0
|
||||||
from_time_list, to_time_list = [], []
|
from_time_list, to_time_list = [], []
|
||||||
|
|
||||||
|
|
||||||
for d in frappe.get_all('Job Card',
|
for d in frappe.get_all('Job Card',
|
||||||
filters = {'docstatus': 1, 'operation_id': self.operation_id}):
|
filters = {'docstatus': 1, 'operation_id': self.operation_id}):
|
||||||
doc = frappe.get_doc('Job Card', d.name)
|
doc = frappe.get_doc('Job Card', d.name)
|
||||||
@@ -125,8 +124,8 @@ class JobCard(Document):
|
|||||||
if data.name == self.operation_id:
|
if data.name == self.operation_id:
|
||||||
data.completed_qty = for_quantity
|
data.completed_qty = for_quantity
|
||||||
data.actual_operation_time = time_in_mins
|
data.actual_operation_time = time_in_mins
|
||||||
data.actual_start_time = min(from_time_list)
|
data.actual_start_time = min(from_time_list) if from_time_list else None
|
||||||
data.actual_end_time = max(to_time_list)
|
data.actual_end_time = max(to_time_list) if to_time_list else None
|
||||||
|
|
||||||
wo.flags.ignore_validate_update_after_submit = True
|
wo.flags.ignore_validate_update_after_submit = True
|
||||||
wo.update_operation_status()
|
wo.update_operation_status()
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "Gadgets International",
|
"modified": "2018-06-28 16:22:24.040106",
|
||||||
"modified": "2018-05-28 16:22:24.040106",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Manufacturing",
|
"module": "Manufacturing",
|
||||||
"name": "BOM Variance Report",
|
"name": "BOM Variance Report",
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ frappe.provide('frappe.ui.form');
|
|||||||
|
|
||||||
frappe.ui.form.CustomerQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({
|
frappe.ui.form.CustomerQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({
|
||||||
init: function(doctype, after_insert) {
|
init: function(doctype, after_insert) {
|
||||||
|
this.skip_redirect_on_error = true;
|
||||||
this._super(doctype, after_insert);
|
this._super(doctype, after_insert);
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -37,8 +38,7 @@ frappe.ui.form.CustomerQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({
|
|||||||
{
|
{
|
||||||
label: __("Address Line 1"),
|
label: __("Address Line 1"),
|
||||||
fieldname: "address_line1",
|
fieldname: "address_line1",
|
||||||
fieldtype: "Data",
|
fieldtype: "Data"
|
||||||
reqd: 1
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: __("Address Line 2"),
|
label: __("Address Line 2"),
|
||||||
@@ -56,8 +56,7 @@ frappe.ui.form.CustomerQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({
|
|||||||
{
|
{
|
||||||
label: __("City"),
|
label: __("City"),
|
||||||
fieldname: "city",
|
fieldname: "city",
|
||||||
fieldtype: "Data",
|
fieldtype: "Data"
|
||||||
reqd: 1,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: __("State"),
|
label: __("State"),
|
||||||
@@ -68,8 +67,7 @@ frappe.ui.form.CustomerQuickEntryForm = frappe.ui.form.QuickEntryForm.extend({
|
|||||||
label: __("Country"),
|
label: __("Country"),
|
||||||
fieldname: "country",
|
fieldname: "country",
|
||||||
fieldtype: "Link",
|
fieldtype: "Link",
|
||||||
options: "Country",
|
options: "Country"
|
||||||
reqd: 1
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: __("Customer POS Id"),
|
label: __("Customer POS Id"),
|
||||||
|
|||||||
@@ -153,8 +153,7 @@ def get_invoice_summary(items, taxes):
|
|||||||
tax_rate=tax.rate,
|
tax_rate=tax.rate,
|
||||||
tax_amount=(reference_row.tax_amount * tax.rate) / 100,
|
tax_amount=(reference_row.tax_amount * tax.rate) / 100,
|
||||||
net_amount=reference_row.tax_amount,
|
net_amount=reference_row.tax_amount,
|
||||||
taxable_amount=(reference_row.tax_amount if tax.charge_type == 'On Previous Row Amount'
|
taxable_amount=reference_row.tax_amount,
|
||||||
else reference_row.total),
|
|
||||||
item_tax_rate={tax.account_head: tax.rate},
|
item_tax_rate={tax.account_head: tax.rate},
|
||||||
charges=True,
|
charges=True,
|
||||||
type="Actual",
|
type="Actual",
|
||||||
@@ -189,6 +188,10 @@ def get_invoice_summary(items, taxes):
|
|||||||
summary_data[key]["tax_exemption_reason"] = tax.tax_exemption_reason
|
summary_data[key]["tax_exemption_reason"] = tax.tax_exemption_reason
|
||||||
summary_data[key]["tax_exemption_law"] = tax.tax_exemption_law
|
summary_data[key]["tax_exemption_law"] = tax.tax_exemption_law
|
||||||
|
|
||||||
|
if summary_data.get("0.0") and tax.charge_type in ["On Previous Row Total",
|
||||||
|
"On Previous Row Amount"]:
|
||||||
|
summary_data[key]["taxable_amount"] = tax.total
|
||||||
|
|
||||||
if summary_data == {}: #Implies that Zero VAT has not been set on any item.
|
if summary_data == {}: #Implies that Zero VAT has not been set on any item.
|
||||||
summary_data.setdefault("0.0", {"tax_amount": 0.0, "taxable_amount": tax.total,
|
summary_data.setdefault("0.0", {"tax_amount": 0.0, "taxable_amount": tax.total,
|
||||||
"tax_exemption_reason": tax.tax_exemption_reason, "tax_exemption_law": tax.tax_exemption_law})
|
"tax_exemption_reason": tax.tax_exemption_reason, "tax_exemption_law": tax.tax_exemption_law})
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "Standard",
|
"modified": "2019-04-26 12:59:38.603649",
|
||||||
"modified": "2018-04-26 12:59:38.603649",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Regional",
|
"module": "Regional",
|
||||||
"name": "HSN-wise-summary of outward supplies",
|
"name": "HSN-wise-summary of outward supplies",
|
||||||
|
|||||||
@@ -340,6 +340,16 @@ def make_contact(args, is_primary_contact=1):
|
|||||||
return contact
|
return contact
|
||||||
|
|
||||||
def make_address(args, is_primary_address=1):
|
def make_address(args, is_primary_address=1):
|
||||||
|
reqd_fields = []
|
||||||
|
for field in ['city', 'country']:
|
||||||
|
if not args.get(field):
|
||||||
|
reqd_fields.append( '<li>' + field.title() + '</li>')
|
||||||
|
|
||||||
|
if reqd_fields:
|
||||||
|
msg = _("Following fields are mandatory to create address:")
|
||||||
|
frappe.throw("{0} <br><br> <ul>{1}</ul>".format(msg, '\n'.join(reqd_fields)),
|
||||||
|
title = _("Missing Values Required"))
|
||||||
|
|
||||||
address = frappe.get_doc({
|
address = frappe.get_doc({
|
||||||
'doctype': 'Address',
|
'doctype': 'Address',
|
||||||
'address_title': args.get('name'),
|
'address_title': args.get('name'),
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ frappe.ui.form.on("Sales Order", {
|
|||||||
'Sales Invoice': 'Invoice',
|
'Sales Invoice': 'Invoice',
|
||||||
'Material Request': 'Material Request',
|
'Material Request': 'Material Request',
|
||||||
'Purchase Order': 'Purchase Order',
|
'Purchase Order': 'Purchase Order',
|
||||||
'Project': 'Project'
|
'Project': 'Project',
|
||||||
|
'Payment Entry': "Payment"
|
||||||
}
|
}
|
||||||
frm.add_fetch('customer', 'tax_id', 'tax_id');
|
frm.add_fetch('customer', 'tax_id', 'tax_id');
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,7 @@
|
|||||||
"doctype": "Report",
|
"doctype": "Report",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": "Yes",
|
"is_standard": "Yes",
|
||||||
"letter_head": "Delta9",
|
"modified": "2019-06-14 03:25:36.263179",
|
||||||
"modified": "2019-06-12 03:25:36.263179",
|
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Selling",
|
"module": "Selling",
|
||||||
"name": "Customer-wise Item Price",
|
"name": "Customer-wise Item Price",
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
|
|||||||
args: {
|
args: {
|
||||||
item_code: item.item_code,
|
item_code: item.item_code,
|
||||||
warehouse: item.warehouse,
|
warehouse: item.warehouse,
|
||||||
has_batch_no: has_batch_no,
|
has_batch_no: has_batch_no || 0,
|
||||||
stock_qty: item.stock_qty,
|
stock_qty: item.stock_qty,
|
||||||
serial_no: item.serial_no || "",
|
serial_no: item.serial_no || "",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -724,7 +724,7 @@ def get_serial_no_details(item_code, warehouse, stock_qty, serial_no):
|
|||||||
return {'serial_no': serial_no}
|
return {'serial_no': serial_no}
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_bin_details_and_serial_nos(item_code, warehouse, has_batch_no, stock_qty=None, serial_no=None):
|
def get_bin_details_and_serial_nos(item_code, warehouse, has_batch_no=None, stock_qty=None, serial_no=None):
|
||||||
bin_details_and_serial_nos = {}
|
bin_details_and_serial_nos = {}
|
||||||
bin_details_and_serial_nos.update(get_bin_details(item_code, warehouse))
|
bin_details_and_serial_nos.update(get_bin_details(item_code, warehouse))
|
||||||
if flt(stock_qty) > 0:
|
if flt(stock_qty) > 0:
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ def execute(filters=None):
|
|||||||
|
|
||||||
def get_columns():
|
def get_columns():
|
||||||
columns = [
|
columns = [
|
||||||
_("Company") + ":Link/Item:250",
|
_("Company") + ":Link/Company:250",
|
||||||
_("Warehouse") + ":Link/Item:150",
|
_("Warehouse") + ":Link/Warehouse:150",
|
||||||
_("Item") + ":Link/Item:150",
|
_("Item") + ":Link/Item:150",
|
||||||
_("Description") + "::300",
|
_("Description") + "::300",
|
||||||
_("Current Qty") + ":Float:100",
|
_("Current Qty") + ":Float:100",
|
||||||
|
|||||||
Reference in New Issue
Block a user