Compare commits

...

91 Commits

Author SHA1 Message Date
Anand Doshi
88e709e1f0 Merge branch 'develop' 2016-01-04 17:58:13 +05:30
Anand Doshi
988a1ab419 bumped to version 6.16.1 2016-01-04 18:28:13 +06:00
Anand Doshi
13bf123b24 [hotfix] item on web 2016-01-04 17:51:35 +05:30
Anand Doshi
22b956d33c Merge branch 'develop' 2016-01-04 16:55:20 +05:30
Anand Doshi
10be112e85 bumped to version 6.16.0 2016-01-04 17:25:20 +06:00
Anand Doshi
bb256e41d7 [translations] 2016-01-04 16:51:24 +05:30
Anand Doshi
d8b15ebaf7 Merge pull request #4572 from nabinhait/multi-currency-docs
[fix] Updated multi currency docs
2016-01-04 16:06:02 +05:30
Anand Doshi
b55dd5b284 [fix] BOM validate quantity > 0 2016-01-04 16:02:04 +05:30
Nabin Hait
cb08d576f6 Merge pull request #4571 from anandpdoshi/fix/payment-reconciliation-date
[fix] Payment Reconciliation: use the date and amount filters only for Invoice
2016-01-04 15:24:10 +05:30
Nabin Hait
9f40a252fc [fix] Updated multi currency docs 2016-01-04 15:20:37 +05:30
Anand Doshi
aee8b5bcad [fix] Purchase Receipt: Show row no. against the Rejected Warehouse mandatory error 2016-01-04 13:16:09 +05:30
Anand Doshi
f7980927a1 [fix] Payment Reconciliation: use the date and amount filters only for Invoice 2016-01-04 13:00:14 +05:30
Anand Doshi
c1e1026486 [fix] validate 'cannot change fiscal year dates' only if not new 2016-01-04 12:20:25 +05:30
Anand Doshi
7ae53657f9 Merge pull request #4565 from nabinhait/leave_docs
[docs] Leave Management
2016-01-04 12:11:00 +05:30
Anand Doshi
a6a71216a8 Merge pull request #4566 from rmehta/website-cleanup
[cleanup] [website]
2016-01-04 11:41:20 +05:30
Rushabh Mehta
51008f2abc [cleanup] [website] 2016-01-01 17:24:37 +05:30
Nabin Hait
c1e5cbb55d [docs] Leave Management 2016-01-01 17:08:57 +05:30
Nabin Hait
f41da5cfab Merge branch 'develop' 2015-12-31 16:14:17 +05:30
Nabin Hait
2d0ef63e72 bumped to version 6.15.1 2015-12-31 16:44:17 +06:00
Nabin Hait
884d4cbc48 Merge pull request #4560 from nabinhait/item_variants
[fix] Disable atrribute table in variant item record
2015-12-31 15:58:41 +05:30
Nabin Hait
9602c394dd Merge branch 'gabtzi-develop' into develop 2015-12-31 15:49:20 +05:30
Nabin Hait
51ff2658cb [fix] Minor changes in item naming 2015-12-31 15:49:00 +05:30
Nabin Hait
dd1c3ba164 Merge branch 'develop' of https://github.com/gabtzi/erpnext into gabtzi-develop 2015-12-31 15:46:15 +05:30
Nabin Hait
6b068e1367 [fix] Disable atrribute table in variant item record 2015-12-31 15:44:12 +05:30
Nabin Hait
b9dcf7f857 Merge pull request #4554 from umairsy/develop
Updated Articles
2015-12-31 15:37:46 +05:30
Nabin Hait
9ebbec5d9a Merge pull request #4558 from nabinhait/item_variants
[fix] Disable atrribute table in variant item record
2015-12-31 15:18:06 +05:30
Nabin Hait
bb9f59a051 Merge pull request #4556 from nabinhait/setup_bank
[fix] Create bank accounts from setup wizard #4546
2015-12-31 15:17:51 +05:30
Nabin Hait
f8de94b7c6 Merge pull request #4557 from nabinhait/po_fix
[fix] Update ordered qty in SO, if PO is made against SO
2015-12-31 15:17:41 +05:30
Nabin Hait
6626e32719 [fix] Disable atrribute table in variant item record 2015-12-31 14:54:57 +05:30
Rushabh Mehta
d55bdcf921 [fix] before_install returns False if setup wizard has been completed, fixes frappe/frappe#1488 2015-12-31 11:12:48 +05:30
Umair Sayyed
40a79de34d updating articles under Accounts 2015-12-30 18:27:08 +05:30
Nabin Hait
82a1561120 [fix] Create bank accounts from setup wizard #4546 2015-12-30 15:32:57 +05:30
Nabin Hait
3505de037e [fix] Update ordered qty in SO, if PO is made against SO 2015-12-30 15:03:34 +05:30
Umair Sayyed
d548ef8158 updated Articles in Customization and Accounting section 2015-12-29 16:25:26 +05:30
Umair Sayyed
3ad37363ed update artciles in customization section 2015-12-28 17:24:51 +05:30
gabtzi
d46abb49f3 Fix for Issue #4543: Suffix now uses attribute abbreviation if it exists or value for numeric attributes 2015-12-28 12:03:24 +02:00
Nabin Hait
c57517b201 Merge branch 'develop' 2015-12-28 15:09:44 +05:30
Nabin Hait
8efeea9c59 bumped to version 6.15.0 2015-12-28 15:39:43 +06:00
Nabin Hait
bf9e8cfbcc [translations] 2015-12-28 14:38:22 +05:30
gabtzi
096fc88200 Fix for Issue #4543: Improved code to check if it's a variant only once. 2015-12-28 11:07:10 +02:00
Nabin Hait
d5dedb1808 Merge pull request #4548 from nabinhait/fix1
[fix] Ignore permissions while creating fiscal year automatically
2015-12-28 14:23:01 +05:30
Nabin Hait
e50f80302a Merge pull request #4549 from saurabh6790/bin_update
[fixes] flag to identify actual qty update
2015-12-28 14:22:46 +05:30
gabtzi
9d44ac88f2 Fix for Issue #4543: Automatic item_code generation for variants when parent item is named after a Naming Series 2015-12-28 10:26:42 +02:00
Nabin Hait
892a782e59 docs 2015-12-28 13:27:41 +05:30
Saurabh
b166bcf50b [fixes] flag to trigger actual qty update 2015-12-28 13:25:35 +05:30
Nabin Hait
0e2d1bd4ed [fix] Ignore permissions while creating fiscal year automatically 2015-12-28 13:04:19 +05:30
Nabin Hait
f080003415 Merge pull request #4542 from umairsy/develop
updated Articles under Customization section
2015-12-28 12:43:18 +05:30
Nabin Hait
96e7c5a3bd Merge pull request #4541 from neilLasrado/develop
Added education as a domain in Company
2015-12-28 12:42:16 +05:30
Umair Sayyed
4bad150cf0 updated customization related articles 2015-12-24 20:40:37 +05:30
Anand Doshi
76568f0e8e [fix] log newsletter sending error 2015-12-24 15:13:54 +05:30
Neil Trini Lasrado
49febea6f5 Added education as a domain in Company 2015-12-24 15:10:35 +05:30
Rushabh Mehta
a59e1792b5 Merge pull request #4535 from nabinhait/defaults
[fix] Get defaults based on doctype or fieldname
2015-12-24 11:50:08 +05:30
Rushabh Mehta
28d6987455 Merge pull request #4537 from umairsy/develop
updated help articles  in the setup section
2015-12-24 11:47:27 +05:30
Umair Sayyed
56e19f3a8b updated articles in the setup section 2015-12-23 18:58:07 +05:30
Nabin Hait
b6b56453e1 [fix] Get defaults based on doctype or fieldname 2015-12-23 16:37:06 +05:30
Rushabh Mehta
d55d0c06e3 Merge branch 'develop' 2015-12-23 16:29:34 +05:30
Rushabh Mehta
8681a95010 bumped to version 6.14.1 2015-12-23 16:59:34 +06:00
Rushabh Mehta
1f63747916 [minor] [fix] add child in sales browser 2015-12-23 16:23:37 +05:30
Rushabh Mehta
332ec15dd7 Merge pull request #4525 from nabinhait/jv_fix_10
[fix] Validate advance entry based on party
2015-12-23 16:09:29 +05:30
Nabin Hait
6f8dafbb5e [fix] Validate advance entry based on party 2015-12-23 13:03:31 +05:30
Rushabh Mehta
d4073d50b2 Merge pull request #4530 from umairsy/develop
Updated screenshots in some articles
2015-12-23 13:01:30 +05:30
Rushabh Mehta
88bcee78a7 Merge pull request #4524 from nabinhait/jv_fix_9
[fix] Set debit/credit in company currency
2015-12-23 12:59:02 +05:30
Rushabh Mehta
cc2796e676 Merge pull request #4520 from partzsch/develop
Time Log now down to seconds
2015-12-23 12:56:44 +05:30
Umair Sayyed
dbaf6b569b Updated screenshots in some articles 2015-12-23 12:11:53 +05:30
Nabin Hait
d37cef7f60 [fix] Set debit/credit in company currency 2015-12-22 15:13:01 +05:30
Rushabh Mehta
01293bb3a3 [fix] [minor] fix available qty even if 0 2015-12-22 12:57:42 +05:30
partzsch
55ad42cfd0 Time Log now down to seconds
according to request of @anadpdoshi
new branch new commit new PR
2015-12-21 17:51:42 +01:00
Anand Doshi
381cec7b87 [fix] added Shopping Cart and Report Builder in Learn module 2015-12-21 18:56:20 +05:30
Anand Doshi
4c87497b7c Merge branch 'develop' 2015-12-21 18:34:08 +05:30
Anand Doshi
9fdf2a8bfe bumped to version 6.14.0 2015-12-21 19:04:08 +06:00
Anand Doshi
f773f1f539 [videos] added missing videos 2015-12-21 18:32:23 +05:30
Anand Doshi
7b8a224dd0 Merge pull request #4519 from umairsy/develop
video help page on report builder and shopping cart
2015-12-21 18:16:26 +05:30
Umair Sayyed
e1482f1acc video help page on report builder and shopping cart 2015-12-21 18:06:15 +05:30
Anand Doshi
c98d244af0 [change-log] 2015-12-21 17:31:09 +05:30
Anand Doshi
ee19fc0c7f [translations] + added Gujarati - Fixes frappe/translator#63 2015-12-21 17:10:20 +05:30
Anand Doshi
ee2129ce1c Merge pull request #4513 from nabinhait/discount_percentage
Additional Discount amount based on percentage
2015-12-21 16:13:17 +05:30
Anand Doshi
beed9ae4f8 Merge pull request #4510 from nabinhait/account_merge
[fix] Group account merging with sub-ordinate group
2015-12-21 16:03:19 +05:30
Anand Doshi
50ddf921be [minor] UOM message 2015-12-21 10:58:33 +05:30
Nabin Hait
3769d87240 Additional Discount amount based on percentage 2015-12-18 13:12:08 +05:30
Anand Doshi
15050e326c Merge pull request #4509 from anandpdoshi/fix/validate-total-transfer-in-material-request
[fix] Validate transfer qty cannot be greater than qty
2015-12-18 10:50:36 +05:30
Anand Doshi
0f809426d2 [fix] Validate transfer qty cannot be greater than qty 2015-12-17 22:35:03 +05:30
Nabin Hait
adab5d308c [fix] Group account merging with sub-ordinate group 2015-12-17 12:53:25 +05:30
Nabin Hait
824122c42a Merge branch 'ccfiel-develop' into develop 2015-12-17 12:20:40 +05:30
Nabin Hait
afda26e4f3 Fixed conflict 2015-12-17 12:19:58 +05:30
Chris Ian Fiel
d6d354b5c3 By: nabinhait
Depreciation account is an expense account, it is debited while booking depreciation. Thats why Depreciation amount is coming as negative, I think it should be positive and added to the "Net Profit and Loss".
2015-12-17 09:42:12 +08:00
Chris Ian Fiel
7d310bd182 Merge branch 'develop' of https://github.com/frappe/erpnext into develop 2015-12-17 09:18:24 +08:00
Nabin Hait
8b33a6cdc0 Cleanup in cash flow 2015-12-16 16:09:43 +05:30
Nabin Hait
5e173c7106 Merge branch 'develop' of https://github.com/ccfiel/erpnext into ccfiel-develop 2015-12-15 17:39:55 +05:30
Chris Ian Fiel
c80796cdd5 Cash Flow Report 2015-12-12 11:26:54 +08:00
Chris Ian Fiel
fde03453e4 Cash Flow Report 2015-12-12 10:54:56 +08:00
Chris Ian Fiel
826e18a29f Cash Flow Report 2015-12-12 10:33:01 +08:00
377 changed files with 15859 additions and 9702 deletions

