Compare commits
190 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
abfadce7d9 | ||
|
|
1ec626f39b | ||
|
|
9bc0d18996 | ||
|
|
7e02831897 | ||
|
|
c54d7ec445 | ||
|
|
a4faffb813 | ||
|
|
4715df1518 | ||
|
|
fc8d0f6ac7 | ||
|
|
dc83bb8d18 | ||
|
|
477ddf9119 | ||
|
|
ef864403a1 | ||
|
|
4fcf7bf01a | ||
|
|
bb514467f6 | ||
|
|
bec7e79ee8 | ||
|
|
247a8eedce | ||
|
|
cc35f62514 | ||
|
|
8d1c7a2524 | ||
|
|
3070deb295 | ||
|
|
e1f6e60cea | ||
|
|
3aa14f54b7 | ||
|
|
75de2238d1 | ||
|
|
826900822c | ||
|
|
6584240277 | ||
|
|
dd408d82da | ||
|
|
5ddb8ea124 | ||
|
|
7f3983a3d6 | ||
|
|
0c70a4ceb3 | ||
|
|
adc0923c7e | ||
|
|
cb7337f466 | ||
|
|
b38fac8bf1 | ||
|
|
68e6919d41 | ||
|
|
57ebde2b9e | ||
|
|
10663ab37f | ||
|
|
0a67c9715c | ||
|
|
c403ce3b4f | ||
|
|
3cdf9e4105 | ||
|
|
3cdf3544fb | ||
|
|
faf9b589c4 | ||
|
|
060f32d452 | ||
|
|
4c6af87ad0 | ||
|
|
a064e3a200 | ||
|
|
1106524121 | ||
|
|
451ee87e9f | ||
|
|
17d4fc4fa7 | ||
|
|
6bd9f7f5f0 | ||
|
|
289ffb788c | ||
|
|
45805622e4 | ||
|
|
467f5c7a75 | ||
|
|
ca2ce13817 | ||
|
|
57fb74f262 | ||
|
|
cde997edfa | ||
|
|
2b8472fe54 | ||
|
|
65ade073a9 | ||
|
|
e881b40ab2 | ||
|
|
903f675b32 | ||
|
|
3ebd956090 | ||
|
|
b01f1d2486 | ||
|
|
4c0c69b388 | ||
|
|
16d58560a0 | ||
|
|
dd556e7a89 | ||
|
|
12acd11814 | ||
|
|
c4d3283879 | ||
|
|
de7e760788 | ||
|
|
c2268caaf7 | ||
|
|
235de6566e | ||
|
|
acd9040346 | ||
|
|
e24cfdc556 | ||
|
|
53a46f68a2 | ||
|
|
af667f77e6 | ||
|
|
ce4e8ec178 | ||
|
|
4129ae5395 | ||
|
|
92c6c617de | ||
|
|
a731ad4433 | ||
|
|
3110c4a772 | ||
|
|
d50356dbab | ||
|
|
d1ba86a952 | ||
|
|
03f7aa9dab | ||
|
|
8c63697f41 | ||
|
|
e7dccca782 | ||
|
|
8d0ed21c04 | ||
|
|
bcc56a4557 | ||
|
|
7bb2f3a27b | ||
|
|
2d4cc7e71f | ||
|
|
fba61abd2a | ||
|
|
94bfe8ea0d | ||
|
|
31619f0a83 | ||
|
|
34037e0d88 | ||
|
|
647102fc94 | ||
|
|
a533b33fc6 | ||
|
|
995a71c854 | ||
|
|
bd7f48cfd4 | ||
|
|
82cef59fb3 | ||
|
|
cc6ce5beac | ||
|
|
15d7224335 | ||
|
|
1f51e71827 | ||
|
|
539a826b37 | ||
|
|
0ec9b90113 | ||
|
|
49b275ad1d | ||
|
|
7957f0ecea | ||
|
|
3c55d89f7f | ||
|
|
d5fda57297 | ||
|
|
a85a1ff145 | ||
|
|
afb8ec9cb6 | ||
|
|
8b92de26f0 | ||
|
|
fcd4f2b86b | ||
|
|
1277a61dad | ||
|
|
767d5e48e7 | ||
|
|
ed11e93b25 | ||
|
|
1d702bf112 | ||
|
|
43cdf792f9 | ||
|
|
687888133b | ||
|
|
e0825aaea9 | ||
|
|
0a76b8b29a | ||
|
|
0277dbc6b6 | ||
|
|
93a69e9485 | ||
|
|
6e33d91443 | ||
|
|
07364f5ece | ||
|
|
1890c794d7 | ||
|
|
71a9be8add | ||
|
|
fd131a4210 | ||
|
|
1a943151d7 | ||
|
|
c761f1b0a1 | ||
|
|
e970ddcee9 | ||
|
|
51db2ba22a | ||
|
|
cbc18ffdbf | ||
|
|
5b7d0a960e | ||
|
|
172efb1e87 | ||
|
|
95760a7db6 | ||
|
|
9c24bec654 | ||
|
|
7c0a58ac3f | ||
|
|
77e4f6b774 | ||
|
|
5bedd649df | ||
|
|
7207d21962 | ||
|
|
c118fc9343 | ||
|
|
bad13369d4 | ||
|
|
bf225c11b4 | ||
|
|
694edbc89a | ||
|
|
6406f8bda0 | ||
|
|
2901e14c59 | ||
|
|
5204eeedf7 | ||
|
|
ee8f88d641 | ||
|
|
b2206d1155 | ||
|
|
c54e25b5c7 | ||
|
|
6e36a48521 | ||
|
|
eca2e42ecb | ||
|
|
d7f7d5c9db | ||
|
|
37b0f7ca47 | ||
|
|
f4d5a66162 | ||
|
|
a84186c209 | ||
|
|
eb4c299bdb | ||
|
|
5b1b2fb858 | ||
|
|
eba9ca4d66 | ||
|
|
01de945388 | ||
|
|
79872bf62c | ||
|
|
c8ac3b042b | ||
|
|
f76853a8d9 | ||
|
|
323dc96c99 | ||
|
|
2563f404d2 | ||
|
|
29b565fdf5 | ||
|
|
2ea5c6913d | ||
|
|
5dcb40bc96 | ||
|
|
c07489a096 | ||
|
|
39e2c2bb09 | ||
|
|
e1a1c8ac31 | ||
|
|
28a6578ba2 | ||
|
|
932cf08aee | ||
|
|
47c2aa179b | ||
|
|
f7e9a9d786 | ||
|
|
04230cb656 | ||
|
|
54abf025b7 | ||
|
|
39ac535bdb | ||
|
|
dd74b5d44f | ||
|
|
afe85bdd04 | ||
|
|
e4b44a86a6 | ||
|
|
a1ccab81a0 | ||
|
|
cf3b318f7d | ||
|
|
568054ab96 | ||
|
|
0d207706c1 | ||
|
|
3d5a6af1ae | ||
|
|
79a994e895 | ||
|
|
20cdaadcd4 | ||
|
|
a2eccf08a1 | ||
|
|
6f62ecab73 | ||
|
|
463f71c6eb | ||
|
|
cea6b09d44 | ||
|
|
b4be679639 | ||
|
|
c51ef85dd8 | ||
|
|
3fc4e7c53f | ||
|
|
1d21274d65 | ||
|
|
063a88f057 |
1
.gitignore
vendored
@@ -7,3 +7,4 @@ latest_updates.json
|
||||
.wnf-lang-status
|
||||
*.egg-info
|
||||
dist/
|
||||
erpnext/docs/current
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
from __future__ import unicode_literals
|
||||
__version__ = '6.18.0'
|
||||
__version__ = '6.21.3'
|
||||
|
||||
@@ -52,6 +52,8 @@ class BankReconciliation(Document):
|
||||
frappe.throw(_("Clearance date cannot be before check date in row {0}").format(d.idx))
|
||||
|
||||
if d.clearance_date or self.include_reconciled_entries:
|
||||
if not d.clearance_date:
|
||||
d.clearance_date = None
|
||||
frappe.db.set_value("Journal Entry", d.voucher_id, "clearance_date", d.clearance_date)
|
||||
frappe.db.sql("""update `tabJournal Entry` set clearance_date = %s, modified = %s
|
||||
where name=%s""", (d.clearance_date, nowdate(), d.voucher_id))
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"print_width": "50%",
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
@@ -47,6 +48,7 @@
|
||||
"options": "C-FORM-",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -69,6 +71,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -91,6 +94,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -114,6 +118,7 @@
|
||||
"options": "Customer",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -135,6 +140,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"print_width": "50%",
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
@@ -160,6 +166,7 @@
|
||||
"options": "Company",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -183,6 +190,7 @@
|
||||
"options": "Fiscal Year",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -206,6 +214,7 @@
|
||||
"options": "\nI\nII\nIII\nIV",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -229,6 +238,7 @@
|
||||
"options": "Company:company:default_currency",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -251,6 +261,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -272,6 +283,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -295,6 +307,7 @@
|
||||
"options": "C-Form Invoice Detail",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -318,6 +331,7 @@
|
||||
"options": "Company:company:default_currency",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -341,6 +355,7 @@
|
||||
"options": "C-Form",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -359,7 +374,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 3,
|
||||
"modified": "2015-11-16 06:29:43.143528",
|
||||
"modified": "2016-02-03 01:09:33.043437",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "C-Form",
|
||||
@@ -427,5 +442,7 @@
|
||||
}
|
||||
],
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0
|
||||
"read_only_onload": 0,
|
||||
"sort_order": "DESC",
|
||||
"timeline_field": "customer"
|
||||
}
|
||||
@@ -6,10 +6,10 @@ import frappe
|
||||
from frappe import _
|
||||
from frappe.utils import flt, fmt_money, getdate, formatdate
|
||||
from frappe.model.document import Document
|
||||
from erpnext.accounts.party import validate_party_gle_currency
|
||||
from erpnext.accounts.party import validate_party_gle_currency, validate_party_frozen_disabled
|
||||
from erpnext.accounts.utils import get_account_currency
|
||||
from erpnext.setup.doctype.company.company import get_company_currency
|
||||
from erpnext.exceptions import InvalidAccountCurrency, CustomerFrozen
|
||||
from erpnext.exceptions import InvalidAccountCurrency
|
||||
|
||||
exclude_from_linked_with = True
|
||||
|
||||
@@ -96,11 +96,7 @@ class GLEntry(Document):
|
||||
frappe.throw(_("Cost Center {0} does not belong to Company {1}").format(self.cost_center, self.company))
|
||||
|
||||
def validate_party(self):
|
||||
if self.party_type and self.party:
|
||||
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
|
||||
if not frozen_accounts_modifier in frappe.get_roles():
|
||||
if frappe.db.get_value(self.party_type, self.party, "is_frozen"):
|
||||
frappe.throw("{0} {1} is frozen".format(self.party_type, self.party), CustomerFrozen)
|
||||
validate_party_frozen_disabled(self.party_type, self.party)
|
||||
|
||||
def validate_currency(self):
|
||||
company_currency = get_company_currency(self.company)
|
||||
|
||||
@@ -209,9 +209,7 @@ class JournalEntry(AccountsController):
|
||||
account = self.reference_accounts[reference_name]
|
||||
|
||||
if reference_type in ("Sales Order", "Purchase Order"):
|
||||
order = frappe.db.get_value(reference_type, reference_name,
|
||||
["docstatus", "per_billed", "status", "advance_paid",
|
||||
"base_grand_total", "grand_total", "currency"], as_dict=1)
|
||||
order = frappe.get_doc(reference_type, reference_name)
|
||||
|
||||
if order.docstatus != 1:
|
||||
frappe.throw(_("{0} {1} is not submitted").format(reference_type, reference_name))
|
||||
@@ -225,12 +223,16 @@ class JournalEntry(AccountsController):
|
||||
account_currency = get_account_currency(account)
|
||||
if account_currency == self.company_currency:
|
||||
voucher_total = order.base_grand_total
|
||||
formatted_voucher_total = fmt_money(voucher_total, order.precision("base_grand_total"),
|
||||
currency=account_currency)
|
||||
else:
|
||||
voucher_total = order.grand_total
|
||||
formatted_voucher_total = fmt_money(voucher_total, order.precision("grand_total"),
|
||||
currency=account_currency)
|
||||
|
||||
if flt(voucher_total) < (flt(order.advance_paid) + total):
|
||||
frappe.throw(_("Advance paid against {0} {1} cannot be greater \
|
||||
than Grand Total {2}").format(reference_type, reference_name, voucher_total))
|
||||
than Grand Total {2}").format(reference_type, reference_name, formatted_voucher_total))
|
||||
|
||||
def validate_invoices(self):
|
||||
"""Validate totals and docstatus for invoices"""
|
||||
@@ -298,8 +300,11 @@ class JournalEntry(AccountsController):
|
||||
|
||||
def set_amounts_in_company_currency(self):
|
||||
for d in self.get("accounts"):
|
||||
d.debit = flt(flt(d.debit_in_account_currency)*flt(d.exchange_rate), d.precision("debit"))
|
||||
d.credit = flt(flt(d.credit_in_account_currency)*flt(d.exchange_rate), d.precision("credit"))
|
||||
d.debit_in_account_currency = flt(d.debit_in_account_currency, d.precision("debit_in_account_currency"))
|
||||
d.credit_in_account_currency = flt(d.credit_in_account_currency, d.precision("credit_in_account_currency"))
|
||||
|
||||
d.debit = flt(d.debit_in_account_currency * flt(d.exchange_rate), d.precision("debit"))
|
||||
d.credit = flt(d.credit_in_account_currency * flt(d.exchange_rate), d.precision("credit"))
|
||||
|
||||
def set_exchange_rate(self):
|
||||
for d in self.get("accounts"):
|
||||
@@ -361,10 +366,10 @@ class JournalEntry(AccountsController):
|
||||
elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
|
||||
total_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
|
||||
bank_account_currency = d.account_currency
|
||||
|
||||
|
||||
if not self.pay_to_recd_from:
|
||||
total_amount = 0
|
||||
|
||||
|
||||
self.set_total_amount(total_amount, bank_account_currency)
|
||||
|
||||
def set_total_amount(self, amt, currency):
|
||||
@@ -526,7 +531,7 @@ def get_default_bank_cash_account(company, voucher_type, mode_of_payment=None, a
|
||||
if not account:
|
||||
account = frappe.db.get_value("Account",
|
||||
{"company": company, "account_type": "Bank", "is_group": 0})
|
||||
|
||||
|
||||
elif voucher_type=="Cash Entry":
|
||||
account = frappe.db.get_value("Company", company, "default_cash_account")
|
||||
if not account:
|
||||
@@ -645,7 +650,7 @@ def get_payment_entry(ref_doc, args):
|
||||
})
|
||||
|
||||
bank_row = je.append("accounts")
|
||||
|
||||
|
||||
#make it bank_details
|
||||
bank_account = get_default_bank_cash_account(ref_doc.company, "Bank Entry", account=args.get("bank_account"))
|
||||
if bank_account:
|
||||
@@ -667,7 +672,7 @@ def get_payment_entry(ref_doc, args):
|
||||
|
||||
je.set_amounts_in_company_currency()
|
||||
je.set_total_debit_credit()
|
||||
|
||||
|
||||
return je if args.get("journal_entry") else je.as_dict()
|
||||
|
||||
@frappe.whitelist()
|
||||
@@ -794,7 +799,7 @@ def get_exchange_rate(account, account_currency=None, company=None,
|
||||
company_currency = get_company_currency(company)
|
||||
|
||||
if account_currency != company_currency:
|
||||
if reference_type in ("Sales Invoice", "Purchase Invoice") and reference_name:
|
||||
if reference_type and reference_name and frappe.get_meta(reference_type).get_field("conversion_rate"):
|
||||
exchange_rate = frappe.db.get_value(reference_type, reference_name, "conversion_rate")
|
||||
|
||||
elif account_details and account_details.account_type == "Bank" and \
|
||||
|
||||
@@ -11,6 +11,8 @@ class PaymentGatewayAccount(Document):
|
||||
self.name = self.gateway + " - " + self.currency
|
||||
|
||||
def validate(self):
|
||||
self.currency = frappe.db.get_value("Account", self.payment_account, "account_currency")
|
||||
|
||||
self.update_default_payment_gateway()
|
||||
self.set_as_default_if_not_set()
|
||||
|
||||
@@ -20,5 +22,6 @@ class PaymentGatewayAccount(Document):
|
||||
where is_default = 1 """)
|
||||
|
||||
def set_as_default_if_not_set(self):
|
||||
if not frappe.db.get_value("Payment Gateway Account", {"is_default": 1, "name": ("!=", self.name)}, "name"):
|
||||
self.is_default = 1
|
||||
if not frappe.db.get_value("Payment Gateway Account",
|
||||
{"is_default": 1, "name": ("!=", self.name)}, "name"):
|
||||
self.is_default = 1
|
||||
|
||||
@@ -23,7 +23,7 @@ class PaymentRequest(Document):
|
||||
def validate_payment_request(self):
|
||||
if frappe.db.get_value("Payment Request", {"reference_name": self.reference_name,
|
||||
"name": ("!=", self.name), "status": ("not in", ["Initiated", "Paid"]), "docstatus": 1}, "name"):
|
||||
frappe.throw(_("Payment Request already exists {0}".fomart(self.reference_name)))
|
||||
frappe.throw(_("Payment Request already exists {0}".format(self.reference_name)))
|
||||
|
||||
def validate_currency(self):
|
||||
ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name)
|
||||
@@ -150,37 +150,43 @@ def make_payment_request(**args):
|
||||
ref_doc = frappe.get_doc(args.dt, args.dn)
|
||||
gateway_account = get_gateway_details(args)
|
||||
|
||||
pr = frappe.new_doc("Payment Request")
|
||||
pr.update({
|
||||
"payment_gateway": gateway_account.name,
|
||||
"gateway": gateway_account.gateway,
|
||||
"payment_account": gateway_account.payment_account,
|
||||
"currency": ref_doc.currency,
|
||||
"make_sales_invoice": args.cart or 0,
|
||||
"amount": get_amount(ref_doc, args.dt),
|
||||
"mute_email": args.mute_email or 0,
|
||||
"email_to": args.recipient_id or "",
|
||||
"subject": "Payment Request for %s"%args.dn,
|
||||
"message": gateway_account.message,
|
||||
"payment_url_message": gateway_account.payment_url_message,
|
||||
"payment_success_url": gateway_account.payment_success_url,
|
||||
"reference_doctype": args.dt,
|
||||
"reference_name": args.dn
|
||||
})
|
||||
existing_payment_request = frappe.db.get_value("Payment Request",
|
||||
{"reference_doctype": args.dt, "reference_name": args.dn})
|
||||
if existing_payment_request:
|
||||
pr = frappe.get_doc("Payment Request", existing_payment_request)
|
||||
else:
|
||||
pr = frappe.new_doc("Payment Request")
|
||||
|
||||
pr.update({
|
||||
"payment_gateway": gateway_account.name,
|
||||
"gateway": gateway_account.gateway,
|
||||
"payment_account": gateway_account.payment_account,
|
||||
"currency": ref_doc.currency,
|
||||
"make_sales_invoice": args.cart or 0,
|
||||
"amount": get_amount(ref_doc, args.dt),
|
||||
"mute_email": args.mute_email or 0,
|
||||
"email_to": args.recipient_id or "",
|
||||
"subject": "Payment Request for %s"%args.dn,
|
||||
"message": gateway_account.message,
|
||||
"payment_url_message": gateway_account.payment_url_message,
|
||||
"payment_success_url": gateway_account.payment_success_url,
|
||||
"reference_doctype": args.dt,
|
||||
"reference_name": args.dn
|
||||
})
|
||||
|
||||
if args.return_doc:
|
||||
return pr
|
||||
|
||||
if args.submit_doc:
|
||||
pr.insert(ignore_permissions=True)
|
||||
pr.submit()
|
||||
|
||||
if args.cart:
|
||||
generate_payment_request(pr.name)
|
||||
frappe.db.commit()
|
||||
|
||||
if not args.cart:
|
||||
if args.return_doc:
|
||||
return pr
|
||||
|
||||
if args.submit_doc:
|
||||
pr.insert(ignore_permissions=True)
|
||||
pr.submit()
|
||||
|
||||
if args.cart:
|
||||
generate_payment_request(pr.name)
|
||||
frappe.db.commit()
|
||||
|
||||
if not args.cart:
|
||||
return pr
|
||||
|
||||
return pr.as_dict()
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ payment_method = [
|
||||
{
|
||||
"doctype": "Payment Gateway Account",
|
||||
"gateway": "_Test Gateway",
|
||||
"payment_account": "_Test Bank - _TC",
|
||||
"payment_account": "_Test Bank USD - _TC",
|
||||
"currency": "USD"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -42,6 +42,10 @@ frappe.ui.form.on("Payment Tool", "refresh", function(frm) {
|
||||
frappe.ui.form.trigger("Payment Tool", "party_type");
|
||||
});
|
||||
|
||||
frappe.ui.form.on("Payment Tool", "party_type", function(frm) {
|
||||
frm.set_value("received_or_paid", frm.doc.party_type=="Customer" ? "Received" : "Paid");
|
||||
});
|
||||
|
||||
frappe.ui.form.on("Payment Tool", "party", function(frm) {
|
||||
if(frm.doc.party_type && frm.doc.party) {
|
||||
return frappe.call({
|
||||
|
||||
@@ -71,7 +71,9 @@ class PaymentTool(Document):
|
||||
d2.account = self.payment_account
|
||||
d2.account_currency = bank_account_currency
|
||||
d2.account_type = bank_account_type
|
||||
d2.exchange_rate = get_exchange_rate(self.payment_account, self.company)
|
||||
d2.exchange_rate = get_exchange_rate(self.payment_account, bank_account_currency, self.company,
|
||||
debit=(abs(total_payment_amount) if total_payment_amount < 0 else 0),
|
||||
credit=(total_payment_amount if total_payment_amount > 0 else 0))
|
||||
d2.account_balance = get_balance_on(self.payment_account)
|
||||
|
||||
amount_field_bank = 'debit_in_account_currency' if total_payment_amount < 0 \
|
||||
|
||||
@@ -97,10 +97,10 @@ def apply_pricing_rule(args):
|
||||
args = json.loads(args)
|
||||
|
||||
args = frappe._dict(args)
|
||||
|
||||
|
||||
if not args.transaction_type:
|
||||
set_transaction_type(args)
|
||||
|
||||
|
||||
# list of dictionaries
|
||||
out = []
|
||||
|
||||
@@ -142,7 +142,7 @@ def get_pricing_rule_for_item(args):
|
||||
customer = frappe.db.get_value("Customer", args.customer, ["customer_group", "territory"])
|
||||
if customer:
|
||||
args.customer_group, args.territory = customer
|
||||
|
||||
|
||||
args.supplier = args.supplier_type = None
|
||||
|
||||
elif args.supplier and not args.supplier_type:
|
||||
@@ -186,7 +186,7 @@ def get_pricing_rules(args):
|
||||
return condition
|
||||
|
||||
|
||||
conditions = ""
|
||||
conditions = item_variant_condition = ""
|
||||
values = {"item_code": args.get("item_code"), "brand": args.get("brand")}
|
||||
|
||||
for field in ["company", "customer", "supplier", "supplier_type", "campaign", "sales_partner"]:
|
||||
@@ -211,16 +211,26 @@ def get_pricing_rules(args):
|
||||
values['transaction_date'] = args.get('transaction_date')
|
||||
|
||||
item_group_condition = _get_tree_conditions("Item Group", False)
|
||||
if item_group_condition: item_group_condition = " or " + item_group_condition
|
||||
if item_group_condition:
|
||||
item_group_condition = " or " + item_group_condition
|
||||
|
||||
# load variant of if not defined
|
||||
if "variant_of" not in args:
|
||||
args.variant_of = frappe.db.get_value("Item", args.item_code, "variant_of")
|
||||
|
||||
if args.variant_of:
|
||||
item_variant_condition = ' or item_code=%(variant_of)s '
|
||||
values['variant_of'] = args.variant_of
|
||||
|
||||
return frappe.db.sql("""select * from `tabPricing Rule`
|
||||
where (item_code=%(item_code)s {item_group_condition} or brand=%(brand)s)
|
||||
where (item_code=%(item_code)s {item_variant_condition} {item_group_condition} or brand=%(brand)s)
|
||||
and docstatus < 2 and disable = 0
|
||||
and {transaction_type} = 1 {conditions}
|
||||
order by priority desc, name desc""".format(
|
||||
item_group_condition=item_group_condition,
|
||||
transaction_type= args.transaction_type,
|
||||
conditions=conditions), values, as_dict=1)
|
||||
item_group_condition = item_group_condition,
|
||||
item_variant_condition = item_variant_condition,
|
||||
transaction_type = args.transaction_type,
|
||||
conditions = conditions), values, as_dict=1)
|
||||
|
||||
def filter_pricing_rules(args, pricing_rules):
|
||||
# filter for qty
|
||||
@@ -228,6 +238,11 @@ def filter_pricing_rules(args, pricing_rules):
|
||||
pricing_rules = filter(lambda x: (flt(args.get("qty"))>=flt(x.min_qty)
|
||||
and (flt(args.get("qty"))<=x.max_qty if x.max_qty else True)), pricing_rules)
|
||||
|
||||
# add variant_of property in pricing rule
|
||||
for p in pricing_rules:
|
||||
if p.item_code and args.variant_of:
|
||||
p.variant_of = args.variant_of
|
||||
|
||||
# find pricing rule with highest priority
|
||||
if pricing_rules:
|
||||
max_priority = max([cint(p.priority) for p in pricing_rules])
|
||||
@@ -239,7 +254,7 @@ def filter_pricing_rules(args, pricing_rules):
|
||||
"supplier", "supplier_type", "campaign", "sales_partner"]
|
||||
|
||||
if len(pricing_rules) > 1:
|
||||
for field_set in [["item_code", "item_group", "brand"],
|
||||
for field_set in [["item_code", "variant_of", "item_group", "brand"],
|
||||
["customer", "customer_group", "territory"], ["supplier", "supplier_type"]]:
|
||||
remaining_fields = list(set(all_fields) - set(field_set))
|
||||
if if_all_rules_same(pricing_rules, remaining_fields):
|
||||
@@ -253,8 +268,7 @@ def filter_pricing_rules(args, pricing_rules):
|
||||
or pricing_rules
|
||||
|
||||
if len(pricing_rules) > 1:
|
||||
frappe.throw(_("Multiple Price Rule exists with same criteria, please resolve \
|
||||
conflict by assigning priority. Price Rules: {0}")
|
||||
frappe.throw(_("Multiple Price Rules exists with same criteria, please resolve conflict by assigning priority. Price Rules: {0}")
|
||||
.format("\n".join([d.name for d in pricing_rules])), MultiplePricingRuleConflict)
|
||||
elif pricing_rules:
|
||||
return pricing_rules[0]
|
||||
@@ -281,10 +295,10 @@ def apply_internal_priority(pricing_rules, field_set, args):
|
||||
def set_transaction_type(args):
|
||||
if args.doctype in ("Opportunity", "Quotation", "Sales Order", "Delivery Note", "Sales Invoice"):
|
||||
args.transaction_type = "selling"
|
||||
elif args.doctype in ("Material Request", "Supplier Quotation", "Purchase Order",
|
||||
elif args.doctype in ("Material Request", "Supplier Quotation", "Purchase Order",
|
||||
"Purchase Receipt", "Purchase Invoice"):
|
||||
args.transaction_type = "buying"
|
||||
elif args.customer:
|
||||
args.transaction_type = "selling"
|
||||
else:
|
||||
args.transaction_type = "buying"
|
||||
args.transaction_type = "buying"
|
||||
|
||||
@@ -41,12 +41,12 @@ class TestPricingRule(unittest.TestCase):
|
||||
})
|
||||
details = get_item_details(args)
|
||||
self.assertEquals(details.get("discount_percentage"), 10)
|
||||
|
||||
|
||||
prule = frappe.get_doc(test_record.copy())
|
||||
prule.applicable_for = "Customer"
|
||||
prule.title = "_Test Pricing Rule for Customer"
|
||||
self.assertRaises(MandatoryError, prule.insert)
|
||||
|
||||
|
||||
prule.customer = "_Test Customer"
|
||||
prule.discount_percentage = 20
|
||||
prule.insert()
|
||||
@@ -59,7 +59,7 @@ class TestPricingRule(unittest.TestCase):
|
||||
prule.title = "_Test Pricing Rule for Item Group"
|
||||
prule.discount_percentage = 15
|
||||
prule.insert()
|
||||
|
||||
|
||||
args.customer = "_Test Customer 1"
|
||||
details = get_item_details(args)
|
||||
self.assertEquals(details.get("discount_percentage"), 10)
|
||||
@@ -85,3 +85,73 @@ class TestPricingRule(unittest.TestCase):
|
||||
self.assertEquals(details.get("discount_percentage"), 15)
|
||||
|
||||
frappe.db.sql("delete from `tabPricing Rule`")
|
||||
|
||||
def test_pricing_rule_for_variants(self):
|
||||
from erpnext.stock.get_item_details import get_item_details
|
||||
from frappe import MandatoryError
|
||||
|
||||
frappe.db.sql("delete from `tabPricing Rule`")
|
||||
|
||||
if not frappe.db.exists("Item", "Test Variant PRT"):
|
||||
frappe.get_doc({
|
||||
"doctype": "Item",
|
||||
"item_code": "Test Variant PRT",
|
||||
"item_name": "Test Variant PRT",
|
||||
"description": "Test Variant PRT",
|
||||
"item_group": "_Test Item Group",
|
||||
"is_stock_item": 1,
|
||||
"variant_of": "_Test Variant Item",
|
||||
"default_warehouse": "_Test Warehouse - _TC",
|
||||
"stock_uom": "_Test UOM",
|
||||
"attributes": [
|
||||
{
|
||||
"attribute": "Test Size",
|
||||
"attribute_value": "Medium"
|
||||
}
|
||||
],
|
||||
}).insert()
|
||||
|
||||
frappe.get_doc({
|
||||
"doctype": "Pricing Rule",
|
||||
"title": "_Test Pricing Rule 1",
|
||||
"apply_on": "Item Code",
|
||||
"item_code": "_Test Variant Item",
|
||||
"selling": 1,
|
||||
"price_or_discount": "Discount Percentage",
|
||||
"price": 0,
|
||||
"discount_percentage": 7.5,
|
||||
"company": "_Test Company"
|
||||
}).insert()
|
||||
|
||||
args = frappe._dict({
|
||||
"item_code": "Test Variant PRT",
|
||||
"company": "_Test Company",
|
||||
"price_list": "_Test Price List",
|
||||
"currency": "_Test Currency",
|
||||
"doctype": "Sales Order",
|
||||
"conversion_rate": 1,
|
||||
"price_list_currency": "_Test Currency",
|
||||
"plc_conversion_rate": 1,
|
||||
"order_type": "Sales",
|
||||
"customer": "_Test Customer",
|
||||
"name": None
|
||||
})
|
||||
|
||||
details = get_item_details(args)
|
||||
self.assertEquals(details.get("discount_percentage"), 7.5)
|
||||
|
||||
# add a new pricing rule for that item code, it should take priority
|
||||
frappe.get_doc({
|
||||
"doctype": "Pricing Rule",
|
||||
"title": "_Test Pricing Rule 2",
|
||||
"apply_on": "Item Code",
|
||||
"item_code": "Test Variant PRT",
|
||||
"selling": 1,
|
||||
"price_or_discount": "Discount Percentage",
|
||||
"price": 0,
|
||||
"discount_percentage": 17.5,
|
||||
"company": "_Test Company"
|
||||
}).insert()
|
||||
|
||||
details = get_item_details(args)
|
||||
self.assertEquals(details.get("discount_percentage"), 17.5)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Document",
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
@@ -1563,7 +1564,7 @@
|
||||
"in_list_view": 0,
|
||||
"label": "Write Off Account",
|
||||
"length": 0,
|
||||
"no_copy": 1,
|
||||
"no_copy": 0,
|
||||
"options": "Account",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
@@ -1588,7 +1589,7 @@
|
||||
"in_list_view": 0,
|
||||
"label": "Write Off Cost Center",
|
||||
"length": 0,
|
||||
"no_copy": 1,
|
||||
"no_copy": 0,
|
||||
"options": "Cost Center",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
@@ -2487,7 +2488,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2015-12-17 16:18:58.177334",
|
||||
"modified": "2016-02-08 16:27:10.669373",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Purchase Invoice",
|
||||
@@ -2612,6 +2613,26 @@
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"delete": 0,
|
||||
"email": 0,
|
||||
"export": 0,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 1,
|
||||
"print": 0,
|
||||
"read": 1,
|
||||
"report": 0,
|
||||
"role": "All",
|
||||
"set_user_permissions": 0,
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"write": 0
|
||||
}
|
||||
],
|
||||
"read_only": 0,
|
||||
@@ -2619,5 +2640,6 @@
|
||||
"search_fields": "posting_date, supplier, fiscal_year, bill_no, base_grand_total, outstanding_amount",
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"timeline_field": "supplier",
|
||||
"title_field": "title"
|
||||
}
|
||||
@@ -263,9 +263,9 @@ class PurchaseInvoice(BuyingController):
|
||||
# parent's gl entry
|
||||
if self.grand_total:
|
||||
# Didnot use base_grand_total to book rounding loss gle
|
||||
grand_total_in_company_currency = flt(self.grand_total * self.conversion_rate,
|
||||
grand_total_in_company_currency = flt(self.grand_total * self.conversion_rate,
|
||||
self.precision("grand_total"))
|
||||
|
||||
|
||||
gl_entries.append(
|
||||
self.get_gl_dict({
|
||||
"account": self.credit_to,
|
||||
@@ -454,6 +454,9 @@ class PurchaseInvoice(BuyingController):
|
||||
for pr in set(updated_pr):
|
||||
frappe.get_doc("Purchase Receipt", pr).update_billing_percentage(update_modified=update_modified)
|
||||
|
||||
def on_recurring(self, reference_doc):
|
||||
self.due_date = None
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_expense_account(doctype, txt, searchfield, start, page_len, filters):
|
||||
from erpnext.controllers.queries import get_match_cond
|
||||
|
||||
@@ -70,7 +70,8 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
||||
});
|
||||
|
||||
if(!from_delivery_note && !is_delivered_by_supplier) {
|
||||
cur_frm.add_custom_button(__('Delivery'), cur_frm.cscript['Delivery Note'], __("Make"));
|
||||
cur_frm.add_custom_button(__('Delivery'), cur_frm.cscript['Make Delivery Note'],
|
||||
__("Make"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3233,7 +3233,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2015-12-17 16:19:15.963267",
|
||||
"modified": "2016-02-08 16:23:46.560153",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Sales Invoice",
|
||||
@@ -3281,7 +3281,7 @@
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"apply_user_permissions": 1,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"delete": 0,
|
||||
@@ -3297,6 +3297,7 @@
|
||||
"set_user_permissions": 0,
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"user_permission_doctypes": "[\"Company\"]",
|
||||
"write": 0
|
||||
},
|
||||
{
|
||||
@@ -3318,6 +3319,26 @@
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"delete": 0,
|
||||
"email": 0,
|
||||
"export": 0,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 1,
|
||||
"print": 0,
|
||||
"read": 1,
|
||||
"report": 0,
|
||||
"role": "All",
|
||||
"set_user_permissions": 0,
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"write": 0
|
||||
}
|
||||
],
|
||||
"read_only": 0,
|
||||
@@ -3325,6 +3346,6 @@
|
||||
"search_fields": "posting_date, due_date, customer, fiscal_year, base_grand_total, outstanding_amount",
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"title_field": "title",
|
||||
"version": 0
|
||||
"timeline_field": "customer",
|
||||
"title_field": "title"
|
||||
}
|
||||
@@ -532,9 +532,9 @@ class SalesInvoice(SellingController):
|
||||
def make_customer_gl_entry(self, gl_entries):
|
||||
if self.grand_total:
|
||||
# Didnot use base_grand_total to book rounding loss gle
|
||||
grand_total_in_company_currency = flt(self.grand_total * self.conversion_rate,
|
||||
grand_total_in_company_currency = flt(self.grand_total * self.conversion_rate,
|
||||
self.precision("grand_total"))
|
||||
|
||||
|
||||
gl_entries.append(
|
||||
self.get_gl_dict({
|
||||
"account": self.debit_to,
|
||||
@@ -656,6 +656,12 @@ class SalesInvoice(SellingController):
|
||||
for dn in set(updated_delivery_notes):
|
||||
frappe.get_doc("Delivery Note", dn).update_billing_percentage(update_modified=update_modified)
|
||||
|
||||
def on_recurring(self, reference_doc):
|
||||
for fieldname in ("c_form_applicable", "c_form_no", "write_off_amount"):
|
||||
self.set(fieldname, reference_doc.get(fieldname))
|
||||
|
||||
self.due_date = None
|
||||
|
||||
def get_list_context(context=None):
|
||||
from erpnext.controllers.website_list_for_contact import get_list_context
|
||||
list_context = get_list_context(context)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Document",
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -972,13 +973,13 @@
|
||||
"collapsible": 0,
|
||||
"fieldname": "target_warehouse",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 1,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Target Warehouse",
|
||||
"label": "Customer Warehouse (Optional)",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"no_copy": 1,
|
||||
"options": "Warehouse",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
@@ -1444,7 +1445,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-01-06 02:23:06.432442",
|
||||
"modified": "2016-02-01 11:16:58.288462",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Sales Invoice Item",
|
||||
|
||||
@@ -10,7 +10,7 @@ from frappe.defaults import get_user_permissions
|
||||
from frappe.utils import add_days, getdate, formatdate, get_first_day, date_diff
|
||||
from erpnext.utilities.doctype.address.address import get_address_display
|
||||
from erpnext.utilities.doctype.contact.contact import get_contact_details
|
||||
from erpnext.exceptions import InvalidAccountCurrency
|
||||
from erpnext.exceptions import PartyFrozen, InvalidCurrency, PartyDisabled, InvalidAccountCurrency
|
||||
|
||||
class DuplicatePartyAccountError(frappe.ValidationError): pass
|
||||
|
||||
@@ -237,16 +237,11 @@ def get_due_date(posting_date, party_type, party, company):
|
||||
due_date = None
|
||||
if posting_date and party:
|
||||
due_date = posting_date
|
||||
if party_type=="Customer":
|
||||
credit_days_based_on, credit_days = get_credit_days(party_type, party, company)
|
||||
if credit_days_based_on == "Fixed Days" and credit_days:
|
||||
due_date = add_days(posting_date, credit_days)
|
||||
elif credit_days_based_on == "Last Day of the Next Month":
|
||||
due_date = (get_first_day(posting_date, 0, 2) + datetime.timedelta(-1)).strftime("%Y-%m-%d")
|
||||
else:
|
||||
credit_days = get_credit_days(party_type, party, company)
|
||||
if credit_days:
|
||||
due_date = add_days(posting_date, credit_days)
|
||||
credit_days_based_on, credit_days = get_credit_days(party_type, party, company)
|
||||
if credit_days_based_on == "Fixed Days" and credit_days:
|
||||
due_date = add_days(posting_date, credit_days)
|
||||
elif credit_days_based_on == "Last Day of the Next Month":
|
||||
due_date = (get_first_day(posting_date, 0, 2) + datetime.timedelta(-1)).strftime("%Y-%m-%d")
|
||||
|
||||
return due_date
|
||||
|
||||
@@ -255,20 +250,21 @@ def get_credit_days(party_type, party, company):
|
||||
if party_type == "Customer":
|
||||
credit_days_based_on, credit_days, customer_group = \
|
||||
frappe.db.get_value(party_type, party, ["credit_days_based_on", "credit_days", "customer_group"])
|
||||
|
||||
if not credit_days_based_on:
|
||||
credit_days_based_on, credit_days = \
|
||||
frappe.db.get_value("Customer Group", customer_group, ["credit_days_based_on", "credit_days"]) \
|
||||
or frappe.db.get_value("Company", company, ["credit_days_based_on", "credit_days"])
|
||||
|
||||
return credit_days_based_on, credit_days
|
||||
else:
|
||||
credit_days, supplier_type = frappe.db.get_value(party_type, party, ["credit_days", "supplier_type"])
|
||||
if not credit_days:
|
||||
credit_days = frappe.db.get_value("Supplier Type", supplier_type, "credit_days") \
|
||||
or frappe.db.get_value("Company", company, "credit_days")
|
||||
credit_days_based_on, credit_days, supplier_type = \
|
||||
frappe.db.get_value(party_type, party, ["credit_days_based_on", "credit_days", "supplier_type"])
|
||||
|
||||
return credit_days
|
||||
if not credit_days_based_on:
|
||||
if party_type == "Customer":
|
||||
credit_days_based_on, credit_days = \
|
||||
frappe.db.get_value("Customer Group", customer_group, ["credit_days_based_on", "credit_days"]) \
|
||||
or frappe.db.get_value("Company", company, ["credit_days_based_on", "credit_days"])
|
||||
else:
|
||||
credit_days_based_on, credit_days = \
|
||||
frappe.db.get_value("Supplier Type", supplier_type, ["credit_days_based_on", "credit_days"])\
|
||||
or frappe.db.get_value("Company", company, ["credit_days_based_on", "credit_days"] )
|
||||
|
||||
return credit_days_based_on, credit_days
|
||||
|
||||
def validate_due_date(posting_date, due_date, party_type, party, company):
|
||||
if getdate(due_date) < getdate(posting_date):
|
||||
@@ -312,3 +308,13 @@ def set_taxes(party, party_type, posting_date, company, customer_group=None, sup
|
||||
args.update({"use_for_shopping_cart": use_for_shopping_cart})
|
||||
|
||||
return get_tax_template(posting_date, args)
|
||||
|
||||
def validate_party_frozen_disabled(party_type, party_name):
|
||||
if party_type and party_name:
|
||||
party = frappe.db.get_value(party_type, party_name, ["is_frozen", "disabled"], as_dict=True)
|
||||
if party.disabled:
|
||||
frappe.throw("{0} {1} is disabled".format(party_type, party_name), PartyDisabled)
|
||||
elif party.is_frozen:
|
||||
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
|
||||
if not frozen_accounts_modifier in frappe.get_roles():
|
||||
frappe.throw("{0} {1} is frozen".format(party_type, party_name), PartyFrozen)
|
||||
|
||||
@@ -8,11 +8,12 @@ from frappe.utils import flt
|
||||
from erpnext.accounts.report.financial_statements import (get_period_list, get_columns, get_data)
|
||||
|
||||
def execute(filters=None):
|
||||
period_list = get_period_list(filters.fiscal_year, filters.periodicity, from_beginning=True)
|
||||
|
||||
asset = get_data(filters.company, "Asset", "Debit", period_list)
|
||||
liability = get_data(filters.company, "Liability", "Credit", period_list)
|
||||
equity = get_data(filters.company, "Equity", "Credit", period_list)
|
||||
period_list = get_period_list(filters.fiscal_year, filters.periodicity)
|
||||
|
||||
asset = get_data(filters.company, "Asset", "Debit", period_list, only_current_fiscal_year=False)
|
||||
liability = get_data(filters.company, "Liability", "Credit", period_list, only_current_fiscal_year=False)
|
||||
equity = get_data(filters.company, "Equity", "Credit", period_list, only_current_fiscal_year=False)
|
||||
|
||||
provisional_profit_loss = get_provisional_profit_loss(asset, liability, equity,
|
||||
period_list, filters.company)
|
||||
|
||||
@@ -23,12 +24,13 @@ def execute(filters=None):
|
||||
if provisional_profit_loss:
|
||||
data.append(provisional_profit_loss)
|
||||
|
||||
columns = get_columns(period_list)
|
||||
columns = get_columns(filters.periodicity, period_list, company=filters.company)
|
||||
|
||||
return columns, data
|
||||
|
||||
def get_provisional_profit_loss(asset, liability, equity, period_list, company):
|
||||
if asset and (liability or equity):
|
||||
total=0
|
||||
provisional_profit_loss = {
|
||||
"account_name": "'" + _("Provisional Profit / Loss (Credit)") + "'",
|
||||
"account": None,
|
||||
@@ -49,6 +51,9 @@ def get_provisional_profit_loss(asset, liability, equity, period_list, company):
|
||||
|
||||
if provisional_profit_loss[period.key]:
|
||||
has_value = True
|
||||
|
||||
total += flt(provisional_profit_loss[period.key])
|
||||
provisional_profit_loss["total"] = total
|
||||
|
||||
if has_value:
|
||||
return provisional_profit_loss
|
||||
|
||||
@@ -4,3 +4,9 @@
|
||||
frappe.require("assets/erpnext/js/financial_statements.js");
|
||||
|
||||
frappe.query_reports["Cash Flow"] = erpnext.financial_statements;
|
||||
|
||||
frappe.query_reports["Cash Flow"]["filters"].push({
|
||||
"fieldname": "accumulated_values",
|
||||
"label": __("Accumulated Values"),
|
||||
"fieldtype": "Check"
|
||||
})
|
||||
@@ -48,12 +48,14 @@ def execute(filters=None):
|
||||
cash_flow_accounts.append(financing_accounts)
|
||||
|
||||
# compute net profit / loss
|
||||
income = get_data(filters.company, "Income", "Credit", period_list, ignore_closing_entries=True)
|
||||
expense = get_data(filters.company, "Expense", "Debit", period_list, ignore_closing_entries=True)
|
||||
income = get_data(filters.company, "Income", "Credit", period_list,
|
||||
accumulated_values=filters.accumulated_values, ignore_closing_entries=True)
|
||||
expense = get_data(filters.company, "Expense", "Debit", period_list,
|
||||
accumulated_values=filters.accumulated_values, ignore_closing_entries=True)
|
||||
|
||||
net_profit_loss = get_net_profit_loss(income, expense, period_list, filters.company)
|
||||
|
||||
data = []
|
||||
|
||||
company_currency = frappe.db.get_value("Company", filters.company, "default_currency")
|
||||
|
||||
for cash_flow_account in cash_flow_accounts:
|
||||
@@ -77,7 +79,8 @@ def execute(filters=None):
|
||||
section_data.append(net_profit_loss)
|
||||
|
||||
for account in cash_flow_account['account_types']:
|
||||
account_data = get_account_type_based_data(filters.company, account['account_type'], period_list)
|
||||
account_data = get_account_type_based_data(filters.company,
|
||||
account['account_type'], period_list, filters.accumulated_values)
|
||||
account_data.update({
|
||||
"account_name": account['label'],
|
||||
"indent": 1,
|
||||
@@ -91,13 +94,14 @@ def execute(filters=None):
|
||||
period_list, company_currency)
|
||||
|
||||
add_total_row_account(data, data, _("Net Change in Cash"), period_list, company_currency)
|
||||
columns = get_columns(period_list)
|
||||
columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company)
|
||||
|
||||
return columns, data
|
||||
|
||||
|
||||
def get_account_type_based_data(company, account_type, period_list):
|
||||
def get_account_type_based_data(company, account_type, period_list, accumulated_values):
|
||||
data = {}
|
||||
total = 0
|
||||
for period in period_list:
|
||||
gl_sum = frappe.db.sql_list("""
|
||||
select sum(credit) - sum(debit)
|
||||
@@ -105,7 +109,8 @@ def get_account_type_based_data(company, account_type, period_list):
|
||||
where company=%s and posting_date >= %s and posting_date <= %s
|
||||
and voucher_type != 'Period Closing Voucher'
|
||||
and account in ( SELECT name FROM tabAccount WHERE account_type = %s)
|
||||
""", (company, period['from_date'], period['to_date'], account_type))
|
||||
""", (company, period["year_start_date"] if accumulated_values else period['from_date'],
|
||||
period['to_date'], account_type))
|
||||
|
||||
if gl_sum and gl_sum[0]:
|
||||
amount = gl_sum[0]
|
||||
@@ -113,12 +118,11 @@ def get_account_type_based_data(company, account_type, period_list):
|
||||
amount *= -1
|
||||
else:
|
||||
amount = 0
|
||||
|
||||
total += amount
|
||||
data.setdefault(period["key"], amount)
|
||||
|
||||
data.update({
|
||||
"from_date": period['from_date'],
|
||||
"to_date": period['to_date'],
|
||||
period["key"]: amount
|
||||
})
|
||||
data["total"] = total
|
||||
return data
|
||||
|
||||
|
||||
@@ -128,12 +132,14 @@ def add_total_row_account(out, data, label, period_list, currency):
|
||||
"account": None,
|
||||
"currency": currency
|
||||
}
|
||||
|
||||
for row in data:
|
||||
if row.get("parent_account"):
|
||||
for period in period_list:
|
||||
total_row.setdefault(period.key, 0.0)
|
||||
total_row[period.key] += row.get(period.key, 0.0)
|
||||
|
||||
total_row.setdefault("total", 0.0)
|
||||
total_row["total"] += row["total"]
|
||||
|
||||
out.append(total_row)
|
||||
out.append({})
|
||||
@@ -3,38 +3,42 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _, _dict
|
||||
from frappe import _
|
||||
from frappe.utils import (flt, getdate, get_first_day, get_last_day,
|
||||
add_months, add_days, formatdate)
|
||||
|
||||
def get_period_list(fiscal_year, periodicity, from_beginning=False):
|
||||
"""Get a list of dict {"to_date": to_date, "key": key, "label": label}
|
||||
def get_period_list(fiscal_year, periodicity):
|
||||
"""Get a list of dict {"from_date": from_date, "to_date": to_date, "key": key, "label": label}
|
||||
Periodicity can be (Yearly, Quarterly, Monthly)"""
|
||||
|
||||
fy_start_end_date = frappe.db.get_value("Fiscal Year", fiscal_year, ["year_start_date", "year_end_date"])
|
||||
if not fy_start_end_date:
|
||||
frappe.throw(_("Fiscal Year {0} not found.").format(fiscal_year))
|
||||
|
||||
start_date = getdate(fy_start_end_date[0])
|
||||
end_date = getdate(fy_start_end_date[1])
|
||||
|
||||
# start with first day, so as to avoid year to_dates like 2-April if ever they occur]
|
||||
year_start_date = get_first_day(getdate(fy_start_end_date[0]))
|
||||
year_end_date = getdate(fy_start_end_date[1])
|
||||
|
||||
if periodicity == "Yearly":
|
||||
period_list = [_dict({"to_date": end_date, "key": fiscal_year, "label": fiscal_year})]
|
||||
period_list = [frappe._dict({"from_date": year_start_date, "to_date": year_end_date,
|
||||
"key": fiscal_year, "label": fiscal_year})]
|
||||
else:
|
||||
months_to_add = {
|
||||
"Half-yearly": 6,
|
||||
"Half-Yearly": 6,
|
||||
"Quarterly": 3,
|
||||
"Monthly": 1
|
||||
}[periodicity]
|
||||
|
||||
period_list = []
|
||||
|
||||
# start with first day, so as to avoid year to_dates like 2-April if ever they occur
|
||||
to_date = get_first_day(start_date)
|
||||
|
||||
start_date = year_start_date
|
||||
for i in xrange(12 / months_to_add):
|
||||
to_date = add_months(to_date, months_to_add)
|
||||
|
||||
period = frappe._dict({
|
||||
"from_date": start_date
|
||||
})
|
||||
to_date = add_months(start_date, months_to_add)
|
||||
start_date = to_date
|
||||
|
||||
if to_date == get_first_day(to_date):
|
||||
# if to_date is the first day, get the last day of previous month
|
||||
to_date = add_days(to_date, -1)
|
||||
@@ -42,39 +46,48 @@ def get_period_list(fiscal_year, periodicity, from_beginning=False):
|
||||
# to_date should be the last day of the new to_date's month
|
||||
to_date = get_last_day(to_date)
|
||||
|
||||
if to_date <= end_date:
|
||||
if to_date <= year_end_date:
|
||||
# the normal case
|
||||
period_list.append(_dict({ "to_date": to_date }))
|
||||
|
||||
# if it ends before a full year
|
||||
if to_date == end_date:
|
||||
break
|
||||
|
||||
period.to_date = to_date
|
||||
else:
|
||||
# if a fiscal year ends before a 12 month period
|
||||
period_list.append(_dict({ "to_date": end_date }))
|
||||
period.to_date = year_end_date
|
||||
|
||||
period_list.append(period)
|
||||
|
||||
if period.to_date == year_end_date:
|
||||
break
|
||||
|
||||
|
||||
# common processing
|
||||
for opts in period_list:
|
||||
key = opts["to_date"].strftime("%b_%Y").lower()
|
||||
label = formatdate(opts["to_date"], "MMM YYYY")
|
||||
if periodicity == "Monthly":
|
||||
label = formatdate(opts["to_date"], "MMM YYYY")
|
||||
else:
|
||||
label = get_label(periodicity, opts["from_date"], opts["to_date"])
|
||||
|
||||
opts.update({
|
||||
"key": key.replace(" ", "_").replace("-", "_"),
|
||||
"label": label,
|
||||
"year_start_date": start_date,
|
||||
"year_end_date": end_date
|
||||
"year_start_date": year_start_date,
|
||||
"year_end_date": year_end_date
|
||||
})
|
||||
|
||||
if from_beginning:
|
||||
# set start date as None for all fiscal periods, used in case of Balance Sheet
|
||||
opts["from_date"] = None
|
||||
else:
|
||||
opts["from_date"] = start_date
|
||||
|
||||
return period_list
|
||||
|
||||
def get_data(company, root_type, balance_must_be, period_list, ignore_closing_entries=False):
|
||||
def get_label(periodicity, from_date, to_date):
|
||||
if periodicity=="Yearly":
|
||||
if formatdate(from_date, "YYYY") == formatdate(to_date, "YYYY"):
|
||||
label = formatdate(from_date, "YYYY")
|
||||
else:
|
||||
label = formatdate(from_date, "YYYY") + "-" + formatdate(to_date, "YYYY")
|
||||
else:
|
||||
label = formatdate(from_date, "MMM YY") + "-" + formatdate(to_date, "MMM YY")
|
||||
|
||||
return label
|
||||
|
||||
def get_data(company, root_type, balance_must_be, period_list,
|
||||
accumulated_values=1, only_current_fiscal_year=True, ignore_closing_entries=False):
|
||||
accounts = get_accounts(company, root_type)
|
||||
if not accounts:
|
||||
return None
|
||||
@@ -86,29 +99,33 @@ def get_data(company, root_type, balance_must_be, period_list, ignore_closing_en
|
||||
gl_entries_by_account = {}
|
||||
for root in frappe.db.sql("""select lft, rgt from tabAccount
|
||||
where root_type=%s and ifnull(parent_account, '') = ''""", root_type, as_dict=1):
|
||||
set_gl_entries_by_account(company, period_list[0]["from_date"],
|
||||
period_list[-1]["to_date"],root.lft, root.rgt, gl_entries_by_account,
|
||||
ignore_closing_entries=ignore_closing_entries)
|
||||
|
||||
set_gl_entries_by_account(company,
|
||||
period_list[0]["year_start_date"] if only_current_fiscal_year else None,
|
||||
period_list[-1]["to_date"],
|
||||
root.lft, root.rgt,
|
||||
gl_entries_by_account, ignore_closing_entries=ignore_closing_entries)
|
||||
|
||||
calculate_values(accounts_by_name, gl_entries_by_account, period_list)
|
||||
accumulate_values_into_parents(accounts, accounts_by_name, period_list)
|
||||
calculate_values(accounts_by_name, gl_entries_by_account, period_list, accumulated_values)
|
||||
accumulate_values_into_parents(accounts, accounts_by_name, period_list, accumulated_values)
|
||||
out = prepare_data(accounts, balance_must_be, period_list, company_currency)
|
||||
|
||||
|
||||
if out:
|
||||
add_total_row(out, balance_must_be, period_list, company_currency)
|
||||
|
||||
return out
|
||||
|
||||
def calculate_values(accounts_by_name, gl_entries_by_account, period_list):
|
||||
def calculate_values(accounts_by_name, gl_entries_by_account, period_list, accumulated_values):
|
||||
for entries in gl_entries_by_account.values():
|
||||
for entry in entries:
|
||||
d = accounts_by_name.get(entry.account)
|
||||
for period in period_list:
|
||||
# check if posting date is within the period
|
||||
if entry.posting_date <= period.to_date:
|
||||
d[period.key] = d.get(period.key, 0.0) + flt(entry.debit) - flt(entry.credit)
|
||||
if accumulated_values or entry.posting_date >= period.from_date:
|
||||
d[period.key] = d.get(period.key, 0.0) + flt(entry.debit) - flt(entry.credit)
|
||||
|
||||
def accumulate_values_into_parents(accounts, accounts_by_name, period_list):
|
||||
def accumulate_values_into_parents(accounts, accounts_by_name, period_list, accumulated_values):
|
||||
"""accumulate children's values in parent accounts"""
|
||||
for d in reversed(accounts):
|
||||
if d.parent_account:
|
||||
@@ -124,13 +141,14 @@ def prepare_data(accounts, balance_must_be, period_list, company_currency):
|
||||
for d in accounts:
|
||||
# add to output
|
||||
has_value = False
|
||||
total = 0
|
||||
row = {
|
||||
"account_name": d.account_name,
|
||||
"account": d.name,
|
||||
"parent_account": d.parent_account,
|
||||
"indent": flt(d.indent),
|
||||
"from_date": year_start_date,
|
||||
"to_date": year_end_date,
|
||||
"year_start_date": year_start_date,
|
||||
"year_end_date": year_end_date,
|
||||
"currency": company_currency
|
||||
}
|
||||
for period in period_list:
|
||||
@@ -143,8 +161,10 @@ def prepare_data(accounts, balance_must_be, period_list, company_currency):
|
||||
if abs(row[period.key]) >= 0.005:
|
||||
# ignore zero values
|
||||
has_value = True
|
||||
total += flt(row[period.key])
|
||||
|
||||
if has_value:
|
||||
row["total"] = total
|
||||
out.append(row)
|
||||
|
||||
return out
|
||||
@@ -161,9 +181,12 @@ def add_total_row(out, balance_must_be, period_list, company_currency):
|
||||
for period in period_list:
|
||||
total_row.setdefault(period.key, 0.0)
|
||||
total_row[period.key] += row.get(period.key, 0.0)
|
||||
|
||||
row[period.key] = ""
|
||||
|
||||
row[period.key] = ""
|
||||
|
||||
total_row.setdefault("total", 0.0)
|
||||
total_row["total"] += flt(row["total"])
|
||||
row["total"] = ""
|
||||
|
||||
out.append(total_row)
|
||||
|
||||
# blank row after Total
|
||||
@@ -245,7 +268,7 @@ def set_gl_entries_by_account(company, from_date, to_date, root_lft, root_rgt, g
|
||||
|
||||
return gl_entries_by_account
|
||||
|
||||
def get_columns(period_list, company=None):
|
||||
def get_columns(periodicity, period_list, accumulated_values=1, company=None):
|
||||
columns = [{
|
||||
"fieldname": "account",
|
||||
"label": _("Account"),
|
||||
@@ -261,7 +284,6 @@ def get_columns(period_list, company=None):
|
||||
"options": "Currency",
|
||||
"hidden": 1
|
||||
})
|
||||
|
||||
for period in period_list:
|
||||
columns.append({
|
||||
"fieldname": period.key,
|
||||
@@ -270,5 +292,13 @@ def get_columns(period_list, company=None):
|
||||
"options": "currency",
|
||||
"width": 150
|
||||
})
|
||||
if periodicity!="Yearly":
|
||||
if not accumulated_values:
|
||||
columns.append({
|
||||
"fieldname": "total",
|
||||
"label": _("Total"),
|
||||
"fieldtype": "Currency",
|
||||
"width": 150
|
||||
})
|
||||
|
||||
return columns
|
||||
return columns
|
||||
|
||||
@@ -16,9 +16,9 @@ def execute(filters=None):
|
||||
source = gross_profit_data.grouped_data if filters.get("group_by") != "Invoice" else gross_profit_data.data
|
||||
|
||||
group_wise_columns = frappe._dict({
|
||||
"invoice": ["parent", "customer", "posting_date", "posting_time", "item_code", "item_name", "brand", "description", \
|
||||
"invoice": ["parent", "customer", "posting_date","item_code", "item_name","item_group", "brand", "description", \
|
||||
"warehouse", "qty", "base_rate", "buying_rate", "base_amount",
|
||||
"buying_amount", "gross_profit", "gross_profit_percent", "project"],
|
||||
"buying_amount", "gross_profit", "gross_profit_percent", "project_name"],
|
||||
"item_code": ["item_code", "item_name", "brand", "description", "warehouse", "qty", "base_rate",
|
||||
"buying_rate", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
|
||||
"warehouse": ["warehouse", "qty", "base_rate", "buying_rate", "base_amount", "buying_amount",
|
||||
@@ -35,7 +35,7 @@ def execute(filters=None):
|
||||
"gross_profit", "gross_profit_percent"],
|
||||
"sales_person": ["sales_person", "allocated_amount", "qty", "base_rate", "buying_rate", "base_amount", "buying_amount",
|
||||
"gross_profit", "gross_profit_percent"],
|
||||
"project": ["project", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
|
||||
"project": ["project_name", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"],
|
||||
"territory": ["territory", "base_amount", "buying_amount", "gross_profit", "gross_profit_percent"]
|
||||
})
|
||||
|
||||
@@ -59,7 +59,7 @@ def get_columns(group_wise_columns, filters):
|
||||
"posting_time": _("Posting Time"),
|
||||
"item_code": _("Item Code") + ":Link/Item",
|
||||
"item_name": _("Item Name"),
|
||||
"item_group": _("Item Group") + ":Link/Item",
|
||||
"item_group": _("Item Group") + ":Link/Item Group",
|
||||
"brand": _("Brand"),
|
||||
"description": _("Description"),
|
||||
"warehouse": _("Warehouse") + ":Link/Warehouse",
|
||||
@@ -70,7 +70,7 @@ def get_columns(group_wise_columns, filters):
|
||||
"buying_amount": _("Buying Amount") + ":Currency/currency",
|
||||
"gross_profit": _("Gross Profit") + ":Currency/currency",
|
||||
"gross_profit_percent": _("Gross Profit %") + ":Percent",
|
||||
"project": _("Project") + ":Link/Project",
|
||||
"project_name": _("Project") + ":Link/Project",
|
||||
"sales_person": _("Sales person"),
|
||||
"allocated_amount": _("Allocated Amount") + ":Currency/currency",
|
||||
"customer": _("Customer") + ":Link/Customer",
|
||||
|
||||
@@ -4,3 +4,9 @@
|
||||
frappe.require("assets/erpnext/js/financial_statements.js");
|
||||
|
||||
frappe.query_reports["Profit and Loss Statement"] = erpnext.financial_statements;
|
||||
|
||||
frappe.query_reports["Profit and Loss Statement"]["filters"].push({
|
||||
"fieldname": "accumulated_values",
|
||||
"label": __("Accumulated Values"),
|
||||
"fieldtype": "Check"
|
||||
})
|
||||
@@ -10,8 +10,11 @@ from erpnext.accounts.report.financial_statements import (get_period_list, get_c
|
||||
def execute(filters=None):
|
||||
period_list = get_period_list(filters.fiscal_year, filters.periodicity)
|
||||
|
||||
income = get_data(filters.company, "Income", "Credit", period_list, ignore_closing_entries=True)
|
||||
expense = get_data(filters.company, "Expense", "Debit", period_list, ignore_closing_entries=True)
|
||||
income = get_data(filters.company, "Income", "Credit", period_list,
|
||||
accumulated_values=filters.accumulated_values, ignore_closing_entries=True)
|
||||
expense = get_data(filters.company, "Expense", "Debit", period_list,
|
||||
accumulated_values=filters.accumulated_values, ignore_closing_entries=True)
|
||||
|
||||
net_profit_loss = get_net_profit_loss(income, expense, period_list, filters.company)
|
||||
|
||||
data = []
|
||||
@@ -20,12 +23,13 @@ def execute(filters=None):
|
||||
if net_profit_loss:
|
||||
data.append(net_profit_loss)
|
||||
|
||||
columns = get_columns(period_list, filters.company)
|
||||
columns = get_columns(filters.periodicity, period_list, filters.accumulated_values, filters.company)
|
||||
|
||||
return columns, data
|
||||
|
||||
def get_net_profit_loss(income, expense, period_list, company):
|
||||
if income and expense:
|
||||
total = 0
|
||||
net_profit_loss = {
|
||||
"account_name": "'" + _("Net Profit / Loss") + "'",
|
||||
"account": None,
|
||||
@@ -33,7 +37,16 @@ def get_net_profit_loss(income, expense, period_list, company):
|
||||
"currency": frappe.db.get_value("Company", company, "default_currency")
|
||||
}
|
||||
|
||||
has_value = False
|
||||
|
||||
for period in period_list:
|
||||
net_profit_loss[period.key] = flt(income[-2][period.key] - expense[-2][period.key], 3)
|
||||
|
||||
return net_profit_loss
|
||||
|
||||
if net_profit_loss[period.key]:
|
||||
has_value=True
|
||||
|
||||
total += flt(net_profit_loss[period.key])
|
||||
net_profit_loss["total"] = total
|
||||
|
||||
if has_value:
|
||||
return net_profit_loss
|
||||
|
||||
@@ -1597,29 +1597,6 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "advance_paid",
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Advance Paid",
|
||||
"length": 0,
|
||||
"no_copy": 1,
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@@ -1694,6 +1671,30 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "advance_paid",
|
||||
"fieldtype": "Currency",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Advance Paid",
|
||||
"length": 0,
|
||||
"no_copy": 1,
|
||||
"options": "party_account_currency",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@@ -1968,6 +1969,31 @@
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"fieldname": "party_account_currency",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Party Account Currency",
|
||||
"length": 0,
|
||||
"no_copy": 1,
|
||||
"options": "Currency",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"set_only_once": 0,
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
@@ -2508,7 +2534,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-01-15 04:13:35.179163",
|
||||
"modified": "2016-02-08 16:26:19.210634",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Purchase Order",
|
||||
@@ -2613,6 +2639,26 @@
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"delete": 0,
|
||||
"email": 0,
|
||||
"export": 0,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 1,
|
||||
"print": 0,
|
||||
"read": 1,
|
||||
"report": 0,
|
||||
"role": "All",
|
||||
"set_user_permissions": 0,
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"write": 0
|
||||
}
|
||||
],
|
||||
"read_only": 0,
|
||||
@@ -2620,5 +2666,6 @@
|
||||
"search_fields": "status, transaction_date, supplier,grand_total",
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"timeline_field": "supplier",
|
||||
"title_field": "title"
|
||||
}
|
||||
@@ -84,11 +84,11 @@ class PurchaseOrder(BuyingController):
|
||||
if d.prevdoc_detail_docname and not d.schedule_date:
|
||||
d.schedule_date = frappe.db.get_value("Material Request Item",
|
||||
d.prevdoc_detail_docname, "schedule_date")
|
||||
|
||||
|
||||
|
||||
def get_last_purchase_rate(self):
|
||||
"""get last purchase rates for all items"""
|
||||
|
||||
|
||||
conversion_rate = flt(self.get('conversion_rate')) or 1.0
|
||||
|
||||
for d in self.get("items"):
|
||||
@@ -96,7 +96,7 @@ class PurchaseOrder(BuyingController):
|
||||
last_purchase_details = get_last_purchase_details(d.item_code, self.name)
|
||||
|
||||
if last_purchase_details:
|
||||
d.base_price_list_rate = (last_purchase_details['base_price_list_rate'] *
|
||||
d.base_price_list_rate = (last_purchase_details['base_price_list_rate'] *
|
||||
(flt(d.conversion_factor) or 1.0))
|
||||
d.discount_percentage = last_purchase_details['discount_percentage']
|
||||
d.base_rate = last_purchase_details['base_rate'] * (flt(d.conversion_factor) or 1.0)
|
||||
@@ -104,7 +104,7 @@ class PurchaseOrder(BuyingController):
|
||||
d.rate = d.base_rate / conversion_rate
|
||||
else:
|
||||
# if no last purchase found, reset all values to 0
|
||||
for field in ("base_price_list_rate", "base_rate",
|
||||
for field in ("base_price_list_rate", "base_rate",
|
||||
"price_list_rate", "rate", "discount_percentage"):
|
||||
d.set(field, 0)
|
||||
|
||||
@@ -188,7 +188,7 @@ class PurchaseOrder(BuyingController):
|
||||
def on_cancel(self):
|
||||
if self.is_against_so():
|
||||
self.update_status_updater()
|
||||
|
||||
|
||||
if self.has_drop_ship_item():
|
||||
self.update_delivered_qty_in_sales_order()
|
||||
|
||||
@@ -219,17 +219,6 @@ class PurchaseOrder(BuyingController):
|
||||
def on_update(self):
|
||||
pass
|
||||
|
||||
def before_recurring(self):
|
||||
super(PurchaseOrder, self).before_recurring()
|
||||
|
||||
for field in ("per_received", "per_billed"):
|
||||
self.set(field, None)
|
||||
|
||||
for d in self.get("items"):
|
||||
for field in ("received_qty", "billed_amt", "prevdoc_doctype", "prevdoc_docname",
|
||||
"prevdoc_detail_docname", "supplier_quotation", "supplier_quotation_item"):
|
||||
d.set(field, None)
|
||||
|
||||
def update_status_updater(self):
|
||||
self.status_updater[0].update({
|
||||
"target_parent_dt": "Sales Order",
|
||||
@@ -254,7 +243,7 @@ class PurchaseOrder(BuyingController):
|
||||
|
||||
def has_drop_ship_item(self):
|
||||
return any([d.delivered_by_supplier for d in self.items])
|
||||
|
||||
|
||||
def is_against_so(self):
|
||||
return any([d.prevdoc_doctype for d in self.items if d.prevdoc_doctype=="Sales Order"])
|
||||
|
||||
|
||||
@@ -19,16 +19,16 @@ class TestPurchaseOrder(unittest.TestCase):
|
||||
|
||||
def test_ordered_qty(self):
|
||||
existing_ordered_qty = get_ordered_qty()
|
||||
|
||||
|
||||
po = create_purchase_order(do_not_submit=True)
|
||||
self.assertRaises(frappe.ValidationError, make_purchase_receipt, po.name)
|
||||
|
||||
|
||||
po.submit()
|
||||
self.assertEqual(get_ordered_qty(), existing_ordered_qty + 10)
|
||||
|
||||
create_pr_against_po(po.name)
|
||||
create_pr_against_po(po.name)
|
||||
self.assertEqual(get_ordered_qty(), existing_ordered_qty + 6)
|
||||
|
||||
|
||||
po.load_from_db()
|
||||
self.assertEquals(po.get("items")[0].received_qty, 4)
|
||||
|
||||
@@ -36,13 +36,13 @@ class TestPurchaseOrder(unittest.TestCase):
|
||||
|
||||
pr = create_pr_against_po(po.name, received_qty=8)
|
||||
self.assertEqual(get_ordered_qty(), existing_ordered_qty)
|
||||
|
||||
|
||||
po.load_from_db()
|
||||
self.assertEquals(po.get("items")[0].received_qty, 12)
|
||||
|
||||
pr.cancel()
|
||||
self.assertEqual(get_ordered_qty(), existing_ordered_qty + 6)
|
||||
|
||||
|
||||
po.load_from_db()
|
||||
self.assertEquals(po.get("items")[0].received_qty, 4)
|
||||
|
||||
@@ -70,19 +70,19 @@ class TestPurchaseOrder(unittest.TestCase):
|
||||
from erpnext.utilities.transaction_base import UOMMustBeIntegerError
|
||||
po = create_purchase_order(qty=3.4, do_not_save=True)
|
||||
self.assertRaises(UOMMustBeIntegerError, po.insert)
|
||||
|
||||
def test_ordered_qty_for_closing_po(self):
|
||||
bin = frappe.get_all("Bin", filters={"item_code": "_Test Item", "warehouse": "_Test Warehouse - _TC"},
|
||||
fields=["ordered_qty"])
|
||||
|
||||
|
||||
def test_ordered_qty_for_closing_po(self):
|
||||
bin = frappe.get_all("Bin", filters={"item_code": "_Test Item", "warehouse": "_Test Warehouse - _TC"},
|
||||
fields=["ordered_qty"])
|
||||
|
||||
existing_ordered_qty = bin[0].ordered_qty if bin else 0.0
|
||||
|
||||
|
||||
po = create_purchase_order(item_code= "_Test Item", qty=1)
|
||||
|
||||
|
||||
self.assertEquals(get_ordered_qty(item_code= "_Test Item", warehouse="_Test Warehouse - _TC"), existing_ordered_qty+1)
|
||||
|
||||
|
||||
po.update_status("Closed")
|
||||
|
||||
|
||||
self.assertEquals(get_ordered_qty(item_code="_Test Item", warehouse="_Test Warehouse - _TC"), existing_ordered_qty)
|
||||
|
||||
def create_purchase_order(**args):
|
||||
@@ -108,9 +108,9 @@ def create_purchase_order(**args):
|
||||
po.insert()
|
||||
if not args.do_not_submit:
|
||||
po.submit()
|
||||
|
||||
|
||||
return po
|
||||
|
||||
|
||||
def create_pr_against_po(po, received_qty=4):
|
||||
pr = make_purchase_receipt(po)
|
||||
pr.get("items")[0].qty = received_qty
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"custom": 0,
|
||||
"docstatus": 0,
|
||||
"doctype": "DocType",
|
||||
"document_type": "Document",
|
||||
"fields": [
|
||||
{
|
||||
"allow_on_submit": 0,
|
||||
@@ -1155,7 +1156,7 @@
|
||||
"in_list_view": 0,
|
||||
"label": "BOM",
|
||||
"length": 0,
|
||||
"no_copy": 1,
|
||||
"no_copy": 0,
|
||||
"options": "BOM",
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
@@ -1330,7 +1331,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2016-01-06 02:21:10.407871",
|
||||
"modified": "2016-01-25 05:39:52.405200",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Purchase Order Item",
|
||||
|
||||
@@ -46,18 +46,23 @@ cur_frm.fields_dict['item_code'].get_query = function(doc, cdt, cdn) {
|
||||
|
||||
// Serial No based on item_code
|
||||
cur_frm.fields_dict['item_serial_no'].get_query = function(doc, cdt, cdn) {
|
||||
var filter = {};
|
||||
var filters = {};
|
||||
if (doc.item_code) {
|
||||
filter = {
|
||||
'item_code': doc.item_code,
|
||||
'status': "Available"
|
||||
filters = {
|
||||
'item_code': doc.item_code
|
||||
}
|
||||
} else
|
||||
filter = { 'status': "Available" }
|
||||
|
||||
return { filters: filter }
|
||||
}
|
||||
return { filters: filters }
|
||||
}
|
||||
|
||||
cur_frm.set_query("batch_no", function(doc) {
|
||||
return {
|
||||
filters: {
|
||||
"item": doc.item_code
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
cur_frm.add_fetch('item_code', 'item_name', 'item_name');
|
||||
cur_frm.add_fetch('item_code', 'description', 'description');
|
||||
|
||||
|
||||
@@ -3,5 +3,70 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
|
||||
import frappe
|
||||
test_records = frappe.get_test_records('Supplier')
|
||||
import frappe, unittest
|
||||
from erpnext.accounts.party import get_due_date
|
||||
from erpnext.exceptions import PartyFrozen, PartyDisabled
|
||||
from frappe.test_runner import make_test_records
|
||||
|
||||
test_records = frappe.get_test_records('Supplier')
|
||||
|
||||
class TestSupplier(unittest.TestCase):
|
||||
def test_supplier_due_date_against_supplier_credit_limit(self):
|
||||
# Set Credit Limit based on Fixed days
|
||||
frappe.db.set_value("Supplier", "_Test Supplier", "credit_days_based_on", "Fixed Days")
|
||||
frappe.db.set_value("Supplier", "_Test Supplier", "credit_days", 10)
|
||||
|
||||
due_date = get_due_date("2016-01-22", "Supplier", "_Test Supplier", "_Test Company")
|
||||
self.assertEqual(due_date, "2016-02-01")
|
||||
|
||||
# Set Credit Limit based on Last day next month
|
||||
frappe.db.set_value("Supplier", "_Test Supplier", "credit_days", 0)
|
||||
frappe.db.set_value("Supplier", "_Test Supplier", "credit_days_based_on",
|
||||
"Last Day of the Next Month")
|
||||
|
||||
# Leap year
|
||||
due_date = get_due_date("2016-01-22", "Supplier", "_Test Supplier", "_Test Company")
|
||||
self.assertEqual(due_date, "2016-02-29")
|
||||
# Non Leap year
|
||||
due_date = get_due_date("2017-01-22", "Supplier", "_Test Supplier", "_Test Company")
|
||||
self.assertEqual(due_date, "2017-02-28")
|
||||
|
||||
frappe.db.set_value("Supplier", "_Test Supplier", "credit_days_based_on", "")
|
||||
|
||||
# Set credit limit for the supplier type instead of supplier and evaluate the due date
|
||||
# based on Fixed days
|
||||
frappe.db.set_value("Supplier Type", "_Test Supplier Type", "credit_days_based_on",
|
||||
"Fixed Days")
|
||||
frappe.db.set_value("Supplier Type", "_Test Supplier Type", "credit_days", 10)
|
||||
|
||||
due_date = get_due_date("2016-01-22", "Supplier", "_Test Supplier", "_Test Company")
|
||||
self.assertEqual(due_date, "2016-02-01")
|
||||
|
||||
# Set credit limit for the supplier type instead of supplier and evaluate the due date
|
||||
# based on Last day of next month
|
||||
frappe.db.set_value("Supplier", "_Test Supplier Type", "credit_days", 0)
|
||||
frappe.db.set_value("Supplier Type", "_Test Supplier Type", "credit_days_based_on",
|
||||
"Last Day of the Next Month")
|
||||
|
||||
# Leap year
|
||||
due_date = get_due_date("2016-01-22", "Supplier", "_Test Supplier", "_Test Company")
|
||||
self.assertEqual(due_date, "2016-02-29")
|
||||
# Non Leap year
|
||||
due_date = get_due_date("2017-01-22", "Supplier", "_Test Supplier", "_Test Company")
|
||||
self.assertEqual(due_date, "2017-02-28")
|
||||
|
||||
|
||||
def test_supplier_disabled(self):
|
||||
make_test_records("Item")
|
||||
|
||||
frappe.db.set_value("Supplier", "_Test Supplier", "disabled", 1)
|
||||
|
||||
from erpnext.buying.doctype.purchase_order.test_purchase_order import create_purchase_order
|
||||
|
||||
po = create_purchase_order(do_not_save=True)
|
||||
|
||||
self.assertRaises(PartyDisabled, po.save)
|
||||
|
||||
frappe.db.set_value("Supplier", "_Test Supplier", "disabled", 0)
|
||||
|
||||
po.save()
|
||||
|
||||
@@ -1714,7 +1714,7 @@
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"menu_index": 0,
|
||||
"modified": "2015-12-17 16:18:29.855942",
|
||||
"modified": "2016-02-08 16:30:33.704770",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Supplier Quotation",
|
||||
@@ -1839,6 +1839,26 @@
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"amend": 0,
|
||||
"apply_user_permissions": 0,
|
||||
"cancel": 0,
|
||||
"create": 0,
|
||||
"delete": 0,
|
||||
"email": 0,
|
||||
"export": 0,
|
||||
"if_owner": 0,
|
||||
"import": 0,
|
||||
"permlevel": 1,
|
||||
"print": 0,
|
||||
"read": 1,
|
||||
"report": 0,
|
||||
"role": "All",
|
||||
"set_user_permissions": 0,
|
||||
"share": 0,
|
||||
"submit": 0,
|
||||
"write": 0
|
||||
}
|
||||
],
|
||||
"read_only": 0,
|
||||
@@ -1846,5 +1866,6 @@
|
||||
"search_fields": "status, transaction_date, supplier,grand_total",
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"timeline_field": "supplier",
|
||||
"title_field": "title"
|
||||
}
|
||||
@@ -6,13 +6,13 @@
|
||||
"doctype": "Report",
|
||||
"idx": 1,
|
||||
"is_standard": "Yes",
|
||||
"modified": "2015-03-30 05:39:39.876374",
|
||||
"modified": "2016-01-28 15:36:46.837095",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Item-wise Purchase History",
|
||||
"owner": "Administrator",
|
||||
"query": "select\n po_item.item_code as \"Item Code:Link/Item:120\",\n\tpo_item.item_name as \"Item Name::120\",\n\tpo_item.description as \"Description::150\",\n\tpo_item.qty as \"Qty:Float:100\",\n\tpo_item.stock_uom as \"UOM:Link/UOM:80\",\n\tpo_item.base_rate as \"Rate:Currency:120\",\n\tpo_item.base_amount as \"Amount:Currency:120\",\n\tpo.name as \"Purchase Order:Link/Purchase Order:120\",\n\tpo.transaction_date as \"Transaction Date:Date:140\",\n\tpo.supplier as \"Supplier:Link/Supplier:130\",\n\tpo_item.project_name as \"Project:Link/Project:130\",\n\tifnull(po_item.received_qty, 0) as \"Received Qty:Float:120\",\n\tpo.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order` po, `tabPurchase Order Item` po_item\nwhere\n\tpo.name = po_item.parent and po.docstatus = 1\norder by po.name desc",
|
||||
"query": "select\n po_item.item_code as \"Item Code:Link/Item:120\",\n\tpo_item.item_name as \"Item Name::120\",\n po_item.item_group as \"Item Group:Link/Item Group:120\",\n\tpo_item.description as \"Description::150\",\n\tpo_item.qty as \"Qty:Float:100\",\n\tpo_item.stock_uom as \"UOM:Link/UOM:80\",\n\tpo_item.base_rate as \"Rate:Currency:120\",\n\tpo_item.base_amount as \"Amount:Currency:120\",\n\tpo.name as \"Purchase Order:Link/Purchase Order:120\",\n\tpo.transaction_date as \"Transaction Date:Date:140\",\n\tpo.supplier as \"Supplier:Link/Supplier:130\",\n sup.supplier_name as \"Supplier Name::150\",\n\tpo_item.project_name as \"Project:Link/Project:130\",\n\tifnull(po_item.received_qty, 0) as \"Received Qty:Float:120\",\n\tpo.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order` po, `tabPurchase Order Item` po_item, `tabSupplier` sup\nwhere\n\tpo.name = po_item.parent and po.supplier = sup.name and po.docstatus = 1\norder by po.name desc",
|
||||
"ref_doctype": "Purchase Order",
|
||||
"report_name": "Item-wise Purchase History",
|
||||
"report_type": "Query Report"
|
||||
}
|
||||
}
|
||||
|
||||
3
erpnext/change_log/v6/v6_19_0.md
Normal file
@@ -0,0 +1,3 @@
|
||||
- Now you can **disable** existing Customers / Suppliers
|
||||
- Set *Last Day of the Next Month* as Credit Days for a Supplier / Supplier Type
|
||||
- Don't map **No Copy** fields when creating recurring documents like Sales Order, Sales Invoice, Purchase Order and Purchase Invoice
|
||||
4
erpnext/change_log/v6/v6_20_0.md
Normal file
@@ -0,0 +1,4 @@
|
||||
- Added new **Employee Attendance Tool**, to manage attendace in bulk.
|
||||
- In Profit and Loss Statement and Cash Flow repots, **accumulated periodic balance** is not optional based on filters
|
||||
- Removed **Is Service Item** from Item, all sales items are available for service.
|
||||
- Now **Sales Person Group** can be selected in a sales transaction. All the activities made by the children of any group, will also be considered as it's own activity.
|
||||
3
erpnext/change_log/v6/v6_21_0.md
Normal file
@@ -0,0 +1,3 @@
|
||||
- Customer history (Quototations, Sales Invoices etc) can been seen in Customer timeline (based on permissions)
|
||||
- Default Warehouse not mandatory in Item
|
||||
- Use **Pricing Rule** of template in case of Item variant, if not Pricing Rule for Item variant is defined.
|
||||
@@ -60,9 +60,9 @@ def get_data():
|
||||
"items": [
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Process Payroll",
|
||||
"label": _("Process Payroll"),
|
||||
"description":_("Generate Salary Slips"),
|
||||
"name": "Employee Attendance Tool",
|
||||
"label": _("Employee Attendance Tool"),
|
||||
"description":_("Mark Employee Attendance in Bulk"),
|
||||
"hide_count": True
|
||||
},
|
||||
{
|
||||
@@ -71,6 +71,14 @@ def get_data():
|
||||
"description":_("Upload attendance from a .csv file"),
|
||||
"hide_count": True
|
||||
},
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Process Payroll",
|
||||
"label": _("Process Payroll"),
|
||||
"description":_("Generate Salary Slips"),
|
||||
"hide_count": True
|
||||
},
|
||||
|
||||
{
|
||||
"type": "doctype",
|
||||
"name": "Leave Control Panel",
|
||||
@@ -177,6 +185,12 @@ def get_data():
|
||||
"name": "Employee Birthday",
|
||||
"doctype": "Employee"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"is_query_report": True,
|
||||
"name": "Employee Holiday Attendance",
|
||||
"doctype": "Employee"
|
||||
},
|
||||
{
|
||||
"type": "report",
|
||||
"name": "Employee Information",
|
||||
@@ -194,6 +208,7 @@ def get_data():
|
||||
"name": "Monthly Attendance Sheet",
|
||||
"doctype": "Attendance"
|
||||
},
|
||||
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _, throw
|
||||
from frappe.utils import today, flt, cint
|
||||
from frappe.utils import today, flt, cint, fmt_money
|
||||
from erpnext.setup.utils import get_company_currency, get_exchange_rate
|
||||
from erpnext.accounts.utils import get_fiscal_year, validate_fiscal_year, get_account_currency
|
||||
from erpnext.utilities.transaction_base import TransactionBase
|
||||
from erpnext.controllers.recurring_document import convert_to_recurring, validate_recurring_document
|
||||
from erpnext.controllers.sales_and_purchase_return import validate_return
|
||||
from erpnext.accounts.party import get_party_account_currency
|
||||
from erpnext.exceptions import CustomerFrozen, InvalidCurrency
|
||||
from erpnext.accounts.party import get_party_account_currency, validate_party_frozen_disabled
|
||||
from erpnext.exceptions import InvalidCurrency
|
||||
|
||||
force_item_fields = ("item_group", "barcode", "brand", "stock_uom")
|
||||
|
||||
@@ -60,12 +60,6 @@ class AccountsController(TransactionBase):
|
||||
validate_recurring_document(self)
|
||||
convert_to_recurring(self, self.get("posting_date") or self.get("transaction_date"))
|
||||
|
||||
def before_recurring(self):
|
||||
if self.meta.get_field("fiscal_year"):
|
||||
self.fiscal_year = None
|
||||
if self.meta.get_field("due_date"):
|
||||
self.due_date = None
|
||||
|
||||
def set_missing_values(self, for_validate=False):
|
||||
for fieldname in ["posting_date", "transaction_date"]:
|
||||
if not self.get(fieldname) and self.meta.get_field(fieldname):
|
||||
@@ -392,27 +386,44 @@ class AccountsController(TransactionBase):
|
||||
def set_total_advance_paid(self):
|
||||
if self.doctype == "Sales Order":
|
||||
dr_or_cr = "credit_in_account_currency"
|
||||
party = self.customer
|
||||
else:
|
||||
dr_or_cr = "debit_in_account_currency"
|
||||
party = self.supplier
|
||||
|
||||
advance_paid = frappe.db.sql("""
|
||||
advance = frappe.db.sql("""
|
||||
select
|
||||
sum({dr_or_cr})
|
||||
account_currency, sum({dr_or_cr}) as amount
|
||||
from
|
||||
`tabJournal Entry Account`
|
||||
where
|
||||
reference_type = %s and reference_name = %s
|
||||
reference_type = %s and reference_name = %s and party=%s
|
||||
and docstatus = 1 and is_advance = "Yes"
|
||||
""".format(dr_or_cr=dr_or_cr), (self.doctype, self.name))
|
||||
""".format(dr_or_cr=dr_or_cr), (self.doctype, self.name, party), as_dict=1)
|
||||
|
||||
if advance_paid:
|
||||
advance_paid = flt(advance_paid[0][0], self.precision("advance_paid"))
|
||||
if flt(self.base_grand_total) >= advance_paid:
|
||||
frappe.db.set_value(self.doctype, self.name, "advance_paid", advance_paid)
|
||||
else:
|
||||
frappe.throw(_("Total advance ({0}) against Order {1} cannot be greater \
|
||||
than the Grand Total ({2})")
|
||||
.format(advance_paid, self.name, self.base_grand_total))
|
||||
if advance:
|
||||
advance = advance[0]
|
||||
advance_paid = flt(advance.amount, self.precision("advance_paid"))
|
||||
formatted_advance_paid = fmt_money(advance_paid, precision=self.precision("advance_paid"),
|
||||
currency=advance.account_currency)
|
||||
|
||||
frappe.db.set_value(self.doctype, self.name, "party_account_currency",
|
||||
advance.account_currency)
|
||||
|
||||
if advance.account_currency == self.currency:
|
||||
order_total = self.grand_total
|
||||
formatted_order_total = fmt_money(order_total, precision=self.precision("grand_total"),
|
||||
currency=advance.account_currency)
|
||||
else:
|
||||
order_total = self.base_grand_total
|
||||
formatted_order_total = fmt_money(order_total, precision=self.precision("base_grand_total"),
|
||||
currency=advance.account_currency)
|
||||
|
||||
if order_total >= advance_paid:
|
||||
frappe.db.set_value(self.doctype, self.name, "advance_paid", advance_paid)
|
||||
else:
|
||||
frappe.throw(_("Total advance ({0}) against Order {1} cannot be greater than the Grand Total ({2})")
|
||||
.format(formatted_advance_paid, self.name, formatted_order_total))
|
||||
|
||||
@property
|
||||
def company_abbr(self):
|
||||
@@ -422,24 +433,23 @@ class AccountsController(TransactionBase):
|
||||
return self._abbr
|
||||
|
||||
def validate_party(self):
|
||||
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
|
||||
if frozen_accounts_modifier in frappe.get_roles():
|
||||
return
|
||||
|
||||
party_type, party = self.get_party()
|
||||
|
||||
if party_type:
|
||||
if frappe.db.get_value(party_type, party, "is_frozen"):
|
||||
frappe.throw("{0} {1} is frozen".format(party_type, party), CustomerFrozen)
|
||||
validate_party_frozen_disabled(party_type, party)
|
||||
|
||||
def get_party(self):
|
||||
party_type = None
|
||||
if self.meta.get_field("customer"):
|
||||
if self.doctype in ("Opportunity", "Quotation", "Sales Order", "Delivery Note", "Sales Invoice"):
|
||||
party_type = 'Customer'
|
||||
|
||||
elif self.meta.get_field("supplier"):
|
||||
elif self.doctype in ("Supplier Quotation", "Purchase Order", "Purchase Receipt", "Purchase Invoice"):
|
||||
party_type = 'Supplier'
|
||||
|
||||
elif self.meta.get_field("customer"):
|
||||
party_type = "Customer"
|
||||
|
||||
elif self.meta.get_field("supplier"):
|
||||
party_type = "Supplier"
|
||||
|
||||
party = self.get(party_type.lower()) if party_type else None
|
||||
|
||||
return party_type, party
|
||||
@@ -457,7 +467,9 @@ class AccountsController(TransactionBase):
|
||||
frappe.throw(_("Accounting Entry for {0}: {1} can only be made in currency: {2}")
|
||||
.format(party_type, party, party_account_currency), InvalidCurrency)
|
||||
|
||||
# Note: not validating with gle account because we don't have the account at quotation / sales order level and we shouldn't stop someone from creating a sales invoice if sales order is already created
|
||||
# Note: not validating with gle account because we don't have the account
|
||||
# at quotation / sales order level and we shouldn't stop someone
|
||||
# from creating a sales invoice if sales order is already created
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_tax_rate(account_head):
|
||||
|
||||
@@ -89,7 +89,7 @@ def customer_query(doctype, txt, searchfield, start, page_len, filters):
|
||||
return frappe.db.sql("""select {fields} from `tabCustomer`
|
||||
where docstatus < 2
|
||||
and ({key} like %(txt)s
|
||||
or customer_name like %(txt)s)
|
||||
or customer_name like %(txt)s) and disabled=0
|
||||
{mcond}
|
||||
order by
|
||||
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
|
||||
@@ -118,7 +118,7 @@ def supplier_query(doctype, txt, searchfield, start, page_len, filters):
|
||||
return frappe.db.sql("""select {field} from `tabSupplier`
|
||||
where docstatus < 2
|
||||
and ({key} like %(txt)s
|
||||
or supplier_name like %(txt)s)
|
||||
or supplier_name like %(txt)s) and disabled=0
|
||||
{mcond}
|
||||
order by
|
||||
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
|
||||
@@ -216,12 +216,8 @@ def get_delivery_notes_to_be_billed(doctype, txt, searchfield, start, page_len,
|
||||
return frappe.db.sql("""select `tabDelivery Note`.name, `tabDelivery Note`.customer_name
|
||||
from `tabDelivery Note`
|
||||
where `tabDelivery Note`.`%(key)s` like %(txt)s and
|
||||
`tabDelivery Note`.docstatus = 1 and status not in ("Stopped", "Closed") %(fcond)s and
|
||||
(ifnull((select sum(qty) from `tabDelivery Note Item` where
|
||||
`tabDelivery Note Item`.parent=`tabDelivery Note`.name), 0) >
|
||||
ifnull((select sum(qty) from `tabSales Invoice Item` where
|
||||
`tabSales Invoice Item`.docstatus = 1 and
|
||||
`tabSales Invoice Item`.delivery_note=`tabDelivery Note`.name), 0))
|
||||
`tabDelivery Note`.docstatus = 1 and status not in ("Stopped", "Closed") %(fcond)s
|
||||
and (`tabDelivery Note`.per_billed < 100 or `tabDelivery Note`.grand_total = 0)
|
||||
%(mcond)s order by `tabDelivery Note`.`%(key)s` asc
|
||||
limit %(start)s, %(page_len)s""" % {
|
||||
"key": searchfield,
|
||||
|
||||
@@ -47,12 +47,9 @@ def manage_recurring_documents(doctype, next_date=None, commit=True):
|
||||
where %s=%s and recurring_id=%s and docstatus=1"""
|
||||
% (doctype, date_field, '%s', '%s'), (next_date, recurring_id)):
|
||||
try:
|
||||
ref_wrapper = frappe.get_doc(doctype, ref_document)
|
||||
if hasattr(ref_wrapper, "before_recurring"):
|
||||
ref_wrapper.before_recurring()
|
||||
|
||||
new_document_wrapper = make_new_document(ref_wrapper, date_field, next_date)
|
||||
send_notification(new_document_wrapper)
|
||||
reference_doc = frappe.get_doc(doctype, ref_document)
|
||||
new_doc = make_new_document(reference_doc, date_field, next_date)
|
||||
send_notification(new_doc)
|
||||
if commit:
|
||||
frappe.db.commit()
|
||||
except:
|
||||
@@ -63,8 +60,8 @@ def manage_recurring_documents(doctype, next_date=None, commit=True):
|
||||
frappe.db.sql("update `tab%s` \
|
||||
set is_recurring = 0 where name = %s" % (doctype, '%s'),
|
||||
(ref_document))
|
||||
notify_errors(ref_document, doctype, ref_wrapper.get("customer") or ref_wrapper.get("supplier"),
|
||||
ref_wrapper.owner)
|
||||
notify_errors(ref_document, doctype, reference_doc.get("customer") or reference_doc.get("supplier"),
|
||||
reference_doc.owner)
|
||||
frappe.db.commit()
|
||||
|
||||
exception_list.append(frappe.get_traceback())
|
||||
@@ -76,34 +73,42 @@ def manage_recurring_documents(doctype, next_date=None, commit=True):
|
||||
exception_message = "\n\n".join([cstr(d) for d in exception_list])
|
||||
frappe.throw(exception_message)
|
||||
|
||||
def make_new_document(ref_wrapper, date_field, posting_date):
|
||||
def make_new_document(reference_doc, date_field, posting_date):
|
||||
from erpnext.accounts.utils import get_fiscal_year
|
||||
new_document = frappe.copy_doc(ref_wrapper)
|
||||
mcount = month_map[ref_wrapper.recurring_type]
|
||||
new_document = frappe.copy_doc(reference_doc, ignore_no_copy=True)
|
||||
mcount = month_map[reference_doc.recurring_type]
|
||||
|
||||
from_date = get_next_date(ref_wrapper.from_date, mcount)
|
||||
from_date = get_next_date(reference_doc.from_date, mcount)
|
||||
|
||||
# get last day of the month to maintain period if the from date is first day of its own month
|
||||
# and to date is the last day of its own month
|
||||
if (cstr(get_first_day(ref_wrapper.from_date)) == cstr(ref_wrapper.from_date)) and \
|
||||
(cstr(get_last_day(ref_wrapper.to_date)) == cstr(ref_wrapper.to_date)):
|
||||
to_date = get_last_day(get_next_date(ref_wrapper.to_date, mcount))
|
||||
if (cstr(get_first_day(reference_doc.from_date)) == cstr(reference_doc.from_date)) and \
|
||||
(cstr(get_last_day(reference_doc.to_date)) == cstr(reference_doc.to_date)):
|
||||
to_date = get_last_day(get_next_date(reference_doc.to_date, mcount))
|
||||
else:
|
||||
to_date = get_next_date(ref_wrapper.to_date, mcount)
|
||||
to_date = get_next_date(reference_doc.to_date, mcount)
|
||||
|
||||
new_document.update({
|
||||
date_field: posting_date,
|
||||
"from_date": from_date,
|
||||
"to_date": to_date,
|
||||
"fiscal_year": get_fiscal_year(posting_date)[0],
|
||||
"owner": ref_wrapper.owner,
|
||||
"fiscal_year": get_fiscal_year(posting_date)[0]
|
||||
})
|
||||
|
||||
if ref_wrapper.doctype == "Sales Order":
|
||||
new_document.update({
|
||||
"delivery_date": get_next_date(ref_wrapper.delivery_date, mcount,
|
||||
cint(ref_wrapper.repeat_on_day_of_month))
|
||||
})
|
||||
# copy document fields
|
||||
for fieldname in ("owner", "recurring_type", "repeat_on_day_of_month",
|
||||
"recurring_id", "notification_email_address", "is_recurring", "end_date",
|
||||
"title", "naming_series", "select_print_heading", "ignore_pricing_rule",
|
||||
"posting_time", "remarks"):
|
||||
if new_document.meta.get_field(fieldname):
|
||||
new_document.set(fieldname, reference_doc.get(fieldname))
|
||||
|
||||
# copy item fields
|
||||
for i, item in enumerate(new_document.items):
|
||||
for fieldname in ("page_break",):
|
||||
item.set(fieldname, reference_doc.items[i].get(fieldname))
|
||||
|
||||
new_document.run_method("on_recurring", reference_doc=reference_doc)
|
||||
|
||||
new_document.submit()
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ def validate_returned_items(doc):
|
||||
frappe.throw(_("Row # {0}: Serial No {1} does not match with {2} {3}")
|
||||
.format(d.idx, s, doc.doctype, doc.return_against))
|
||||
|
||||
if not d.warehouse:
|
||||
if doc.doctype != "Purchase Invoice" and not d.get("warehouse"):
|
||||
frappe.throw(_("Warehouse is mandatory"))
|
||||
|
||||
items_returned = True
|
||||
|
||||
@@ -161,7 +161,7 @@ class SellingController(StockController):
|
||||
for d in self.get("items"):
|
||||
if d.qty is None:
|
||||
frappe.throw(_("Row {0}: Qty is mandatory").format(d.idx))
|
||||
|
||||
|
||||
if self.has_product_bundle(d.item_code):
|
||||
for p in self.get("packed_items"):
|
||||
if p.parent_detail_docname == d.name and p.parent_item == d.item_code:
|
||||
@@ -199,17 +199,17 @@ class SellingController(StockController):
|
||||
where so_detail = %s and docstatus = 1
|
||||
and against_sales_order = %s
|
||||
and parent != %s""", (so_detail, so, current_docname))
|
||||
|
||||
delivered_via_si = frappe.db.sql("""select sum(si_item.qty)
|
||||
|
||||
delivered_via_si = frappe.db.sql("""select sum(si_item.qty)
|
||||
from `tabSales Invoice Item` si_item, `tabSales Invoice` si
|
||||
where si_item.parent = si.name and si.update_stock = 1
|
||||
and si_item.so_detail = %s and si.docstatus = 1
|
||||
and si_item.so_detail = %s and si.docstatus = 1
|
||||
and si_item.sales_order = %s
|
||||
and si.name != %s""", (so_detail, so, current_docname))
|
||||
|
||||
|
||||
total_delivered_qty = (flt(delivered_via_dn[0][0]) if delivered_via_dn else 0) \
|
||||
+ (flt(delivered_via_si[0][0]) if delivered_via_si else 0)
|
||||
|
||||
|
||||
return total_delivered_qty
|
||||
|
||||
def get_so_qty_and_warehouse(self, so_detail):
|
||||
@@ -230,10 +230,10 @@ def check_active_sales_items(obj):
|
||||
for d in obj.get("items"):
|
||||
if d.item_code:
|
||||
item = frappe.db.sql("""select docstatus, is_sales_item,
|
||||
is_service_item, income_account from tabItem where name = %s""",
|
||||
income_account from tabItem where name = %s""",
|
||||
d.item_code, as_dict=True)[0]
|
||||
if item.is_sales_item == 0 and item.is_service_item == 0:
|
||||
frappe.throw(_("Item {0} must be Sales or Service Item in {1}").format(d.item_code, d.idx))
|
||||
if item.is_sales_item == 0:
|
||||
frappe.throw(_("Item {0} must be a Sales Item in {1}").format(d.item_code, d.idx))
|
||||
if getattr(d, "income_account", None) and not item.income_account:
|
||||
frappe.db.set_value("Item", d.item_code, "income_account",
|
||||
d.income_account)
|
||||
|
||||
@@ -397,6 +397,16 @@ class calculate_taxes_and_totals(object):
|
||||
for adv in self.doc.get("advances")])
|
||||
|
||||
self.doc.total_advance = flt(total_allocated_amount, self.doc.precision("total_advance"))
|
||||
|
||||
if self.doc.party_account_currency == self.doc.currency:
|
||||
invoice_total = self.doc.grand_total
|
||||
else:
|
||||
invoice_total = flt(self.doc.grand_total * self.doc.conversion_rate,
|
||||
self.doc.precision("grand_total"))
|
||||
|
||||
if invoice_total > 0 and self.doc.total_advance > invoice_total:
|
||||
frappe.throw(_("Advance amount cannot be greater than {0} {1}")
|
||||
.format(self.doc.party_account_currency, invoice_total))
|
||||
|
||||
if self.doc.docstatus == 0:
|
||||
self.calculate_outstanding_amount()
|
||||
|
||||
@@ -31,10 +31,10 @@ def validate_filters(filters):
|
||||
for f in ["Fiscal Year", "Based On", "Period", "Company"]:
|
||||
if not filters.get(f.lower().replace(" ", "_")):
|
||||
frappe.throw(_("{0} is mandatory").format(f))
|
||||
|
||||
|
||||
if not frappe.db.exists("Fiscal Year", filters.get("fiscal_year")):
|
||||
frappe.throw(_("Fiscal Year: {0} does not exists").format(filters.get("fiscal_year")))
|
||||
|
||||
|
||||
if filters.get("based_on") == filters.get("group_by"):
|
||||
frappe.throw(_("'Based On' and 'Group By' can not be same"))
|
||||
|
||||
@@ -98,7 +98,8 @@ def get_data(filters, conditions):
|
||||
(filters.get("company"), filters.get("fiscal_year"), row[i][0],
|
||||
data1[d][0]), as_list=1)
|
||||
|
||||
des[ind] = row[i]
|
||||
des[ind] = row[i][0]
|
||||
|
||||
for j in range(1,len(conditions["columns"])-inc):
|
||||
des[j+inc] = row1[0][j]
|
||||
|
||||
@@ -213,7 +214,7 @@ def based_wise_columns_query(based_on, trans):
|
||||
elif based_on == "Customer":
|
||||
based_on_details["based_on_cols"] = ["Customer:Link/Customer:120", "Territory:Link/Territory:120"]
|
||||
based_on_details["based_on_select"] = "t1.customer_name, t1.territory, "
|
||||
based_on_details["based_on_group_by"] = 't1.customer_name'
|
||||
based_on_details["based_on_group_by"] = 't1.customer'
|
||||
based_on_details["addl_tables"] = ''
|
||||
|
||||
elif based_on == "Customer Group":
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"allow_copy": 0,
|
||||
"allow_import": 0,
|
||||
"allow_rename": 0,
|
||||
"allow_rename": 1,
|
||||
"autoname": "field:subject",
|
||||
"creation": "2013-01-10 16:34:31",
|
||||
"custom": 0,
|
||||
@@ -27,6 +27,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -49,6 +50,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -72,6 +74,7 @@
|
||||
"no_copy": 1,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -94,6 +97,7 @@
|
||||
"no_copy": 1,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -116,6 +120,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -138,6 +143,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -161,6 +167,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -184,6 +191,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -207,6 +215,7 @@
|
||||
"options": "test_send",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -225,7 +234,8 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2015-11-16 06:29:50.506090",
|
||||
"menu_index": 0,
|
||||
"modified": "2016-02-05 11:48:43.081204",
|
||||
"modified_by": "Administrator",
|
||||
"module": "CRM",
|
||||
"name": "Newsletter",
|
||||
@@ -254,5 +264,7 @@
|
||||
],
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"title_field": "subject"
|
||||
"sort_order": "ASC",
|
||||
"title_field": "subject",
|
||||
"version": 0
|
||||
}
|
||||
@@ -63,7 +63,7 @@ class Newsletter(Document):
|
||||
reference_doctype = self.doctype, reference_name = self.name,
|
||||
unsubscribe_method = "/api/method/erpnext.crm.doctype.newsletter.newsletter.unsubscribe",
|
||||
unsubscribe_params = {"name": self.newsletter_list},
|
||||
bulk_priority = 1)
|
||||
bulk_priority = 0)
|
||||
|
||||
if not frappe.flags.in_test:
|
||||
frappe.db.auto_commit_on_many_writes = False
|
||||
|
||||
@@ -52,8 +52,7 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
|
||||
this.frm.set_query("item_code", "items", function() {
|
||||
return {
|
||||
query: "erpnext.controllers.queries.item_query",
|
||||
filters: me.frm.doc.enquiry_type === "Maintenance" ?
|
||||
{"is_service_item": 1} : {"is_sales_item":1}
|
||||
filters: {"is_sales_item": 1}
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"options": "icon-user",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -51,6 +52,7 @@
|
||||
"options": "OPTY-",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -76,6 +78,7 @@
|
||||
"options": "\nLead\nCustomer",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -102,6 +105,7 @@
|
||||
"options": "Customer",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -128,6 +132,7 @@
|
||||
"options": "Lead",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -151,6 +156,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -173,6 +179,7 @@
|
||||
"oldfieldtype": "Column Break",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -197,6 +204,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -223,6 +231,7 @@
|
||||
"options": "Sales\nMaintenance",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -249,6 +258,7 @@
|
||||
"options": "Open\nQuotation\nLost\nReplied\nClosed",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -272,6 +282,7 @@
|
||||
"no_copy": 1,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -295,6 +306,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -320,6 +332,7 @@
|
||||
"options": "icon-shopping-cart",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -346,6 +359,7 @@
|
||||
"options": "Opportunity Item",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -371,6 +385,7 @@
|
||||
"options": "icon-bullhorn",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -395,6 +410,7 @@
|
||||
"options": "Address",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -419,6 +435,7 @@
|
||||
"oldfieldtype": "Small Text",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -444,6 +461,7 @@
|
||||
"options": "Territory",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -471,6 +489,7 @@
|
||||
"options": "Customer Group",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -492,6 +511,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -516,6 +536,7 @@
|
||||
"options": "Contact",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -539,6 +560,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -562,6 +584,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -585,6 +608,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -610,6 +634,7 @@
|
||||
"options": "icon-file-text",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -635,6 +660,7 @@
|
||||
"options": "\nExisting Customer\nReference\nAdvertisement\nCold Calling\nExhibition\nSupplier Reference\nMass Mailing\nCustomer's Vendor\nCampaign\nWalk In",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -661,6 +687,7 @@
|
||||
"options": "Campaign",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -683,6 +710,7 @@
|
||||
"oldfieldtype": "Column Break",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -709,6 +737,7 @@
|
||||
"options": "Company",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -734,6 +763,7 @@
|
||||
"oldfieldtype": "Date",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -760,6 +790,7 @@
|
||||
"options": "Fiscal Year",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@@ -784,6 +815,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -810,6 +842,7 @@
|
||||
"options": "User",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -836,6 +869,7 @@
|
||||
"oldfieldtype": "Date",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -858,6 +892,7 @@
|
||||
"oldfieldtype": "Column Break",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -883,6 +918,7 @@
|
||||
"oldfieldtype": "Small Text",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -908,6 +944,7 @@
|
||||
"options": "Opportunity",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@@ -927,7 +964,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2015-11-16 06:29:50.931180",
|
||||
"modified": "2016-02-03 01:10:50.963569",
|
||||
"modified_by": "Administrator",
|
||||
"module": "CRM",
|
||||
"name": "Opportunity",
|
||||
@@ -979,5 +1016,6 @@
|
||||
"search_fields": "status,transaction_date,customer,lead,enquiry_type,territory,company",
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"timeline_field": "customer",
|
||||
"title_field": "title"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 62 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 30 KiB |
BIN
erpnext/docs/assets/img/articles/close-1.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
BIN
erpnext/docs/assets/img/articles/close-2.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 68 KiB |
BIN
erpnext/docs/assets/img/articles/delete-transactions.gif
Normal file
|
After Width: | Height: | Size: 603 KiB |
BIN
erpnext/docs/assets/img/articles/discount-1.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
erpnext/docs/assets/img/articles/discount-2.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
erpnext/docs/assets/img/articles/discount-on-grand-total.png
Normal file
|
After Width: | Height: | Size: 79 KiB |
BIN
erpnext/docs/assets/img/articles/discount-on-net-total.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
erpnext/docs/assets/img/articles/manufacturing-settings-2.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
erpnext/docs/assets/img/articles/manufacturing-settings-3.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
erpnext/docs/assets/img/articles/manufacturing-settings-4.png
Normal file
|
After Width: | Height: | Size: 125 KiB |
BIN
erpnext/docs/assets/img/articles/nested-bom-1.png
Normal file
|
After Width: | Height: | Size: 107 KiB |
BIN
erpnext/docs/assets/img/articles/sales-person-transaction-1.png
Normal file
|
After Width: | Height: | Size: 54 KiB |
BIN
erpnext/docs/assets/img/articles/sales-person-transaction-2.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
BIN
erpnext/docs/assets/img/articles/sales-person-transaction-3.png
Normal file
|
After Width: | Height: | Size: 142 KiB |
BIN
erpnext/docs/assets/img/articles/sales-person-transaction-4.png
Normal file
|
After Width: | Height: | Size: 124 KiB |
BIN
erpnext/docs/assets/img/articles/services-1.png
Normal file
|
After Width: | Height: | Size: 78 KiB |
BIN
erpnext/docs/assets/img/articles/shipping-charges-1.png
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
erpnext/docs/assets/img/articles/shipping-charges-2.gif
Normal file
|
After Width: | Height: | Size: 708 KiB |
BIN
erpnext/docs/assets/img/articles/shipping-charges-3.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
erpnext/docs/assets/img/articles/shipping-charges-4.gif
Normal file
|
After Width: | Height: | Size: 930 KiB |
BIN
erpnext/docs/assets/img/articles/use-multi-level-bom.png
Normal file
|
After Width: | Height: | Size: 93 KiB |
BIN
erpnext/docs/assets/img/articles/valuation-based-on-1.png
Normal file
|
After Width: | Height: | Size: 116 KiB |
|
After Width: | Height: | Size: 51 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 117 KiB |
|
Before Width: | Height: | Size: 77 KiB |
@@ -1,193 +0,0 @@
|
||||
<!-- title: erpnext.accounts.general_ledger --><div class="dev-header">
|
||||
|
||||
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
|
||||
Version 6.x.x</a>
|
||||
|
||||
|
||||
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/blob/develop/erpnext/accounts/general_ledger.py"
|
||||
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 style="font-weight: normal;">Class <b>StockAccountInvalidTransaction</b></h3>
|
||||
|
||||
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
|
||||
|
||||
<div class="docs-attr-desc"><p></p>
|
||||
</div>
|
||||
<div style="padding-left: 30px;">
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.general_ledger.check_if_in_list" href="#erpnext.accounts.general_ledger.check_if_in_list" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.general_ledger.<b>check_if_in_list</b>
|
||||
<i class="text-muted">(gle, gl_map)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.general_ledger.delete_gl_entries" href="#erpnext.accounts.general_ledger.delete_gl_entries" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.general_ledger.<b>delete_gl_entries</b>
|
||||
<i class="text-muted">(gl_entries=None, voucher_type=None, voucher_no=None, adv_adj=False, update_outstanding=Yes)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.general_ledger.make_entry" href="#erpnext.accounts.general_ledger.make_entry" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.general_ledger.<b>make_entry</b>
|
||||
<i class="text-muted">(args, adv_adj, update_outstanding)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.general_ledger.make_gl_entries" href="#erpnext.accounts.general_ledger.make_gl_entries" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.general_ledger.<b>make_gl_entries</b>
|
||||
<i class="text-muted">(gl_map, cancel=False, adv_adj=False, merge_entries=True, update_outstanding=Yes)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.general_ledger.make_round_off_gle" href="#erpnext.accounts.general_ledger.make_round_off_gle" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.general_ledger.<b>make_round_off_gle</b>
|
||||
<i class="text-muted">(gl_map, debit_credit_diff)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.general_ledger.merge_similar_entries" href="#erpnext.accounts.general_ledger.merge_similar_entries" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.general_ledger.<b>merge_similar_entries</b>
|
||||
<i class="text-muted">(gl_map)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.general_ledger.process_gl_map" href="#erpnext.accounts.general_ledger.process_gl_map" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.general_ledger.<b>process_gl_map</b>
|
||||
<i class="text-muted">(gl_map, merge_entries=True)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.general_ledger.round_off_debit_credit" href="#erpnext.accounts.general_ledger.round_off_debit_credit" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.general_ledger.<b>round_off_debit_credit</b>
|
||||
<i class="text-muted">(gl_map)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.general_ledger.save_entries" href="#erpnext.accounts.general_ledger.save_entries" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.general_ledger.<b>save_entries</b>
|
||||
<i class="text-muted">(gl_map, adv_adj, update_outstanding)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.general_ledger.validate_account_for_auto_accounting_for_stock" href="#erpnext.accounts.general_ledger.validate_account_for_auto_accounting_for_stock" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.general_ledger.<b>validate_account_for_auto_accounting_for_stock</b>
|
||||
<i class="text-muted">(gl_map)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- autodoc -->
|
||||
@@ -1,18 +0,0 @@
|
||||
<!-- title: erpnext.accounts --><div class="dev-header">
|
||||
|
||||
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
|
||||
Version 6.x.x</a>
|
||||
|
||||
|
||||
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/blob/develop/erpnext/accounts.py"
|
||||
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- autodoc -->
|
||||
@@ -1,332 +0,0 @@
|
||||
<!-- title: erpnext.accounts.party --><div class="dev-header">
|
||||
|
||||
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
|
||||
Version 6.x.x</a>
|
||||
|
||||
|
||||
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/blob/develop/erpnext/accounts/party.py"
|
||||
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 style="font-weight: normal;">Class <b>DuplicatePartyAccountError</b></h3>
|
||||
|
||||
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
|
||||
|
||||
<div class="docs-attr-desc"><p></p>
|
||||
</div>
|
||||
<div style="padding-left: 30px;">
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party._get_party_details" href="#erpnext.accounts.party._get_party_details" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>_get_party_details</b>
|
||||
<i class="text-muted">(party=None, account=None, party_type=Customer, company=None, posting_date=None, price_list=None, currency=None, doctype=None, ignore_permissions=False)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.get_company_currency" href="#erpnext.accounts.party.get_company_currency" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>get_company_currency</b>
|
||||
<i class="text-muted">()</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.get_credit_days" href="#erpnext.accounts.party.get_credit_days" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>get_credit_days</b>
|
||||
<i class="text-muted">(party_type, party, company)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.get_default_price_list" href="#erpnext.accounts.party.get_default_price_list" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>get_default_price_list</b>
|
||||
<i class="text-muted">(party)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p>Return default price list for party (Document object)</p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p><span class="label label-info">Public API</span>
|
||||
<br><code>/api/method/erpnext.accounts.party.get_due_date</code>
|
||||
</p>
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.get_due_date" href="#erpnext.accounts.party.get_due_date" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>get_due_date</b>
|
||||
<i class="text-muted">(posting_date, party_type, party, company)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p>Set Due Date = Posting Date + Credit Days</p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p><span class="label label-info">Public API</span>
|
||||
<br><code>/api/method/erpnext.accounts.party.get_party_account</code>
|
||||
</p>
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.get_party_account" href="#erpnext.accounts.party.get_party_account" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>get_party_account</b>
|
||||
<i class="text-muted">(party_type, party, company)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p>Returns the account for the given <code>party</code>.
|
||||
Will first search in party (Customer / Supplier) record, if not found,
|
||||
will search in group (Customer Group / Supplier Type),
|
||||
finally will return default.</p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.get_party_account_currency" href="#erpnext.accounts.party.get_party_account_currency" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>get_party_account_currency</b>
|
||||
<i class="text-muted">(party_type, party, company)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p><span class="label label-info">Public API</span>
|
||||
<br><code>/api/method/erpnext.accounts.party.get_party_details</code>
|
||||
</p>
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.get_party_details" href="#erpnext.accounts.party.get_party_details" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>get_party_details</b>
|
||||
<i class="text-muted">(party=None, account=None, party_type=Customer, company=None, posting_date=None, price_list=None, currency=None, doctype=None)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.get_party_gle_currency" href="#erpnext.accounts.party.get_party_gle_currency" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>get_party_gle_currency</b>
|
||||
<i class="text-muted">(party_type, party, company)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.set_account_and_due_date" href="#erpnext.accounts.party.set_account_and_due_date" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>set_account_and_due_date</b>
|
||||
<i class="text-muted">(party, account, party_type, company, posting_date, doctype)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.set_address_details" href="#erpnext.accounts.party.set_address_details" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>set_address_details</b>
|
||||
<i class="text-muted">(out, party, party_type)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.set_contact_details" href="#erpnext.accounts.party.set_contact_details" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>set_contact_details</b>
|
||||
<i class="text-muted">(out, party, party_type)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.set_other_values" href="#erpnext.accounts.party.set_other_values" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>set_other_values</b>
|
||||
<i class="text-muted">(out, party, party_type)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.set_price_list" href="#erpnext.accounts.party.set_price_list" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>set_price_list</b>
|
||||
<i class="text-muted">(out, party, party_type, given_price_list)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p><span class="label label-info">Public API</span>
|
||||
<br><code>/api/method/erpnext.accounts.party.set_taxes</code>
|
||||
</p>
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.set_taxes" href="#erpnext.accounts.party.set_taxes" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>set_taxes</b>
|
||||
<i class="text-muted">(party, party_type, posting_date, company, customer_group=None, supplier_type=None, billing_address=None, shipping_address=None, use_for_shopping_cart=None)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.validate_due_date" href="#erpnext.accounts.party.validate_due_date" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>validate_due_date</b>
|
||||
<i class="text-muted">(posting_date, due_date, party_type, party, company)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.validate_party_accounts" href="#erpnext.accounts.party.validate_party_accounts" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>validate_party_accounts</b>
|
||||
<i class="text-muted">(doc)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.party.validate_party_gle_currency" href="#erpnext.accounts.party.validate_party_gle_currency" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.party.<b>validate_party_gle_currency</b>
|
||||
<i class="text-muted">(party_type, party, company, party_account_currency=None)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p>Validate party account currency with existing GL Entry's currency</p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- autodoc -->
|
||||
@@ -1,380 +0,0 @@
|
||||
<!-- title: erpnext.accounts.utils --><div class="dev-header">
|
||||
|
||||
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
|
||||
Version 6.x.x</a>
|
||||
|
||||
|
||||
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/blob/develop/erpnext/accounts/utils.py"
|
||||
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 style="font-weight: normal;">Class <b>BudgetError</b></h3>
|
||||
|
||||
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
|
||||
|
||||
<div class="docs-attr-desc"><p></p>
|
||||
</div>
|
||||
<div style="padding-left: 30px;">
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3 style="font-weight: normal;">Class <b>FiscalYearError</b></h3>
|
||||
|
||||
<p style="padding-left: 30px;"><i>Inherits from frappe.exceptions.ValidationError</i></h4>
|
||||
|
||||
<div class="docs-attr-desc"><p></p>
|
||||
</div>
|
||||
<div style="padding-left: 30px;">
|
||||
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p><span class="label label-info">Public API</span>
|
||||
<br><code>/api/method/erpnext.accounts.utils.add_ac</code>
|
||||
</p>
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.add_ac" href="#erpnext.accounts.utils.add_ac" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>add_ac</b>
|
||||
<i class="text-muted">(args=None)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p><span class="label label-info">Public API</span>
|
||||
<br><code>/api/method/erpnext.accounts.utils.add_cc</code>
|
||||
</p>
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.add_cc" href="#erpnext.accounts.utils.add_cc" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>add_cc</b>
|
||||
<i class="text-muted">(args=None)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.check_if_jv_modified" href="#erpnext.accounts.utils.check_if_jv_modified" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>check_if_jv_modified</b>
|
||||
<i class="text-muted">(args)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p>check if there is already a voucher reference
|
||||
check if amount is same
|
||||
check if jv is submitted</p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.fix_total_debit_credit" href="#erpnext.accounts.utils.fix_total_debit_credit" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>fix_total_debit_credit</b>
|
||||
<i class="text-muted">()</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.get_actual_expense" href="#erpnext.accounts.utils.get_actual_expense" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>get_actual_expense</b>
|
||||
<i class="text-muted">(args)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.get_allocated_budget" href="#erpnext.accounts.utils.get_allocated_budget" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>get_allocated_budget</b>
|
||||
<i class="text-muted">(distribution_id, posting_date, fiscal_year, yearly_budget)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p><span class="label label-info">Public API</span>
|
||||
<br><code>/api/method/erpnext.accounts.utils.get_balance_on</code>
|
||||
</p>
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.get_balance_on" href="#erpnext.accounts.utils.get_balance_on" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>get_balance_on</b>
|
||||
<i class="text-muted">(account=None, date=None, party_type=None, party=None, in_account_currency=True)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p><span class="label label-info">Public API</span>
|
||||
<br><code>/api/method/erpnext.accounts.utils.get_company_default</code>
|
||||
</p>
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.get_company_default" href="#erpnext.accounts.utils.get_company_default" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>get_company_default</b>
|
||||
<i class="text-muted">(company, fieldname)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.get_currency_precision" href="#erpnext.accounts.utils.get_currency_precision" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>get_currency_precision</b>
|
||||
<i class="text-muted">(currency=None)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p><span class="label label-info">Public API</span>
|
||||
<br><code>/api/method/erpnext.accounts.utils.get_fiscal_year</code>
|
||||
</p>
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.get_fiscal_year" href="#erpnext.accounts.utils.get_fiscal_year" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>get_fiscal_year</b>
|
||||
<i class="text-muted">(date=None, fiscal_year=None, label=Date, verbose=1, company=None)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.get_fiscal_years" href="#erpnext.accounts.utils.get_fiscal_years" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>get_fiscal_years</b>
|
||||
<i class="text-muted">(transaction_date=None, fiscal_year=None, label=Date, verbose=1, company=None)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.get_outstanding_invoices" href="#erpnext.accounts.utils.get_outstanding_invoices" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>get_outstanding_invoices</b>
|
||||
<i class="text-muted">(party_type, party, account, condition=None)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.get_stock_and_account_difference" href="#erpnext.accounts.utils.get_stock_and_account_difference" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>get_stock_and_account_difference</b>
|
||||
<i class="text-muted">(account_list=None, posting_date=None)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.get_stock_rbnb_difference" href="#erpnext.accounts.utils.get_stock_rbnb_difference" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>get_stock_rbnb_difference</b>
|
||||
<i class="text-muted">(posting_date, company)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.reconcile_against_document" href="#erpnext.accounts.utils.reconcile_against_document" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>reconcile_against_document</b>
|
||||
<i class="text-muted">(args)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p>Cancel JV, Update aginst document, split if required and resubmit jv</p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.remove_against_link_from_jv" href="#erpnext.accounts.utils.remove_against_link_from_jv" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>remove_against_link_from_jv</b>
|
||||
<i class="text-muted">(ref_type, ref_no)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.update_against_doc" href="#erpnext.accounts.utils.update_against_doc" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>update_against_doc</b>
|
||||
<i class="text-muted">(d, jv_obj)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p>Updates against document, if partial amount splits into rows</p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.validate_allocated_amount" href="#erpnext.accounts.utils.validate_allocated_amount" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>validate_allocated_amount</b>
|
||||
<i class="text-muted">(args)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.validate_expense_against_budget" href="#erpnext.accounts.utils.validate_expense_against_budget" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>validate_expense_against_budget</b>
|
||||
<i class="text-muted">(args)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.accounts.utils.validate_fiscal_year" href="#erpnext.accounts.utils.validate_fiscal_year" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.accounts.utils.<b>validate_fiscal_year</b>
|
||||
<i class="text-muted">(date, fiscal_year, label=Date, doc=None)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- autodoc -->
|
||||
@@ -1,19 +0,0 @@
|
||||
<!-- title: accounts -->
|
||||
|
||||
|
||||
<div class="dev-header">
|
||||
|
||||
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
|
||||
Version 6.x.x</a>
|
||||
|
||||
|
||||
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/tree/develop/accounts"
|
||||
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
|
||||
|
||||
</div>
|
||||
|
||||
<h3>Package Contents</h3>
|
||||
|
||||
{index}
|
||||
|
||||
<!-- autodoc -->
|
||||
@@ -1,4 +0,0 @@
|
||||
erpnext.accounts.general_ledger
|
||||
erpnext.accounts
|
||||
erpnext.accounts.party
|
||||
erpnext.accounts.utils
|
||||