View File

@@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = '6.13.1'
__version__ = '6.16.1'

View File

@@ -25,6 +25,7 @@
"oldfieldtype": "Section Break",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -46,6 +47,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -71,6 +73,7 @@
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 1,
@@ -95,6 +98,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -120,6 +124,7 @@
"options": "Company",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 1,
@@ -143,6 +148,7 @@
"options": "\nAsset\nLiability\nIncome\nExpense\nEquity",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -166,6 +172,7 @@
"options": "\nBalance Sheet\nProfit and Loss",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -191,6 +198,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -212,6 +220,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -238,6 +247,7 @@
"options": "Account",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -261,9 +271,10 @@
"no_copy": 0,
"oldfieldname": "account_type",
"oldfieldtype": "Select",
"options": "\nBank\nCash\nTax\nChargeable\nWarehouse\nReceivable\nPayable\nEquity\nFixed Asset\nCost of Goods Sold\nExpense Account\nRound Off\nIncome Account\nStock Received But Not Billed\nExpenses Included In Valuation\nStock Adjustment\nStock\nTemporary",
"options": "\nBank\nCash\nDepreciation\nTax\nChargeable\nWarehouse\nReceivable\nPayable\nEquity\nFixed Asset\nCost of Goods Sold\nExpense Account\nRound Off\nIncome Account\nStock Received But Not Billed\nExpenses Included In Valuation\nStock Adjustment\nStock\nTemporary",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -289,6 +300,7 @@
"oldfieldtype": "Currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -315,6 +327,7 @@
"options": "No\nYes",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -338,6 +351,7 @@
"options": "Warehouse",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -361,6 +375,7 @@
"options": "\nDebit\nCredit",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -383,6 +398,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -405,6 +421,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -427,6 +444,7 @@
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -445,7 +463,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2015-11-16 06:29:41.535663",
"modified": "2015-12-12 10:19:54.365839",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account",

View File

@@ -199,6 +199,10 @@ class Account(Document):
if val != [self.is_group, self.root_type, self.company]:
throw(_("""Merging is only possible if following properties are same in both records. Is Group, Root Type, Company"""))
if self.is_group and frappe.db.get_value("Account", new, "parent_account") == old:
frappe.db.set_value("Account", new, "parent_account",
frappe.db.get_value("Account", old, "parent_account"))
return new_account

View File

@@ -20,14 +20,15 @@ class FiscalYear(Document):
msgprint(_("{0} is now the default Fiscal Year. Please refresh your browser for the change to take effect.").format(self.name))
def validate(self):
year_start_end_dates = frappe.db.sql("""select year_start_date, year_end_date
from `tabFiscal Year` where name=%s""", (self.name))
self.validate_dates()
if year_start_end_dates:
if getdate(self.year_start_date) != year_start_end_dates[0][0] or getdate(self.year_end_date) != year_start_end_dates[0][1]:
frappe.throw(_("Cannot change Fiscal Year Start Date and Fiscal Year End Date once the Fiscal Year is saved."))
if not self.is_new():
year_start_end_dates = frappe.db.sql("""select year_start_date, year_end_date
from `tabFiscal Year` where name=%s""", (self.name))
if year_start_end_dates:
if getdate(self.year_start_date) != year_start_end_dates[0][0] or getdate(self.year_end_date) != year_start_end_dates[0][1]:
frappe.throw(_("Cannot change Fiscal Year Start Date and Fiscal Year End Date once the Fiscal Year is saved."))
def validate_dates(self):
if getdate(self.year_start_date) > getdate(self.year_end_date):
@@ -63,6 +64,6 @@ def auto_create_fiscal_year():
end_year = cstr(new_fy.year_end_date.year)
new_fy.year = start_year if start_year==end_year else (start_year + "-" + end_year)
new_fy.insert()
new_fy.insert(ignore_permissions=True)
except frappe.NameError:
pass

View File

@@ -347,6 +347,7 @@ frappe.ui.form.on("Journal Entry Account", {
callback: function(r) {
if(r.message) {
$.extend(d, r.message);
erpnext.journal_entry.set_debit_credit_in_company_currency(frm, dt, dn);
refresh_field('accounts');
}
}
@@ -355,11 +356,11 @@ frappe.ui.form.on("Journal Entry Account", {
},
debit_in_account_currency: function(frm, cdt, cdn) {
erpnext.journal_entry.set_debit_credit_in_company_currency(frm, cdt, cdn);
erpnext.journal_entry.set_exchange_rate(frm, cdt, cdn);
},
credit_in_account_currency: function(frm, cdt, cdn) {
erpnext.journal_entry.set_debit_credit_in_company_currency(frm, cdt, cdn);
erpnext.journal_entry.set_exchange_rate(frm, cdt, cdn);
},
debit: function(frm, dt, dn) {
@@ -368,6 +369,17 @@ frappe.ui.form.on("Journal Entry Account", {
credit: function(frm, dt, dn) {
cur_frm.cscript.update_totals(frm.doc);
},
exchange_rate: function(frm, cdt, cdn) {
var company_currency = frappe.get_doc(":Company", frm.doc.company).default_currency;
var row = locals[cdt][cdn];
if(row.account_currency == company_currency || !frm.doc.multi_currency) {
frappe.model.set_value(cdt, cdn, "exchange_rate", 1);
}
erpnext.journal_entry.set_debit_credit_in_company_currency(frm, cdt, cdn);
}
})
@@ -395,8 +407,6 @@ $.extend(erpnext.journal_entry, {
},
set_debit_credit_in_company_currency: function(frm, cdt, cdn) {
erpnext.journal_entry.set_exchange_rate(frm, cdt, cdn);
var row = locals[cdt][cdn];
frappe.model.set_value(cdt, cdn, "debit",
@@ -413,7 +423,8 @@ $.extend(erpnext.journal_entry, {
var row = locals[cdt][cdn];
if(row.account_currency == company_currency || !frm.doc.multi_currency) {
frappe.model.set_value(cdt, cdn, "exchange_rate", 1);
row.exchange_rate = 1;
erpnext.journal_entry.set_debit_credit_in_company_currency(frm, cdt, cdn);
} else if (!row.exchange_rate || row.exchange_rate == 1 || row.account_type == "Bank") {
frappe.call({
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_exchange_rate",
@@ -429,11 +440,15 @@ $.extend(erpnext.journal_entry, {
},
callback: function(r) {
if(r.message) {
frappe.model.set_value(cdt, cdn, "exchange_rate", r.message);
row.exchange_rate = r.message;
erpnext.journal_entry.set_debit_credit_in_company_currency(frm, cdt, cdn);
}
}
})
} else {
erpnext.journal_entry.set_debit_credit_in_company_currency(frm, cdt, cdn);
}
refresh_field("exchange_rate", cdn, "accounts");
},
quick_entry: function(frm) {

View File

@@ -104,6 +104,12 @@ class JournalEntry(AccountsController):
msgprint(_("Row {0}: Please check 'Is Advance' against Account {1} if this is an advance entry.").format(d.idx, d.account))
elif d.reference_type in ("Sales Order", "Purchase Order") and d.is_advance != "Yes":
frappe.throw(_("Row {0}: Payment against Sales/Purchase Order should always be marked as advance").format(d.idx))
if d.is_advance == "Yes":
if d.party_type == 'Customer' and flt(d.debit) > 0:
frappe.throw(_("Row {0}: Advance against Customer must be credit").format(d.idx))
elif d.party_type == 'Supplier' and flt(d.credit) > 0:
frappe.throw(_("Row {0}: Advance against Supplier must be debit").format(d.idx))
def validate_against_jv(self):
for d in self.get('accounts'):

View File

@@ -47,6 +47,11 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext
refresh: function() {
this.frm.disable_save();
this.toggle_primary_action();
},
onload_post_render: function() {
this.toggle_primary_action();
},
party: function() {
@@ -75,6 +80,7 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext
method: 'get_unreconciled_entries',
callback: function(r, rt) {
me.set_invoice_options();
me.toggle_primary_action();
}
});
@@ -87,10 +93,11 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext
method: 'reconcile',
callback: function(r, rt) {
me.set_invoice_options();
me.toggle_primary_action();
}
});
},
set_invoice_options: function() {
var invoices = [];
@@ -107,6 +114,20 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext
});
refresh_field("payments");
},
toggle_primary_action: function() {
if ((this.frm.doc.payments || []).length) {
this.frm.fields_dict.reconcile.$input
&& this.frm.fields_dict.reconcile.$input.addClass("btn-primary");
this.frm.fields_dict.get_unreconciled_entries.$input
&& this.frm.fields_dict.get_unreconciled_entries.$input.removeClass("btn-primary");
} else {
this.frm.fields_dict.reconcile.$input
&& this.frm.fields_dict.reconcile.$input.removeClass("btn-primary");
this.frm.fields_dict.get_unreconciled_entries.$input
&& this.frm.fields_dict.get_unreconciled_entries.$input.addClass("btn-primary");
}
}
});

View File

@@ -19,10 +19,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -41,10 +43,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Party Type",
"length": 0,
"no_copy": 0,
"options": "DocType",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -64,10 +68,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Party",
"length": 0,
"no_copy": 0,
"options": "party_type",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -86,11 +92,13 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Receivable / Payable Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -109,10 +117,12 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Bank / Cash Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -131,9 +141,11 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -151,10 +163,12 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "From Date",
"label": "From Invoice Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -172,10 +186,12 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "To Date",
"label": "To Invoice Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -193,10 +209,12 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Minimum Amount",
"label": "Minimum Invoice Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -214,10 +232,12 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Maximum Amount",
"label": "Maximum Invoice Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -236,9 +256,11 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Get Unreconciled Entries",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -257,9 +279,11 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Unreconciled Payment Details",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -278,10 +302,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Payments",
"length": 0,
"no_copy": 0,
"options": "Payment Reconciliation Payment",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -300,9 +326,11 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Reconcile",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -321,9 +349,11 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Invoice/Journal Entry Details",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -342,10 +372,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Invoices",
"length": 0,
"no_copy": 0,
"options": "Payment Reconciliation Invoice",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -357,12 +389,15 @@
"hide_heading": 0,
"hide_toolbar": 1,
"icon": "icon-resize-horizontal",
"idx": 0,
"in_create": 0,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 1,
"istable": 0,
"modified": "2015-09-21 03:41:24.672227",
"max_attachments": 0,
"menu_index": 0,
"modified": "2016-01-04 02:26:58.807921",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation",

View File

@@ -18,8 +18,6 @@ class PaymentReconciliation(Document):
dr_or_cr = "credit_in_account_currency" if self.party_type == "Customer" \
else "debit_in_account_currency"
cond = self.check_condition()
bank_account_condition = "t2.against_account like %(bank_cash_account)s" \
if self.bank_cash_account else "1=1"
@@ -34,7 +32,6 @@ class PaymentReconciliation(Document):
and t2.party_type = %(party_type)s and t2.party = %(party)s
and t2.account = %(account)s and {dr_or_cr} > 0
and (t2.reference_type is null or t2.reference_type in ('', 'Sales Order', 'Purchase Order'))
{cond}
and (CASE
WHEN t1.voucher_type in ('Debit Note', 'Credit Note')
THEN 1=1
@@ -42,7 +39,6 @@ class PaymentReconciliation(Document):
END)
""".format(**{
"dr_or_cr": dr_or_cr,
"cond": cond,
"bank_account_condition": bank_account_condition,
}), {
"party_type": self.party_type,
@@ -158,8 +154,8 @@ class PaymentReconciliation(Document):
frappe.throw(_("Please select Allocated Amount, Invoice Type and Invoice Number in atleast one row"))
def check_condition(self):
cond = " and posting_date >= {0}".format(frappe.db.escape(self.from_date)) if self.from_date else ""
cond += " and posting_date <= {0}".format(frappe.db.escape(self.to_date)) if self.to_date else ""
cond = " and posting_date >= '{0}'".format(frappe.db.escape(self.from_date)) if self.from_date else ""
cond += " and posting_date <= '{0}'".format(frappe.db.escape(self.to_date)) if self.to_date else ""
if self.party_type == "Customer":
dr_or_cr = "debit_in_account_currency"

View File

@@ -1153,6 +1153,31 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_discount_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Additional Discount Amount (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_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,
@@ -1176,6 +1201,30 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "additional_discount_percentage",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Additional Discount Percentage",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1201,31 +1250,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_discount_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Additional Discount Amount (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_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,
@@ -2463,7 +2487,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2015-12-01 00:49:02.736868",
"modified": "2015-12-17 16:18:58.177334",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice",

File diff suppressed because it is too large Load Diff

View File

@@ -66,7 +66,7 @@ frappe.pages["Accounts Browser"].on_page_load = function(wrapper){
$.each(r.message, function(i, v) {
$('<option>').html(v).attr('value', v).appendTo(wrapper.$company_select);
});
wrapper.$company_select.val(frappe.defaults.get_user_default("company") || r.message[0]).change();
wrapper.$company_select.val(frappe.defaults.get_user_default("Company") || r.message[0]).change();
}
});
}

View File

@@ -8,7 +8,7 @@ frappe.query_reports["Accounts Payable"] = {
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
"default": frappe.defaults.get_user_default("Company")
},
{
"fieldname":"supplier",

View File

@@ -8,7 +8,7 @@ frappe.query_reports["Accounts Payable Summary"] = {
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
"default": frappe.defaults.get_user_default("Company")
},
{
"fieldname":"supplier",

View File

@@ -8,7 +8,7 @@ frappe.query_reports["Accounts Receivable"] = {
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
"default": frappe.defaults.get_user_default("Company")
},
{
"fieldname":"customer",

View File

@@ -8,7 +8,7 @@ frappe.query_reports["Accounts Receivable Summary"] = {
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
"default": frappe.defaults.get_user_default("Company")
},
{
"fieldname":"customer",

View File

@@ -22,7 +22,7 @@ frappe.query_reports["Budget Variance Report"] = {
label: __("Company"),
fieldtype: "Link",
options: "Company",
default: frappe.defaults.get_user_default("company")
default: frappe.defaults.get_user_default("Company")
},
]
}

View File

@@ -0,0 +1,6 @@
// Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
frappe.require("assets/erpnext/js/financial_statements.js");
frappe.query_reports["Cash Flow"] = erpnext.financial_statements;

View File

@@ -0,0 +1,18 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2015-12-12 10:22:45.383203",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 0,
"is_standard": "Yes",
"modified": "2015-12-12 10:22:45.383203",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cash Flow",
"owner": "Administrator",
"ref_doctype": "GL Entry",
"report_name": "Cash Flow",
"report_type": "Script Report"
}

View File

@@ -0,0 +1,134 @@
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext.accounts.report.financial_statements import (get_period_list, get_columns, get_data)
from erpnext.accounts.report.profit_and_loss_statement.profit_and_loss_statement import get_net_profit_loss
def execute(filters=None):
period_list = get_period_list(filters.fiscal_year, filters.periodicity)
operation_accounts = {
"section_name": "Operations",
"section_footer": _("Net Cash from Operations"),
"section_header": _("Cash Flow from Operations"),
"account_types": [
{"account_type": "Depreciation", "label": _("Depreciation")},
{"account_type": "Receivable", "label": _("Net Change in Accounts Receivable")},
{"account_type": "Payable", "label": _("Net Change in Accounts Payable")},
{"account_type": "Warehouse", "label": _("Net Change in Inventory")}
]
}
investing_accounts = {
"section_name": "Investing",
"section_footer": _("Net Cash from Investing"),
"section_header": _("Cash Flow from Investing"),
"account_types": [
{"account_type": "Fixed Asset", "label": _("Net Change in Fixed Asset")}
]
}
financing_accounts = {
"section_name": "Financing",
"section_footer": _("Net Cash from Financing"),
"section_header": _("Cash Flow from Financing"),
"account_types": [
{"account_type": "Equity", "label": _("Net Change in Equity")}
]
}
# combine all cash flow accounts for iteration
cash_flow_accounts = []
cash_flow_accounts.append(operation_accounts)
cash_flow_accounts.append(investing_accounts)
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)
net_profit_loss = get_net_profit_loss(income, expense, period_list)
data = []
for cash_flow_account in cash_flow_accounts:
section_data = []
data.append({
"account_name": cash_flow_account['section_header'],
"parent_account": None,
"indent": 0.0,
"account": cash_flow_account['section_header']
})
if len(data) == 1:
# add first net income in operations section
if net_profit_loss:
net_profit_loss.update({
"indent": 1,
"parent_account": operation_accounts['section_header']
})
data.append(net_profit_loss)
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.update({
"account_name": account['label'],
"indent": 1,
"parent_account": cash_flow_account['section_header']
})
data.append(account_data)
section_data.append(account_data)
add_total_row_account(data, section_data, cash_flow_account['section_footer'], period_list)
add_total_row_account(data, data, _("Net Change in Cash"), period_list)
columns = get_columns(period_list)
return columns, data
def get_account_type_based_data(company, account_type, period_list):
data = {}
for period in period_list:
gl_sum = frappe.db.sql_list("""
select sum(credit) - sum(debit)
from `tabGL Entry`
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))
if gl_sum and gl_sum[0]:
amount = gl_sum[0]
if account_type == "Depreciation":
amount *= -1
else:
amount = 0
data.update({
"from_date": period['from_date'],
"to_date": period['to_date'],
period["key"]: amount
})
return data
def add_total_row_account(out, data, label, period_list):
total_row = {
"account_name": "'" + _("{0}").format(label) + "'",
"account": None
}
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)
out.append(total_row)
out.append({})

View File

@@ -257,4 +257,4 @@ def get_columns(period_list):
"width": 150
})
return columns
return columns

View File

@@ -8,7 +8,7 @@ frappe.query_reports["General Ledger"] = {
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company"),
"default": frappe.defaults.get_user_default("Company"),
"reqd": 1
},
{

View File

@@ -9,7 +9,7 @@ frappe.query_reports["Gross Profit"] = {
"fieldtype": "Link",
"options": "Company",
"reqd": 1,
"default": frappe.defaults.get_user_default("company")
"default": frappe.defaults.get_user_default("Company")
},
{
"fieldname":"from_date",

View File

@@ -33,7 +33,7 @@ frappe.query_reports["Item-wise Purchase Register"] = {
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
"default": frappe.defaults.get_user_default("Company")
}
]
}

View File

@@ -27,7 +27,7 @@ frappe.query_reports["Item-wise Sales Register"] = frappe.query_reports["Sales R
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
"default": frappe.defaults.get_user_default("Company")
}
]
}

View File

@@ -9,7 +9,7 @@ frappe.query_reports["Payment Period Based On Invoice Date"] = {
fieldtype: "Link",
options: "Company",
reqd: 1,
default: frappe.defaults.get_user_default("company")
default: frappe.defaults.get_user_default("Company")
},
{
fieldname: "from_date",

View File

@@ -27,7 +27,7 @@ frappe.query_reports["Purchase Register"] = {
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
"default": frappe.defaults.get_user_default("Company")
}
]
}

View File

@@ -27,7 +27,7 @@ frappe.query_reports["Sales Register"] = {
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company")
"default": frappe.defaults.get_user_default("Company")
}
]
}

View File

@@ -10,7 +10,7 @@ frappe.query_reports["Trial Balance"] = {
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company"),
"default": frappe.defaults.get_user_default("Company"),
"reqd": 1
},
{

View File

@@ -8,7 +8,7 @@ frappe.query_reports["Trial Balance for Party"] = {
"label": __("Company"),
"fieldtype": "Link",
"options": "Company",
"default": frappe.defaults.get_user_default("company"),
"default": frappe.defaults.get_user_default("Company"),
"reqd": 1
},
{

View File

@@ -383,7 +383,7 @@ def get_actual_expense(args):
def get_currency_precision(currency=None):
if not currency:
currency = frappe.db.get_value("Company",
frappe.db.get_default("company"), "default_currency", cache=True)
frappe.db.get_default("Company"), "default_currency", cache=True)
currency_format = frappe.db.get_value("Currency", currency, "number_format", cache=True)
from frappe.utils import get_number_format_info

View File

@@ -59,7 +59,8 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
this.frm.toggle_display("supplier_name",
(this.supplier_name && this.frm.doc.supplier_name!==this.frm.doc.supplier));
if(this.frm.doctype==="Purchase Order" || this.frm.doctype==="Material Request") {
if(this.frm.docstatus==0 &&
(this.frm.doctype==="Purchase Order" || this.frm.doctype==="Material Request")) {
this.set_from_product_bundle();
}

View File

@@ -1349,6 +1349,31 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_discount_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Additional Discount Amount (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_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,
@@ -1372,6 +1397,30 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "additional_discount_percentage",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Additional Discount Percentage",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1397,31 +1446,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_discount_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Additional Discount Amount (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_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,
@@ -2434,7 +2458,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2015-12-01 00:48:11.749313",
"modified": "2015-12-17 16:18:39.096762",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order",

View File

@@ -140,7 +140,7 @@ class PurchaseOrder(BuyingController):
clear_doctype_notifications(self)
def on_submit(self):
if self.has_drop_ship_item():
if self.is_against_so():
self.update_status_updater()
super(PurchaseOrder, self).on_submit()
@@ -157,8 +157,10 @@ class PurchaseOrder(BuyingController):
purchase_controller.update_last_purchase_rate(self, is_submit = 1)
def on_cancel(self):
if self.has_drop_ship_item():
if self.is_against_so():
self.update_status_updater()
if self.has_drop_ship_item():
self.update_delivered_qty_in_sales_order()
pc_obj = frappe.get_doc('Purchase Common')
@@ -222,13 +224,10 @@ class PurchaseOrder(BuyingController):
so.notify_update()
def has_drop_ship_item(self):
is_drop_ship = False
for item in self.items:
if item.delivered_by_supplier == 1:
is_drop_ship = True
return is_drop_ship
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"])
def set_received_qty_for_drop_ship_items(self):
for item in self.items:

View File

@@ -1080,6 +1080,31 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_discount_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Additional Discount Amount (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_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,
@@ -1103,6 +1128,30 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "additional_discount_percentage",
"fieldtype": "Float",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Additional Discount Percentage",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -1128,31 +1177,6 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "base_discount_amount",
"fieldtype": "Currency",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Additional Discount Amount (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_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,
@@ -1690,7 +1714,7 @@
"istable": 0,
"max_attachments": 0,
"menu_index": 0,
"modified": "2015-12-01 00:48:50.969833",
"modified": "2015-12-17 16:18:29.855942",
"modified_by": "Administrator",
"module": "Buying",
"name": "Supplier Quotation",

View File

@@ -0,0 +1,7 @@
- **Cash Flow Report**
- Thank you [Chris Ian Fiel](https://discuss.erpnext.com/users/ccfiel/activity) for this much needed report!
- You can access this report from *Accounts > Main Reports > Cash Flow*
- **Additional Discount Percentage**
- Enter a percentage value to calculate Additional Discount Amount
- Apply such a discount in the POS screen
- Available in all Selling and Buying transactions

View File

@@ -229,6 +229,12 @@ def get_data():
"doctype": "GL Entry",
"is_query_report": True
},
{
"type": "report",
"name": "Cash Flow",
"doctype": "GL Entry",
"is_query_report": True
},
{
"type": "report",
"name": "Profit and Loss Statement",

View File

@@ -21,6 +21,11 @@ def get_data():
"label": _("Customizing Forms"),
"youtube_id": "pJhL9mmxV_U"
},
{
"type": "help",
"label": _("Report Builder"),
"youtube_id": "y0o5iYZOioU"
},
]
},
@@ -57,6 +62,16 @@ def get_data():
"label": _("Workflow"),
"youtube_id": "yObJUg9FxFs"
},
{
"type": "help",
"label": _("Email Account"),
"youtube_id": "YFYe0DrB95o"
},
{
"type": "help",
"label": _("File Manager"),
"youtube_id": "4-osLW3E_Rk"
},
]
},
{
@@ -76,7 +91,12 @@ def get_data():
"type": "help",
"label": _("Opening Accounting Balance"),
"youtube_id": "kdgM20Q-q68"
}
},
{
"type": "help",
"label": _("Advance Payments"),
"youtube_id": "J46-6qtyZ9U"
},
]
},
{
@@ -111,7 +131,17 @@ def get_data():
"type": "help",
"label": _("Point-of-Sale"),
"youtube_id": "4WkelWkbP_c"
}
},
{
"type": "help",
"label": _("Product Bundle"),
"youtube_id": "yk-7kPrRyRRc"
},
{
"type": "help",
"label": _("Drop Ship"),
"youtube_id": "hUc0hu_XLdo"
},
]
},
{
@@ -152,6 +182,11 @@ def get_data():
"label": _("Managing Subcontracting"),
"youtube_id": "ThiMCC2DtKo"
},
{
"type": "help",
"label": _("Quality Inspection"),
"youtube_id": "WmtcF3Y40Fs"
},
]
},
{
@@ -235,4 +270,19 @@ def get_data():
},
]
},
{
"label": _("Website"),
"items": [
{
"type": "help",
"label": _("Publish Items on Website"),
"youtube_id": "W31LBBNzbgc"
},
{
"type": "help",
"label": _("Shopping Cart"),
"youtube_id": "xkrYO-KFukM"
},
]
},
]

View File

@@ -12,7 +12,7 @@ class InvalidItemAttributeValueError(frappe.ValidationError): pass
class ItemTemplateCannotHaveStock(frappe.ValidationError): pass
@frappe.whitelist()
def get_variant(item, args):
def get_variant(template, args, variant=None):
"""Validates Attributes and their Values, then looks for an exactly matching Item Variant
:param item: Template Item
@@ -24,9 +24,9 @@ def get_variant(item, args):
if not args:
frappe.throw(_("Please specify at least one attribute in the Attributes table"))
validate_item_variant_attributes(item, args)
validate_item_variant_attributes(template, args)
return find_variant(item, args)
return find_variant(template, args, variant)
def validate_item_variant_attributes(item, args):
attribute_values = {}
@@ -65,7 +65,7 @@ def validate_item_variant_attributes(item, args):
frappe.throw(_("Value {0} for Attribute {1} does not exist in the list of valid Item Attribute Values").format(
value, attribute))
def find_variant(item, args):
def find_variant(template, args, variant_item_code=None):
conditions = ["""(iv_attribute.attribute="{0}" and iv_attribute.attribute_value="{1}")"""\
.format(frappe.db.escape(key), frappe.db.escape(cstr(value))) for key, value in args.items()]
@@ -79,8 +79,8 @@ def find_variant(item, args):
where variant_of=%s and exists (
select name from `tabItem Variant Attribute` iv_attribute
where iv_attribute.parent=item.name
and ({conditions})
)""".format(conditions=conditions), item)
and ({conditions}) and parent != %s
)""".format(conditions=conditions), (template, cstr(variant_item_code)))
for variant in possible_variants:
variant = frappe.get_doc("Item", variant)

View File

@@ -4,7 +4,7 @@
from __future__ import unicode_literals
import json
import frappe
from frappe import _
from frappe import _, scrub
from frappe.utils import cint, flt, rounded
from erpnext.setup.utils import get_company_currency
from erpnext.controllers.accounts_controller import validate_conversion_rate, \
@@ -20,6 +20,7 @@ class calculate_taxes_and_totals(object):
self._calculate()
if self.doc.meta.get_field("discount_amount"):
self.set_discount_amount()
self.apply_discount_amount()
if self.doc.doctype in ["Sales Invoice", "Purchase Invoice"]:
@@ -325,6 +326,11 @@ class calculate_taxes_and_totals(object):
def _cleanup(self):
for tax in self.doc.get("taxes"):
tax.item_wise_tax_detail = json.dumps(tax.item_wise_tax_detail, separators=(',', ':'))
def set_discount_amount(self):
if not self.doc.discount_amount and self.doc.additional_discount_percentage:
self.doc.discount_amount = flt(flt(self.doc.get(scrub(self.doc.apply_discount_on)))
* self.doc.additional_discount_percentage / 100, self.doc.precision("discount_amount"))
def apply_discount_amount(self):
if self.doc.discount_amount:

View File

@@ -90,7 +90,7 @@ def _make_customer(source_name, target_doc=None, ignore_permissions=False):
target.customer_type = "Individual"
target.customer_name = source.lead_name
target.customer_group = frappe.db.get_default("customer_group")
target.customer_group = frappe.db.get_default("Customer Group")
doclist = get_mapped_doc("Lead", source_name,
{"Lead": {

View File

@@ -121,7 +121,7 @@ def create_lead(email_id):
"lead_name": real_name or email_id,
"status": "Lead",
"naming_series": get_default_naming_series("Lead"),
"company": frappe.db.get_default("company"),
"company": frappe.db.get_default("Company"),
"source": "Email"
})
lead.insert()

View File

@@ -29,8 +29,8 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
if(!this.frm.doc.status)
set_multiple(cdt, cdn, { status:'Draft' });
if(!this.frm.doc.company && frappe.defaults.get_user_default("company"))
set_multiple(cdt, cdn, { company:frappe.defaults.get_user_default("company") });
if(!this.frm.doc.company && frappe.defaults.get_user_default("Company"))
set_multiple(cdt, cdn, { company:frappe.defaults.get_user_default("Company") });
if(!this.frm.doc.fiscal_year && sys_defaults.fiscal_year)
set_multiple(cdt, cdn, { fiscal_year:sys_defaults.fiscal_year });

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 KiB

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Some files were not shown because too many files have changed in this diff Show More