Compare commits

...

887 Commits

Author SHA1 Message Date
Anand Doshi
cf3da35d67 Merge branch 'develop' 2015-12-15 17:33:02 +05:30
Anand Doshi
a17ddcfe89 bumped to version 6.13.0 2015-12-15 18:03:01 +06:00
Anand Doshi
088826f6f0 [change-log] 2015-12-15 17:28:34 +05:30
Anand Doshi
f89eaa96d1 [docs] Fixed heading and added attribution to 'CWT Connector & Wire Technology GmbH' for german docs 2015-12-15 17:22:15 +05:30
Martin Ender
e526cfe7ec Update concepts-and-terms.md 2015-12-15 17:22:15 +05:30
Martin Ender
21c189184d Update concepts-and-terms.md 2015-12-15 17:22:15 +05:30
Martin Ender
2aaebdbe11 Update concepts-and-terms.md 2015-12-15 17:22:14 +05:30
Martin Ender
cda3174a57 Update concepts-and-terms.md 2015-12-15 17:22:14 +05:30
Martin Ender
91eeb76f7b Update concepts-and-terms.md 2015-12-15 17:22:14 +05:30
Martin Ender
df18c29fb7 Update concepts-and-terms.md 2015-12-15 17:22:14 +05:30
Martin Ender
7aebb39003 Update implementation-strategy.md 2015-12-15 17:22:14 +05:30
Martin Ender
91bb25d0c9 Update implementation-strategy.md 2015-12-15 17:22:14 +05:30
Martin Ender
b89d7eb558 Update implementation-strategy.md 2015-12-15 17:22:14 +05:30
Martin Ender
ba004aab83 Update the-champion.md 2015-12-15 17:22:14 +05:30
Martin Ender
4c3762989b Update the-champion.md 2015-12-15 17:22:14 +05:30
Martin Ender
225b907a03 Update getting-started-with-erpnext.md 2015-12-15 17:22:14 +05:30
Martin Ender
b543861cbe Update getting-started-with-erpnext.md 2015-12-15 17:22:14 +05:30
Martin Ender
fc6595b92b Update getting-started-with-erpnext.md 2015-12-15 17:22:14 +05:30
Martin Ender
d11df3645b Update getting-started-with-erpnext.md 2015-12-15 17:22:13 +05:30
Martin Ender
ea4c83dcb3 Update open-source.md 2015-12-15 17:22:13 +05:30
Martin Ender
3d05635d7a Update open-source.md 2015-12-15 17:22:13 +05:30
Martin Ender
90b0db2d18 Update open-source.md 2015-12-15 17:22:13 +05:30
Martin Ender
91a71d4f2c Update open-source.md 2015-12-15 17:22:13 +05:30
Martin Ender
36ab7f01b4 Update do-i-need-an-erp.md 2015-12-15 17:22:13 +05:30
Martin Ender
130dd2da61 Update do-i-need-an-erp.md 2015-12-15 17:22:13 +05:30
Martin Ender
6d15d36639 Update do-i-need-an-erp.md 2015-12-15 17:22:13 +05:30
Martin Ender
4395d0bc4d Update do-i-need-an-erp.md 2015-12-15 17:22:13 +05:30
Martin Ender
6e4e2152af Update print-format.md 2015-12-15 17:22:13 +05:30
Martin Ender
fc5d5d1600 Create print-format.md 2015-12-15 17:22:13 +05:30
Martin Ender
180d7e9ceb Create hiding-modules-and-features.md 2015-12-15 17:22:12 +05:30
Martin Ender
7be281e712 Create document-title.md 2015-12-15 17:22:12 +05:30
Martin Ender
9d5f4f729e Update customize-form.md 2015-12-15 17:22:12 +05:30
Martin Ender
b68087d690 Update customize-form.md 2015-12-15 17:22:12 +05:30
Martin Ender
a970e72819 Create customize-form.md 2015-12-15 17:22:12 +05:30
Martin Ender
4d0c5a51c9 Create custom-button.md 2015-12-15 17:22:12 +05:30
Martin Ender
41e1eb6af7 Create update-field-based-on-value-in-other-date-field.md 2015-12-15 17:22:12 +05:30
Martin Ender
1761004bd5 Create sales-invoice-id-based-on-sales-order-id.md 2015-12-15 17:22:12 +05:30
Martin Ender
c8fc5a2048 Create restrict-user-based-on-child-record.md 2015-12-15 17:22:12 +05:30
Martin Ender
9b639b82cf Create restrict-purpose-of-stock-entry.md 2015-12-15 17:22:12 +05:30
Martin Ender
314fa2bdad Create restrict-cancel-rights.md 2015-12-15 17:22:12 +05:30
Martin Ender
bff501c401 Create make-read-only-after-saving.md 2015-12-15 17:22:12 +05:30
Martin Ender
89d64f5b12 Update generate-code-based-on-custom-logic.md 2015-12-15 17:22:11 +05:30
Martin Ender
670269f85c Create generate-code-based-on-custom-logic.md 2015-12-15 17:22:11 +05:30
Martin Ender
38a15ab4fc Update date-validation.md 2015-12-15 17:22:11 +05:30
Martin Ender
8dfb35bb79 Create date-validation.md 2015-12-15 17:22:11 +05:30
Martin Ender
20e97c9dbc Create index.txt 2015-12-15 17:22:11 +05:30
Martin Ender
909f6da868 Create index.md 2015-12-15 17:22:11 +05:30
Martin Ender
0ffc350f57 Create custom-script-fetch-values-from-master.md 2015-12-15 17:22:11 +05:30
Martin Ender
fea9357741 Update index.md 2015-12-15 17:22:11 +05:30
Martin Ender
2fbc3b7259 Create index.txt 2015-12-15 17:22:11 +05:30
Martin Ender
f99923dc08 Create index.md 2015-12-15 17:22:11 +05:30
Martin Ender
d5781b5de8 Create custom-doctype.md 2015-12-15 17:22:11 +05:30
Martin Ender
81adb7dec9 Create custom-field.md 2015-12-15 17:22:10 +05:30
Martin Ender
46d4ba904a Create index.txt 2015-12-15 17:22:10 +05:30
Martin Ender
8c48c36be6 Create index.md 2015-12-15 17:22:10 +05:30
Martin Ender
f52b3090a9 Create tags.md 2015-12-15 17:22:10 +05:30
Martin Ender
e8703298ed Update assignment.md 2015-12-15 17:22:10 +05:30
Martin Ender
98eba6b9ba Create assignment.md 2015-12-15 17:22:10 +05:30
Martin Ender
34dc5bc812 Create calendar.md 2015-12-15 17:22:10 +05:30
Martin Ender
ba9b85c1a6 Update notes.md 2015-12-15 17:22:10 +05:30
Martin Ender
4eefd2218a Create notes.md 2015-12-15 17:22:10 +05:30
Martin Ender
d58d56f4d4 Create messages.md 2015-12-15 17:22:10 +05:30
Martin Ender
1d7d055d16 Create collaborating-around-forms.md 2015-12-15 17:22:09 +05:30
Martin Ender
2e7dca8693 Create to-do.md 2015-12-15 17:22:09 +05:30
Martin Ender
746e21f283 Create index.txt 2015-12-15 17:22:09 +05:30
Martin Ender
60eed43269 Create index.md 2015-12-15 17:22:09 +05:30
Martin Ender
b2b7d91010 Create social-login-keys.md 2015-12-15 17:22:09 +05:30
Martin Ender
1641f0815e Create website-settings.md 2015-12-15 17:22:09 +05:30
Martin Ender
e3f4b6ce6f Create index.txt 2015-12-15 17:22:09 +05:30
Martin Ender
7a6ec814b9 Create index.md 2015-12-15 17:22:09 +05:30
Martin Ender
4325a8c82f Create blogger.md 2015-12-15 17:22:09 +05:30
Martin Ender
6bff33b949 Create web-form.md 2015-12-15 17:22:09 +05:30
Martin Ender
99c244c834 Create blog-post.md 2015-12-15 17:22:08 +05:30
Martin Ender
838db977fe Create web-page.md 2015-12-15 17:22:08 +05:30
Martin Ender
837b656c45 Create index.txt 2015-12-15 17:22:08 +05:30
Martin Ender
7641a957eb Create index.md 2015-12-15 17:22:08 +05:30
Martin Ender
f8a383b339 Create issues.md 2015-12-15 17:22:08 +05:30
Martin Ender
d144bfe2ca Create sign-up.md 2015-12-15 17:22:08 +05:30
Martin Ender
b5edc6676e Update portal-login.md 2015-12-15 17:22:08 +05:30
Martin Ender
f72a1eb782 Create portal-login.md 2015-12-15 17:22:08 +05:30
Martin Ender
a574979ebc Create customer-orders-invoices-and-shipping.md 2015-12-15 17:22:08 +05:30
Martin Ender
49b3c0c064 Create index.txt 2015-12-15 17:22:08 +05:30
Martin Ender
d32a43c39f Create index.md 2015-12-15 17:22:08 +05:30
Martin Ender
3162f31fd8 Create holyday-list.md 2015-12-15 17:22:08 +05:30
Martin Ender
952c336f70 Create leave-type.md 2015-12-15 17:22:07 +05:30
Martin Ender
2f6a29b060 Update leave-allocation.md 2015-12-15 17:22:07 +05:30
Martin Ender
55e467dc20 Create leave-allocation.md 2015-12-15 17:22:07 +05:30
Martin Ender
df5aa98d00 Create deduction-type.md 2015-12-15 17:22:07 +05:30
Martin Ender
ffa18f4dc8 Create earning-type.md 2015-12-15 17:22:07 +05:30
Martin Ender
cea952c1c4 Create designation.md 2015-12-15 17:22:07 +05:30
Martin Ender
92a3aa9fad Update branch.md 2015-12-15 17:22:07 +05:30
Martin Ender
3b7f626c0b Update branch.md 2015-12-15 17:22:07 +05:30
Martin Ender
8d71597c03 Update branch.md 2015-12-15 17:22:07 +05:30
Martin Ender
786779fd5c Create department.md 2015-12-15 17:22:07 +05:30
Martin Ender
0c30c9cccb Update branch.md 2015-12-15 17:22:07 +05:30
Martin Ender
6479f0e82a Update and rename department.md to branch.md 2015-12-15 17:22:07 +05:30
Martin Ender
f8da1ff59f Create department.md 2015-12-15 17:22:06 +05:30
Martin Ender
043ab0c47e Create employment-type.md 2015-12-15 17:22:06 +05:30
Martin Ender
6e982264db Update hr-settings.md 2015-12-15 17:22:06 +05:30
Martin Ender
ed9f8de78c Create hr-settings.md 2015-12-15 17:22:06 +05:30
Martin Ender
80f1fc4fcb Create index.txt 2015-12-15 17:22:06 +05:30
Martin Ender
c26b090c72 Create index.md 2015-12-15 17:22:06 +05:30
Martin Ender
a637010af1 Create human-resources-report.md 2015-12-15 17:22:06 +05:30
Martin Ender
108c1f8783 Create leave-allocation-tool.md 2015-12-15 17:22:06 +05:30
Martin Ender
cfb0b3d371 Create upload-attendance.md 2015-12-15 17:22:06 +05:30
Martin Ender
e1a3b369e8 Create index.txt 2015-12-15 17:22:06 +05:30
Martin Ender
f0f54d53f4 Create index.md 2015-12-15 17:22:06 +05:30
Martin Ender
fdf61e40f3 Create offer-letter.md 2015-12-15 17:22:06 +05:30
Martin Ender
9a12221d72 Create job-opening.md 2015-12-15 17:22:05 +05:30
Martin Ender
6bea8c7bc2 Create job-applicant.md 2015-12-15 17:22:05 +05:30
Martin Ender
7bfba0fb0e Create appraisal.md 2015-12-15 17:22:05 +05:30
Martin Ender
15597d7f60 Update salary-and-payroll.md 2015-12-15 17:22:05 +05:30
Martin Ender
19fb4f231d Create salary-and-payroll.md 2015-12-15 17:22:05 +05:30
Martin Ender
fc70f4c9e8 Update attendance.md 2015-12-15 17:22:05 +05:30
Martin Ender
b0fc040dcc Create attendance.md 2015-12-15 17:22:05 +05:30
Martin Ender
26018adff4 Create expense-claim.md 2015-12-15 17:22:05 +05:30
Martin Ender
73933c1195 Create leave-application.md 2015-12-15 17:22:05 +05:30
Martin Ender
1d3d0ed595 Create employee.md 2015-12-15 17:22:05 +05:30
Martin Ender
9d80e47d27 Create index.txt 2015-12-15 17:22:05 +05:30
Martin Ender
f2fc91b73e Create index.md 2015-12-15 17:22:04 +05:30
Martin Ender
b77eb6d383 Create maintenance-schedule.md 2015-12-15 17:22:04 +05:30
Martin Ender
6ced0da90b Create maintenance-visit.md 2015-12-15 17:22:04 +05:30
Martin Ender
6aaec8e874 Create warranty-claim.md 2015-12-15 17:22:04 +05:30
Martin Ender
e4ba4d0efd Update issue.md 2015-12-15 17:22:04 +05:30
Martin Ender
acef1eaa9d Create issue.md 2015-12-15 17:22:04 +05:30
Martin Ender
75960296c9 Create index.txt 2015-12-15 17:22:04 +05:30
Martin Ender
924b9c1763 Update index.md 2015-12-15 17:22:04 +05:30
Martin Ender
92f2771ae2 Create index.md 2015-12-15 17:22:04 +05:30
Martin Ender
88a2580ec5 Create activity-cost.md 2015-12-15 17:22:04 +05:30
Martin Ender
95a2e2f5e4 Create activity-type.md 2015-12-15 17:22:04 +05:30
Martin Ender
90f44ba6ac Create time-log-batch.md 2015-12-15 17:22:04 +05:30
Martin Ender
b32d97f071 Create time-log.md 2015-12-15 17:22:03 +05:30
Martin Ender
8cb9cfdb81 Create project.md 2015-12-15 17:22:03 +05:30
Martin Ender
44420e4df7 Create tasks.md 2015-12-15 17:22:03 +05:30
Martin Ender
55bd4f7d06 Create index.txt 2015-12-15 17:22:03 +05:30
Martin Ender
1d1e03b792 Create index.md 2015-12-15 17:22:03 +05:30
Martin Ender
bb4fcd9438 Create manufacturing-settings.md 2015-12-15 17:22:03 +05:30
Martin Ender
b61345c040 Create index.md 2015-12-15 17:22:03 +05:30
Martin Ender
1827c3bc5f Create index.txt 2015-12-15 17:22:03 +05:30
Martin Ender
e65df29aed Update bom-replace-tool.md 2015-12-15 17:22:03 +05:30
Martin Ender
c9588f5aa3 Create bom-replace-tool.md 2015-12-15 17:22:03 +05:30
Martin Ender
6a2a290194 Create production-planning-tool.md 2015-12-15 17:22:03 +05:30
Martin Ender
8c95b5492c Create index.txt 2015-12-15 17:22:02 +05:30
Martin Ender
3cf31eaefe Create index.md 2015-12-15 17:22:02 +05:30
Martin Ender
0349c8e96d Create subcontracting.md 2015-12-15 17:22:02 +05:30
Martin Ender
666b63aa5e Create operation.md 2015-12-15 17:22:02 +05:30
Martin Ender
16fca942bb Create workstation.md 2015-12-15 17:22:02 +05:30
Martin Ender
bf5f7425bb Create production-order.md 2015-12-15 17:22:02 +05:30
Martin Ender
a165451b84 Create bill-of-materials.md 2015-12-15 17:22:02 +05:30
Martin Ender
5f7ac05af3 Create introduction.md 2015-12-15 17:22:02 +05:30
Martin Ender
afc9afa01f Create index.txt 2015-12-15 17:22:02 +05:30
Martin Ender
fe032bfb6f Create index.md 2015-12-15 17:22:02 +05:30
Martin Ender
71f5792f02 Create supplier-type.md 2015-12-15 17:22:02 +05:30
Martin Ender
0c70bd4b10 Create buying-settings.md 2015-12-15 17:22:02 +05:30
Martin Ender
f8ee7e12ef Create index.txt 2015-12-15 17:22:01 +05:30
Martin Ender
f8a93b6cb1 Create index.md 2015-12-15 17:22:01 +05:30
Martin Ender
612ec6c289 Create purchase-order.md 2015-12-15 17:22:01 +05:30
Martin Ender
2fe811695c Create supplier-quotation.md 2015-12-15 17:22:01 +05:30
Martin Ender
3cedb81670 Create supplier.md 2015-12-15 17:22:01 +05:30
Martin Ender
393afdaa1f Create index.md 2015-12-15 17:22:01 +05:30
Martin Ender
80b1ff7744 Create index.txt 2015-12-15 17:22:01 +05:30
Martin Ender
0689d27072 Create sales-return.md 2015-12-15 17:22:01 +05:30
Martin Ender
e44372ca6b Create purchase-return.md 2015-12-15 17:22:01 +05:30
Martin Ender
a94073d37d Create item-attribute.md 2015-12-15 17:22:01 +05:30
Martin Ender
5d9a9473d3 Create item-group.md 2015-12-15 17:22:01 +05:30
Martin Ender
6854d66cdc Create stock-settings.md 2015-12-15 17:22:00 +05:30
Martin Ender
29675f8bbd Create index.txt 2015-12-15 17:22:00 +05:30
Martin Ender
2ffb4a7a8d Create index.md 2015-12-15 17:22:00 +05:30
Martin Ender
692e465829 Create uom-replacement-tool.md 2015-12-15 17:22:00 +05:30
Martin Ender
eaed755e0f Create landed-cost-voucher.md 2015-12-15 17:22:00 +05:30
Martin Ender
f32d3716b8 Create quality-inspection.md 2015-12-15 17:22:00 +05:30
Martin Ender
e493a9252b Update packing-slip.md 2015-12-15 17:22:00 +05:30
Martin Ender
e005662cf0 Create packing-slip.md 2015-12-15 17:22:00 +05:30
Martin Ender
e83697c21c Create index.txt 2015-12-15 17:22:00 +05:30
Martin Ender
c3c654c672 Create index.md 2015-12-15 17:22:00 +05:30
Martin Ender
c6a445fa8e Update migrate-to-perpetual-inventory.md 2015-12-15 17:22:00 +05:30
Martin Ender
6ebf5b0bbb Create migrate-to-perpetual-inventory.md 2015-12-15 17:22:00 +05:30
Martin Ender
668ea8a161 Update perpetual-inventory.md 2015-12-15 17:21:59 +05:30
Martin Ender
49c58975d9 Update perpetual-inventory.md 2015-12-15 17:21:59 +05:30
Martin Ender
3d9ef3202e Update perpetual-inventory.md 2015-12-15 17:21:59 +05:30
Martin Ender
4dd13fd81e Update perpetual-inventory.md 2015-12-15 17:21:59 +05:30
Martin Ender
edc5a79fbf Update perpetual-inventory.md 2015-12-15 17:21:59 +05:30
Martin Ender
a3bb3cded0 Update perpetual-inventory.md 2015-12-15 17:21:59 +05:30
Martin Ender
c8e88f5bba Update perpetual-inventory.md 2015-12-15 17:21:59 +05:30
Martin Ender
c4ffa9ceb0 Update perpetual-inventory.md 2015-12-15 17:21:59 +05:30
Martin Ender
b8834c3c1c Update perpetual-inventory.md 2015-12-15 17:21:59 +05:30
Martin Ender
c384bc8045 Create perpetual-inventory.md 2015-12-15 17:21:59 +05:30
Martin Ender
9d0e4c841b Create index.txt 2015-12-15 17:21:59 +05:30
Martin Ender
3097e73e5a Create index.md 2015-12-15 17:21:59 +05:30
Martin Ender
eec101dffb Create projected-quantity.md 2015-12-15 17:21:58 +05:30
Martin Ender
40e5b0589a Create batch.md 2015-12-15 17:21:58 +05:30
Martin Ender
ee343c8c77 Create serial-no.md 2015-12-15 17:21:58 +05:30
Martin Ender
079ac113fb Create warehouse.md 2015-12-15 17:21:58 +05:30
Martin Ender
285ec76130 Delete article-variants.mg 2015-12-15 17:21:58 +05:30
Martin Ender
e1eb761807 Create article-variants.md 2015-12-15 17:21:58 +05:30
Martin Ender
ae8974b627 Create article-variants.mg 2015-12-15 17:21:58 +05:30
Martin Ender
ea18cc464a Create article-coding.md 2015-12-15 17:21:58 +05:30
Martin Ender
064da78734 Create index.txt 2015-12-15 17:21:58 +05:30
Martin Ender
c87dc4771c Create index.md 2015-12-15 17:21:58 +05:30
Martin Ender
c5aede5b4c Create installation-note.md 2015-12-15 17:21:58 +05:30
Martin Ender
d8785dde0c Create purchase-receipt.md 2015-12-15 17:21:58 +05:30
Martin Ender
669e4df639 Create delivery-note.md 2015-12-15 17:21:57 +05:30
Martin Ender
e7894fab39 Create stock-entry.md 2015-12-15 17:21:57 +05:30
Martin Ender
f8be4394dc Create material-request.md 2015-12-15 17:21:57 +05:30
Martin Ender
384f620c9d Create index.txt 2015-12-15 17:21:57 +05:30
Martin Ender
ba0ae97fdf Create index.md 2015-12-15 17:21:57 +05:30
Martin Ender
a95a189592 Update product-bundle.md 2015-12-15 17:21:57 +05:30
Martin Ender
5ede3a8a6f Create product-bundle.md 2015-12-15 17:21:57 +05:30
Martin Ender
49e8628627 Create shipping-rule.md 2015-12-15 17:21:57 +05:30
Martin Ender
05521ee102 Create sales-partner.md 2015-12-15 17:21:57 +05:30
Martin Ender
11e9c18b51 Update selling-settings.md 2015-12-15 17:21:57 +05:30
Martin Ender
5fcb3d7775 Update selling-settings.md 2015-12-15 17:21:57 +05:30
Martin Ender
84226006dd Create selling-settings.md 2015-12-15 17:21:56 +05:30
Martin Ender
4fc998d0f9 Create index.txt 2015-12-15 17:21:56 +05:30
Martin Ender
938b9b2097 Create index.md 2015-12-15 17:21:56 +05:30
Martin Ender
61c2d88781 Create sales-order.md 2015-12-15 17:21:56 +05:30
Martin Ender
fdba12d355 Update quotation.md 2015-12-15 17:21:56 +05:30
Martin Ender
8e1014565e Create quotation.md 2015-12-15 17:21:56 +05:30
Martin Ender
040c565a44 Create index.txt 2015-12-15 17:21:56 +05:30
Martin Ender
54f7616cf8 Create index.md 2015-12-15 17:21:56 +05:30
Martin Ender
b27f2dc012 Create tax-rule.md 2015-12-15 17:21:56 +05:30
Martin Ender
7bf3d908ba Create account-settings.md 2015-12-15 17:21:56 +05:30
Martin Ender
17caf1f6e5 Create cost-center.md 2015-12-15 17:21:56 +05:30
Martin Ender
b1c5f385bf Create fiscal-year.md 2015-12-15 17:21:56 +05:30
Martin Ender
457cfb7b60 Create index.txt 2015-12-15 17:21:55 +05:30
Martin Ender
46e0166d1f Create index.md 2015-12-15 17:21:55 +05:30
Martin Ender
0b55567b44 Create payment-tool.md 2015-12-15 17:21:55 +05:30
Martin Ender
f3ca6d0ac3 Create period-closing-voucher.md 2015-12-15 17:21:55 +05:30
Martin Ender
06ff0e42d9 Create payment-reconciliation.md 2015-12-15 17:21:55 +05:30
Martin Ender
1727bdb2b8 Create bank-reconciliation.md 2015-12-15 17:21:55 +05:30
Martin Ender
80300b321d Create index.md 2015-12-15 17:21:55 +05:30
Martin Ender
5c8c606b50 Create index.txt 2015-12-15 17:21:55 +05:30
Martin Ender
7b8e9a39e7 Update multi-currency-accounting.md 2015-12-15 17:21:55 +05:30
Martin Ender
054d63c94e Create multi-currency-accounting.md 2015-12-15 17:21:55 +05:30
Martin Ender
4deb7aaea2 Create point-of-sales-invoice.md 2015-12-15 17:21:55 +05:30
Martin Ender
f146046845 Create item-wise-tax.md 2015-12-15 17:21:55 +05:30
Martin Ender
f8942dd060 Update opening-accounts.md 2015-12-15 17:21:54 +05:30
Martin Ender
ee1f66bc86 Create opening-accounts.md 2015-12-15 17:21:54 +05:30
Martin Ender
ae77cb4959 Create budgeting.md 2015-12-15 17:21:54 +05:30
Martin Ender
6ba0f7bf75 Create accounting-entries.md 2015-12-15 17:21:54 +05:30
Martin Ender
3e2ebe5972 Update accounting-reports.md 2015-12-15 17:21:54 +05:30
Martin Ender
5f2f82de56 Create accounting-reports.md 2015-12-15 17:21:54 +05:30
Martin Ender
9d0d426ed6 Update opening-entry.md 2015-12-15 17:21:54 +05:30
Martin Ender
d7ea4ec2b6 Create opening-entry.md 2015-12-15 17:21:54 +05:30
Martin Ender
4d35ef149f Create credit-limit.md 2015-12-15 17:21:54 +05:30
Martin Ender
34fe511260 Create advance-payment-entry.md 2015-12-15 17:21:54 +05:30
Martin Ender
03a3d5089c Create making-payments.md 2015-12-15 17:21:54 +05:30
Martin Ender
8af11201d9 Update chart-of-accounts.md 2015-12-15 17:21:54 +05:30
Martin Ender
cd35d45628 Create chart-of-accounts.md 2015-12-15 17:21:53 +05:30
Martin Ender
dd09f67e75 Create purchase-invoice.md 2015-12-15 17:21:53 +05:30
Martin Ender
a51c4403a5 Update sales-invoice.md 2015-12-15 17:21:53 +05:30
Martin Ender
5656c6e969 Create sales-invoice.md 2015-12-15 17:21:53 +05:30
Martin Ender
635528e186 Create journal-entry.md 2015-12-15 17:21:53 +05:30
Martin Ender
49e39f0cde Create index.md 2015-12-15 17:21:53 +05:30
Martin Ender
e9784d1280 Create index.txt 2015-12-15 17:21:53 +05:30
Martin Ender
82e3e08650 Create sales-person.md 2015-12-15 17:21:53 +05:30
Martin Ender
721de2629e Create customer-group.md 2015-12-15 17:21:53 +05:30
Martin Ender
19d627c51f Create campaign.md 2015-12-15 17:21:53 +05:30
Martin Ender
a1d129f836 Create index.txt 2015-12-15 17:21:53 +05:30
Martin Ender
79f52a54ef Create index.md 2015-12-15 17:21:52 +05:30
Martin Ender
92091ce22d Create newsletter.md 2015-12-15 17:21:52 +05:30
Martin Ender
019196894c Create contact.md 2015-12-15 17:21:52 +05:30
Martin Ender
fbce19b2c6 Create opportunity.md 2015-12-15 17:21:52 +05:30
Martin Ender
84a9b6c816 Create customer.md 2015-12-15 17:21:52 +05:30
Martin Ender
aeb0934da0 Create lead.md 2015-12-15 17:21:52 +05:30
Martin Ender
347a580883 Create index.md 2015-12-15 17:21:52 +05:30
Martin Ender
2891c5ebca Create index.txt 2015-12-15 17:21:52 +05:30
Martin Ender
fc1bb3ee1d Create company-setup.md 2015-12-15 17:21:52 +05:30
Martin Ender
bd194a9fb7 Create bar-code.md 2015-12-15 17:21:52 +05:30
Martin Ender
4bd999cbc5 Update workflows.md 2015-12-15 17:21:52 +05:30
Martin Ender
bb154ad6c9 Create workflows.md 2015-12-15 17:21:52 +05:30
Martin Ender
f7d133f4a0 Update third-party-backups.md 2015-12-15 17:21:51 +05:30
Martin Ender
b79151ccac Create third-party-backups.md 2015-12-15 17:21:51 +05:30
Martin Ender
5b509ca194 Update territory.md 2015-12-15 17:21:51 +05:30
Martin Ender
38aa8982f8 Create territory.md 2015-12-15 17:21:51 +05:30
Martin Ender
c46504dfdf Update stock-reconciliation-for-non-serialized-item.md 2015-12-15 17:21:51 +05:30
Martin Ender
279fc35cb2 Create stock-reconciliation-for-non-serialized-item.md 2015-12-15 17:21:51 +05:30
Martin Ender
4887292513 Update sms-setting.md 2015-12-15 17:21:51 +05:30
Martin Ender
a056a7e390 Create sms-setting.md 2015-12-15 17:21:51 +05:30
Martin Ender
d82fec317e Create authorization-rule.md 2015-12-15 17:21:51 +05:30
Martin Ender
2545651a77 Create price-lists.md 2015-12-15 17:21:51 +05:30
Martin Ender
43029c2754 Create pos-setting.md 2015-12-15 17:21:51 +05:30
Martin Ender
3adcca8238 Update setting-up-taxes.md 2015-12-15 17:21:51 +05:30
Martin Ender
a76f957345 Update setting-up-taxes.md 2015-12-15 17:21:50 +05:30
Martin Ender
6935ae7f60 Create setting-up-taxes.md 2015-12-15 17:21:50 +05:30
Martin Ender
72e3741b44 Create terms-and-conditions.md 2015-12-15 17:21:50 +05:30
Martin Ender
609568d6d5 Create address-template.md 2015-12-15 17:21:50 +05:30
Martin Ender
576c76f71c Create letter-head.md 2015-12-15 17:21:50 +05:30
Martin Ender
a952fef53d Create print-headings.md 2015-12-15 17:21:50 +05:30
Martin Ender
5dc46b6096 Delete print-headings.md3 2015-12-15 17:21:50 +05:30
Martin Ender
463bd7b742 Create print-headings.md3 2015-12-15 17:21:50 +05:30
Martin Ender
e5cb6ab319 Create print-format-builder.md 2015-12-15 17:21:50 +05:30
Martin Ender
eeb280e06d Create print-settings.md 2015-12-15 17:21:50 +05:30
Martin Ender
2799039eec Create index.txt 2015-12-15 17:21:50 +05:30
Martin Ender
84f47e54af Create index.md 2015-12-15 17:21:50 +05:30
Martin Ender
3cd67c9e9b Create sending-email.md 2015-12-15 17:21:49 +05:30
Martin Ender
6b3d94a5df Update email-digest.md 2015-12-15 17:21:49 +05:30
Martin Ender
218cc5d1f2 Create email-digest.md 2015-12-15 17:21:49 +05:30
Martin Ender
f53407b76e Update concepts-and-terms.md 2015-12-15 17:21:49 +05:30
Martin Ender
92988591fc Update user-permissions.md 2015-12-15 17:21:49 +05:30
Martin Ender
9b69827d2c Update role-based-permissions.md 2015-12-15 17:21:49 +05:30
Martin Ender
4136b3170a Update adding-users.md 2015-12-15 17:21:49 +05:30
Martin Ender
f3459158c6 Delete globals-defaults.md 2015-12-15 17:21:49 +05:30
Martin Ender
a82056f424 Create global-defaults.md 2015-12-15 17:21:49 +05:30
Martin Ender
a440125ef2 Update system-settings.md 2015-12-15 17:21:49 +05:30
Martin Ender
3e8aec4d64 Update naming-series.md 2015-12-15 17:21:49 +05:30
Martin Ender
97a27f3d46 Update naming-series.md 2015-12-15 17:21:48 +05:30
Martin Ender
0eb0f59194 Update module-settings.md 2015-12-15 17:21:48 +05:30
Martin Ender
fce8780c08 Update globals-defaults.md 2015-12-15 17:21:48 +05:30
Martin Ender
48d45869ab Update email-alerts.md 2015-12-15 17:21:48 +05:30
Martin Ender
349360b3a1 Update email-alerts.md 2015-12-15 17:21:48 +05:30
Martin Ender
5e646cd8ad Update email-alerts.md 2015-12-15 17:21:48 +05:30
Martin Ender
8bcd104cec Create email-alerts.md 2015-12-15 17:21:48 +05:30
Martin Ender
5e91280912 Create email-account.md 2015-12-15 17:21:48 +05:30
Martin Ender
5fec1751a7 Create index.txt 2015-12-15 17:21:48 +05:30
Martin Ender
91802f914c Create index.md 2015-12-15 17:21:48 +05:30
Martin Ender
f779df2737 Create bulk-rename.md 2015-12-15 17:21:48 +05:30
Martin Ender
fad1363756 Update data-import-tool.md 2015-12-15 17:21:47 +05:30
Martin Ender
b041b905d0 Rename data-import-tool.md2.4.1 Werkzeug zum Datenimport Das Werkzeug zum Datenimport ist ein großartiger Weg um große Mengen an Daten, speziell Stammdaten, in das System hochzuladen oder zu bearbeiten. Um das Werkzeug zum Datenimport zu öffnen, gehen Sie entweder zu den Einstellungen oder zur Transaktion, für die Sie importieren wollen. Wenn der Datenimport erlaubt ist, sehen Sie eine Importschaltfläche: Das Werkzeug hat zwei Abschnitte, einen um eine Vorlage herunter zu laden, und einen zweiten um Daten hoch zu laden. (Anmerkung: Für den Import sind nur die DocTypes zugelassen, deren Dokumenttyp "Stammdaten" ist, oder bei denen die Einstellung "Import erlauben" aktiviert ist.) 1. Herunterladen der Vorlage Daten werden in ERPNext in Tabellen gespeichert, sehr ähnlich einer Tabellenkalkulation mit Spalten und Zeilen voller Daten. Jede Instanz in ERPNext kann mehrere verschiedene mit Ihr verbundene Untertabellen haben. Die Untertabellen sind mit Ihren übergeordneten Tabellen verknüpft und werden dort eingesetzt, wo es für eine Eigenschaft mehrere verschiedene Werte gibt. So kann z. B. ein Artikel mehrere verschiedene Preise haben, eine Rechnung hat mehrere verschiedene Artikel usw. - Klicken Sie auf die Tabelle, die Sie herunter laden wollen, oder auf "Alle Tabellen". - Für Massenbearbeitung klicken Sie auf "Mit Daten herunterladen". 2. Füllen Sie die Vorlage aus Öffnen Sie die Vorlage nach dem Herunterladen in einer Tabellenkalkulationsanwendung und fügen Sie die Daten unterhalb der Spaltenköpfe ein. Exportieren Sie dann Ihre Vorlage oder speichern Sie sie im CSV-Format (Comma Separated Values). 3. Hochladen der CSV-Datei Fügen Sie abschliessend die CSV-Datei im Abschnitt Import hinzu. Klicken Sie auf die Schaltfläche "Hochladen und Importieren". Anmerkungen: 1. Stellen Sie sicher, dass Sie als Verschlüsselung UTF-8 verwenden, wenn Ihre Anwendung das zulässt. 2. Lassen Sie die Spalte ID für einen neuen Datensatz leer. 4. Hochladen aller Tabellen (übergeordnete und Untertabellen) Wenn Sie alle Tabellen auswählen, dann erhalten Sie Spalten für alle Tabellen in einer Zeile gertrennt durch ~ Spalten. Wenn Sie mehrere verschiedene Unterzeilen haben, dann müssen Sie einen neuen Hauptartikel in einer neuen Zeile eintragen. Sehen Sie hierzu das Beispiel unten: Main Table ~ Child Table Column 1 Column 2 Column 3 ~ Column 1 Column 2 Column 3 v11 v12 v13 c11 c12 c13 c14 c15 c17 v21 v22 v23 c21 c22 c23 Um zu sehen, wie das gemacht wird, geben Sie manuell über Formulare einige Datensätze ein und exportieren Sie "Alle Tabellen" über "Mit Daten herunterladen". 5. Überschreiben ERPNext ermöglicht es Ihnen auch alle oder bestimmte Spalten zu überschreiben. Wenn Sie bestimmte Spalten aktualisieren möchten, können Sie die Vorlage mit Daten herunter laden. Vergessen Sie nicht die Box "Überschreiben" zu markieren, bevor sie hochladen. Anmerkung: Wenn Sie "Überschreiben" auswählen, werden alle Unterdatensätze eines übergeordneten Elements gelöscht. 6. Einschränkungen beim Hochladen ERPNext begrenzt die Menge an Daten, die Sie in einer Datei hochladen können. Die Menge kann sich je nach Datentyp unterscheiden. Normalerweise kann man problemlos ungefähr 1.000 Zeilen einer Tabelle in einem Vorgang hochladen. Wenn das System den Vorgang nicht akzeptiert, sehen Sie eine Fehlermeldung. Warum das alles? Wenn Sie zuviele Daten hochladen, kann das System abstürzen, im Besonderen dann, wenn andere Benutzer parallel arbeiten. Daher begrenzt ERPNext die Anzahl von Schreibvorgängen, die Sie mit einer Eingabe verarbeiten können. Wie fügen Sie Dateien an? Wenn Sie ein Formular öffnen, dann sehen Sie in der Seitenleiste rechts einen Abschnitt zum Anfügen von Dateien. Klicken Sie auf "Hinzufügen" und wählen Sie die Datei aus, die Sie anfügen möchten. Klicken Sie auf "Hochladen" und die Sache ist erledigt. Was ist eine CSV-Datei? Eine CSV (Durch Kommas getrennte Werte)-Datei ist ein Datensatz, den Sie in ERPNext hochladen können um verschiedene Daten zu aktualisieren. Jedes gebräuchliche Tabellenkalkulationsprogramm wie MS-Excel oder OpenOffice Spreadsheet kann im CSV-Format abspeichern. Wenn Sie Microsoft Excel benutzen und nicht-englische Zeichen verwenden, dann sollten Sie Ihre Datei UTF-8-kodiert abspeichern. Bei älteren Versionen von Excel gibt es keinen eindeutigen Weg als UTF-8 zu speichern. Deshalb können Sie die Datei auch ganz einfach als CSV abspeichern, dann mit Notepad öffnen und als UTF-8 abspeichern. (Microsoft Excel kann das leider nicht.) to data-import-tool.md 2015-12-15 17:21:47 +05:30
Martin Ender
ed4e85bf97 Create index.md 2015-12-15 17:21:47 +05:30
Martin Ender
1a8e484542 Create index.txt 2015-12-15 17:21:47 +05:30
Martin Ender
8794bb9c5f Delete system-settings.md 2015-12-15 17:21:47 +05:30
Martin Ender
1cd13ce2d5 Delete naming-series.md 2015-12-15 17:21:47 +05:30
Martin Ender
c1bdc108c8 Delete index.txt 2015-12-15 17:21:47 +05:30
Martin Ender
6549710eaa Delete module-settings.md 2015-12-15 17:21:47 +05:30
Martin Ender
4634194009 Delete index.md 2015-12-15 17:21:47 +05:30
Martin Ender
14006ad8c8 Delete global-defaults.md 2015-12-15 17:21:47 +05:30
Martin Ender
89a7730406 Create system-settings.md 2015-12-15 17:21:47 +05:30
Martin Ender
c2e913e0ca Create naming-series.md 2015-12-15 17:21:47 +05:30
Martin Ender
afbf3296d4 Create module-settings.md 2015-12-15 17:21:46 +05:30
Martin Ender
75963505dc Create index.md 2015-12-15 17:21:46 +05:30
Martin Ender
9ec61cf150 Create globals-defaults.md 2015-12-15 17:21:46 +05:30
Martin Ender
699feb0384 Create index.txt 2015-12-15 17:21:46 +05:30
Martin Ender
da00bacb55 Create global-defaults.md 2015-12-15 17:21:46 +05:30
Martin Ender
8ca8b14720 Create naming-series.md 2015-12-15 17:21:46 +05:30
Martin Ender
64b47ade3b Create module-settings.md 2015-12-15 17:21:46 +05:30
Martin Ender
423791a1cd Create system-settings.md 2015-12-15 17:21:46 +05:30
Martin Ender
9b09fea692 Create index.txt 2015-12-15 17:21:46 +05:30
Martin Ender
098cb65a54 Create index.md 2015-12-15 17:21:46 +05:30
Martin Ender
2cf2f48c02 Create sharing.md 2015-12-15 17:21:46 +05:30
Martin Ender
85febb969e Update user-permissions.md 2015-12-15 17:21:46 +05:30
Martin Ender
952e19a9bb Create user-permissions.md 2015-12-15 17:21:45 +05:30
Martin Ender
451ad3fe93 Update role-based-permissions.md 2015-12-15 17:21:45 +05:30
Martin Ender
cec0728bba Update role-based-permissions.md 2015-12-15 17:21:45 +05:30
Martin Ender
44838ea239 Update role-based-permissions.md 2015-12-15 17:21:45 +05:30
Martin Ender
3c29d6faa2 Update role-based-permissions.md 2015-12-15 17:21:45 +05:30
Martin Ender
5c4fdfce44 Create role-based-permissions.md 2015-12-15 17:21:45 +05:30
Martin Ender
19bed183b0 Update adding-users.md 2015-12-15 17:21:45 +05:30
Martin Ender
53523539f4 Create adding-users.md 2015-12-15 17:21:45 +05:30
Martin Ender
a5488e43ad Create index.md 2015-12-15 17:21:45 +05:30
Martin Ender
f8a2587cf4 Create index.txt 2015-12-15 17:21:45 +05:30
Martin Ender
337972eada Create step-10-item.md 2015-12-15 17:21:45 +05:30
Martin Ender
e5944e8866 Create step-9-suppliers.md 2015-12-15 17:21:45 +05:30
Martin Ender
ee17a60872 Create step-8-customer-names.md 2015-12-15 17:21:44 +05:30
Martin Ender
35ad87bb14 Create step-7-tax-details.md 2015-12-15 17:21:44 +05:30
Martin Ender
421bef2db4 Update step-6-add-users.md 2015-12-15 17:21:44 +05:30
Martin Ender
0048d29799 Create step-6-add-users.md 2015-12-15 17:21:44 +05:30
Martin Ender
5029670657 Update step-1-language.md 2015-12-15 17:21:44 +05:30
Martin Ender
d40ec15f1c Update step-2-currency-and-timezone.md 2015-12-15 17:21:44 +05:30
Martin Ender
9873c4029b Update step-3-user-details.md 2015-12-15 17:21:44 +05:30
Martin Ender
78b4ae02cb Update step-4-company-details.md 2015-12-15 17:21:44 +05:30
Martin Ender
9fa9b34930 Update step-5-letterhead-and-logo.md 2015-12-15 17:21:44 +05:30
Martin Ender
61b6918e73 Create step-5-letterhead-and-logo.md 2015-12-15 17:21:44 +05:30
Martin Ender
755d14b004 Create step-4-company-details.md 2015-12-15 17:21:44 +05:30
Martin Ender
2d3670b6a4 Create step-3-user-details.md 2015-12-15 17:21:44 +05:30
Martin Ender
8ff1c7b3e0 Create step-2-currency-and-timezone.md 2015-12-15 17:21:43 +05:30
Martin Ender
8df03c6e30 Create step-1-language.md 2015-12-15 17:21:43 +05:30
Martin Ender
cab2fc6e73 Create index.txt 2015-12-15 17:21:43 +05:30
Martin Ender
a5b9008088 Create index.md 2015-12-15 17:21:43 +05:30
Martin Ender
0a5ccb008a Create index.md 2015-12-15 17:21:43 +05:30
Martin Ender
83b8d33e78 Create index.txt 2015-12-15 17:21:43 +05:30
Martin Ender
9c2a20a67b Update the-champion.md 2015-12-15 17:21:43 +05:30
Martin Ender
a7465f8fd6 Update open-source.md 2015-12-15 17:21:43 +05:30
Martin Ender
49b476b9e5 Update key-workflows.md 2015-12-15 17:21:43 +05:30
Martin Ender
7f7f77f4d7 Create index.txt 2015-12-15 17:21:43 +05:30
Martin Ender
356c552b41 Update index.md 2015-12-15 17:21:43 +05:30
Martin Ender
1ccbd82b35 Update implementation-strategy.md 2015-12-15 17:21:43 +05:30
Martin Ender
e606678b8f Update getting-started-with-erpnext.md 2015-12-15 17:21:42 +05:30
Martin Ender
45db6156c7 Update getting-started-with-erpnext.md 2015-12-15 17:21:42 +05:30
Martin Ender
9d3da40351 Update getting-started-with-erpnext.md 2015-12-15 17:21:42 +05:30
Martin Ender
3f51a8aed4 Update do-i-need-an-erp.md 2015-12-15 17:21:42 +05:30
Martin Ender
e7d09edc0d Update do-i-need-an-erp.md 2015-12-15 17:21:42 +05:30
Martin Ender
94c7fa0141 Update concepts-and-terms.md 2015-12-15 17:21:42 +05:30
Martin Ender
abe9abc90b Update concepts-and-terms.md 2015-12-15 17:21:42 +05:30
Martin Ender
dbb25b67a5 Update concepts-and-terms.md 2015-12-15 17:21:42 +05:30
Martin Ender
d4e8e05749 Create concepts-and-terms.md 2015-12-15 17:21:42 +05:30
Martin Ender
02d28f1422 Create key-workflows.md 2015-12-15 17:21:42 +05:30
Martin Ender
a97265c8af Create implementation-strategy.md 2015-12-15 17:21:42 +05:30
Martin Ender
0480ad45f6 Create the-champion.md 2015-12-15 17:21:42 +05:30
Martin Ender
c8ea02d745 Update getting-started-with-erpnext.md 2015-12-15 17:21:41 +05:30
Martin Ender
028f246cae Update getting-started-with-erpnext.md 2015-12-15 17:21:41 +05:30
Martin Ender
f683bbee59 Create getting-started-with-erpnext.md 2015-12-15 17:21:41 +05:30
Martin Ender
e01309f07e Update open-source.md 2015-12-15 17:21:41 +05:30
Martin Ender
d7786190e6 Create open-source.md 2015-12-15 17:21:41 +05:30
Martin Ender
5bce109e8e Create do-i-need-an-erp.md 2015-12-15 17:21:41 +05:30
Martin Ender
a2531995f9 Create index.md 2015-12-15 17:21:41 +05:30
Martin Ender
98ccde84fb Create Beispiel.md 2015-12-15 17:21:41 +05:30
CWTGMBH
a12840f803 Create index.md 2015-12-15 17:21:41 +05:30
CWTGMBH
3e2f36034f Delete de 2015-12-15 17:21:41 +05:30
Martin Ender
d8c6213828 Create de 2015-12-15 17:21:41 +05:30
Anand Doshi
dd56b5f4ac Merge pull request #4503 from nabinhait/target_warehouse_patch
[patch] Repost entries with wrongly selected target warehouse
2015-12-15 17:01:37 +05:30
Nabin Hait
8444febbda [patch] Repost entries with wrongly selected target warehouse 2015-12-15 15:55:06 +05:30
Anand Doshi
b26c3f2263 Merge pull request #4502 from nabinhait/general_ledger_fix
[fix][report] General Ledger
2015-12-15 15:18:20 +05:30
Anand Doshi
03791fceee [translations] 2015-12-15 15:17:11 +05:30
Anand Doshi
542782e400 [fix] delete lead addresses in delete company transactions 2015-12-15 15:17:04 +05:30
Nabin Hait
8bdf8e675f [fix][report] General Ledger 2015-12-15 15:02:04 +05:30
Anand Doshi
2da81732eb Merge pull request #4500 from rmehta/fixes-to-tree
[fix] rename tree item fixes #2524
2015-12-15 14:38:26 +05:30
Anand Doshi
e1f46be230 Merge branch 'ShashaQin-patch-60' into develop 2015-12-15 14:37:11 +05:30
ShashaQin
81b8627250 Update serial_no.json 2015-12-15 14:14:51 +05:30
ShashaQin
79586775b2 Update serial_no.json
change "delivery_document_type" to Link and ""delivery_document_no" to Dynamic link will be more convenient, like "purchase_document_type" and "purchase_document_no".
2015-12-15 14:14:26 +05:30
Anand Doshi
8ee5498fe0 [fix] delete lead addresses in delete company transaction 2015-12-15 13:14:38 +05:30
Rushabh Mehta
e8ab320028 [fix] rename tree item fixes #2524 2015-12-15 12:06:37 +05:30
Nabin Hait
bdd1ee2185 Merge branch 'develop' 2015-12-11 15:06:29 +05:30
Nabin Hait
660f479ec8 bumped to version 6.12.11 2015-12-11 15:36:29 +06:00
Nabin Hait
fa557f494b Merge pull request #4481 from nabinhait/develop
[fix] Ignore user permission in target warehouse in SO
2015-12-11 15:04:38 +05:30
Anand Doshi
695d09f9cd [fix] typo 2015-12-11 15:03:26 +05:30
Anand Doshi
66c9940d73 [fix] [validation] website url should be public 2015-12-11 15:02:58 +05:30
Nabin Hait
204af3ce90 [fix] Ignore user permission in target warehouse in SO 2015-12-11 15:01:02 +05:30
Nabin Hait
4a9f6ba520 Merge branch 'develop' 2015-12-11 14:35:41 +05:30
Nabin Hait
83f9f93015 bumped to version 6.12.10 2015-12-11 15:05:41 +06:00
Nabin Hait
53804c5bed Merge pull request #4472 from umairsy/develop
[docs] Added new videos
2015-12-11 14:31:35 +05:30
Nabin Hait
d3d4fe45c6 Merge pull request #4473 from nabinhait/sms_logs
[fix] Ignore permissions while creating sms logs
2015-12-11 14:31:26 +05:30
Nabin Hait
fae4f0269b Merge pull request #4478 from nabinhait/website_image
[fix] Website Image validation
2015-12-11 14:31:18 +05:30
Nabin Hait
fc4eca5cc7 [fix] Website Image validation 2015-12-11 11:47:05 +05:30
Rushabh Mehta
a1a712b0c6 [minor] [fix] task close button condition 2015-12-11 11:16:03 +05:30
Nabin Hait
2164595933 [fix] Ignore permissions while creating sms logs 2015-12-10 18:09:57 +05:30
Umair Sayyed
8eaf5eee74 [docs] Added videos 2015-12-10 17:58:12 +05:30
Nabin Hait
09e5306825 Merge branch 'develop' 2015-12-10 14:41:02 +05:30
Nabin Hait
9cca3494c0 bumped to version 6.12.9 2015-12-10 15:11:02 +06:00
Nabin Hait
360b057b0a [chnage-log] 2015-12-10 14:37:28 +05:30
Nabin Hait
56ae9481a0 Merge pull request #4466 from rmehta/task-notification-on-overdue
[enhancement] task status will be set to overdue when it crosses expected end date
2015-12-10 14:30:34 +05:30
Nabin Hait
12425e22a6 Merge pull request #4462 from nabinhait/sal_slip_fix
[fix] Payment days calculation in salary slip
2015-12-10 14:23:31 +05:30
Nabin Hait
da80a649fc Merge pull request #4465 from anandpdoshi/fix/validate-website-image-public
[fix] validate that Item's website image is public
2015-12-10 14:23:14 +05:30
Rushabh Mehta
13ec41abb2 [enhancement] task status will be set to overdue when it crosses expected end date 2015-12-10 12:59:02 +05:30
Anand Doshi
b3051ab84d [fix] validate that Item's website image is public 2015-12-10 11:46:20 +05:30
Nabin Hait
533aba02c5 [fix] Payment days calculation in salary slip 2015-12-10 10:50:42 +05:30
Rushabh Mehta
a5cf8a86c1 [minor] lang fixes for email digest 2015-12-10 10:38:46 +05:30
Rushabh Mehta
c819fd4ee8 [translations] for #4461 2015-12-10 10:34:32 +05:30
Anand Doshi
2af44ffd06 [fix] setup wizard is_private 2015-12-09 17:29:11 +05:30
Nabin Hait
cff91abd8d Merge pull request #4456 from nabinhait/drop_ship_fix1
[fix] Reload SO Item in patch
2015-12-09 17:06:54 +05:30
Nabin Hait
5d39a9594d [fix] Reload SO Item in patch 2015-12-09 17:06:09 +05:30
Nabin Hait
b1caeba0b4 Merge branch 'develop' 2015-12-09 15:32:30 +05:30
Nabin Hait
7290c79fdf bumped to version 6.12.8 2015-12-09 16:02:30 +06:00
Nabin Hait
547e916b00 Merge pull request #4452 from saurabh6790/drop-ship-fixes-3
[fixes] pull customer details only if drop shipping is marked
2015-12-09 15:31:49 +05:30
Nabin Hait
e4c0388b68 Merge pull request #4453 from nabinhait/translation_fix
suomalainen translation fixed for Extra Small
2015-12-09 15:30:11 +05:30
Nabin Hait
783e63a8e6 suomalainen translation fixed for Extra Small and Large 2015-12-09 15:29:21 +05:30
Saurabh
f6891975d5 [fixes] pull customer details only if drop shipping is marked 2015-12-09 15:04:12 +05:30
Nabin Hait
45a8f9d006 Merge branch 'develop' 2015-12-09 14:59:44 +05:30
Nabin Hait
1b0c797817 bumped to version 6.12.7 2015-12-09 15:29:44 +06:00
Nabin Hait
c119cbcb50 Merge pull request #4449 from nabinhait/coa_fix
[fix] Stock account identified in COA of Guatamala
2015-12-09 13:58:09 +05:30
Nabin Hait
d595534431 Merge pull request #4450 from venetanji/develop
Fix dynamic link in reports to generate correct link when user language is not english
2015-12-09 13:57:45 +05:30
Giovanni Lion
5de53eb0eb Voucher dynamic link fix to allow links to work if user language is not english 2015-12-09 15:45:40 +08:00
Giovanni Lion
5ccaf6f9d7 Merge remote-tracking branch 'frappe/develop' into develop 2015-12-09 15:25:47 +08:00
Anand Doshi
29fe53f63c [fix] use pip parse requirements in setup.py 2015-12-09 12:15:22 +05:30
Nabin Hait
49fe7af6de [fix] Stock account identified in COA of Guatamala 2015-12-09 11:27:10 +05:30
Nabin Hait
a68a3b5cc1 Merge branch 'develop' 2015-12-08 18:06:25 +05:30
Nabin Hait
3931a35e27 bumped to version 6.12.6 2015-12-08 18:36:25 +06:00
Nabin Hait
56595ecda0 Merge pull request #4445 from nabinhait/patch_fix1
[patch][fix] Fixed drop ship status and tax rule patch
2015-12-08 18:05:33 +05:30
Nabin Hait
466ff3d31b Merge pull request #4446 from nabinhait/translation_fix
[fix] Hungary translation for chart of accounts
2015-12-08 18:05:12 +05:30
Nabin Hait
61c6552434 [fix] Hungary translation for chart of accounts 2015-12-08 18:03:23 +05:30
Nabin Hait
4ad0963ee8 [patch][fix] Fixed drop ship status and tax rule patch 2015-12-08 16:51:04 +05:30
Nabin Hait
aa99fe2c4e Merge branch 'develop' 2015-12-08 15:40:17 +05:30
Nabin Hait
d56ec92682 bumped to version 6.12.5 2015-12-08 16:10:17 +06:00
Nabin Hait
90852d334f Merge branch 'nabinhait-tax_rule_patch' into develop 2015-12-08 15:30:32 +05:30
Nabin Hait
694373d022 Fixed conflict 2015-12-08 15:30:15 +05:30
Nabin Hait
40d49ccf98 Merge pull request #4444 from nabinhait/get_incoming_rate_fix
[fix] Get incoming rate if args as json
2015-12-08 15:17:32 +05:30
Nabin Hait
4372ac559a Merge pull request #4443 from nabinhait/bank_reco_print
[fix] Print format for bank reco statement
2015-12-08 15:17:24 +05:30
Nabin Hait
01478b3fc1 Merge pull request #4439 from saurabh6790/drop-ship-fixes-3
[fixes] Drop Shipping - Purchase Order Cancellation - Sales Order Status
2015-12-08 15:16:38 +05:30
Nabin Hait
41c8cf645a [fix] Get incoming rate if args as json 2015-12-08 14:50:24 +05:30
Saurabh
70ed6ede5c [fixes] patch to update delivery status for drop ship item 2015-12-08 14:48:19 +05:30
Nabin Hait
7af5c4aefc [fix] Print format for bank reco statement 2015-12-08 14:25:10 +05:30
Saurabh
01ca354d52 [fixes] Drop Shipping - Purchase Order Cancellation - Sales Order Status 2015-12-08 14:03:09 +05:30
Nabin Hait
a974ab3dc5 [fix][patch] Create Tax Rule based on default taxes and charges template in Customer and Supplier 2015-12-08 12:56:14 +05:30
Anand Doshi
cc24d28ddc [fix] address creation for new user 2015-12-08 12:34:13 +05:30
Rushabh Mehta
441b2c7657 [minor] limit pos search to 24 items at a time 2015-12-08 12:16:53 +05:30
Anand Doshi
51d07dfca2 [docs] rename perm level error article 2015-12-07 16:22:57 +05:30
Nabin Hait
5e6757f197 Merge branch 'develop' 2015-12-07 14:25:00 +05:30
Nabin Hait
6a8ff42a5a bumped to version 6.12.4 2015-12-07 14:54:59 +06:00
Nabin Hait
06db236aa0 [fix] Allow Production Order, by default unchecked in item 2015-12-07 14:19:13 +05:30
Nabin Hait
733680bc3f [translations] 2015-12-07 14:12:41 +05:30
Rushabh Mehta
14a0441b4b [fix] removed temp_highlight 2015-12-07 12:28:03 +05:30
Rushabh Mehta
a311e706b0 [docs] home.png 2015-12-07 12:13:17 +05:30
Rushabh Mehta
e6a16c29df [docs] index fix 2015-12-07 12:07:01 +05:30
Nabin Hait
92bb480fc3 Merge pull request #4432 from bohlian/develop
Purchase Invoice - Show Payment Button when Outstanding Amount !=0
2015-12-07 11:12:11 +05:30
Nabin Hait
7dc0da18b5 Merge pull request #4433 from nabinhait/expense_allow_import
[fix] Allowed import for Expense Claim
2015-12-07 11:11:35 +05:30
Nabin Hait
c8a2b94200 Merge pull request #4434 from nabinhait/whitelist_fix
[fix] get_incoming_rate function whitelisted
2015-12-07 11:11:21 +05:30
Nabin Hait
203d4088fa Merge pull request #4435 from saurabh6790/drop-ship-fixes-3
[fixes] recreate print format, shipping address on po for drop ship, …
2015-12-07 11:10:11 +05:30
Nabin Hait
5eefff13a1 [fix] get_incoming_rate function whitelisted 2015-12-07 10:44:56 +05:30
Nabin Hait
9421e9873a [fix] Allowed import for Expense Claim 2015-12-07 10:40:13 +05:30
bohlian
5e4c8a52ee Payment To Be Shown When Outstanding Amount != 0
Payment button should be shown when outstanding amount != 0.
2015-12-07 12:06:08 +08:00
bohlian
41f62f7250 Merge pull request #1 from frappe/develop
7/12/2015 Merge
2015-12-07 12:04:34 +08:00
Saurabh
4f39fd243e [fixes] recreate print format, shipping address on po for drop ship, validate update stock 2015-12-06 10:09:06 +05:30
Nabin Hait
c43a11a313 Merge pull request #4431 from nabinhait/leave_fix
[fix] Don't validate balance for lwp and in balance consider all leaves in the allocation period
2015-12-05 12:43:38 +05:30
Nabin Hait
1bffb42809 Merge pull request #4428 from nabinhait/get_exchange_rate
[fix] Get exchange rate as 1 if same currency
2015-12-05 12:43:13 +05:30
Nabin Hait
4660f820da Merge pull request #4427 from nabinhait/offer_letter_fix
[fix] Offer letter print format fixed
2015-12-05 12:42:39 +05:30
Nabin Hait
1a19c05ef0 Merge pull request #4425 from nabinhait/bank_reco_fix
[fix] Fixed amounts not reflected in bank
2015-12-05 12:42:20 +05:30
Nabin Hait
d53e780fb8 [fix] Don't validate balance for lwp and in balance consider all leaves in the allocation period 2015-12-05 12:15:49 +05:30
Nabin Hait
0f5d97a156 [fix] Get exchange rate as 1 if same currency 2015-12-04 16:47:34 +05:30
Rushabh Mehta
2f273674e9 [docs] fixed links 2015-12-04 16:00:38 +05:30
Nabin Hait
734a40ad62 [fix] Offer letter print format fixed 2015-12-04 12:19:21 +05:30
Nabin Hait
9547b774f7 [fix] Fixed amounts not reflected in bank 2015-12-04 11:05:25 +05:30
Rushabh Mehta
e1f8b1d695 [minor] [production planning tool] include non production items without default BOM in multi-level BOM 2015-12-04 10:53:15 +05:30
Rushabh Mehta
7be2e985b0 [docs] updated generated docs 2015-12-03 18:28:19 +05:30
Rushabh Mehta
3b6287d849 [docs] updated generated docs 2015-12-03 18:27:13 +05:30
Rushabh Mehta
ab7021ce64 [docs] merged kb and cleanup. warning: don't see the commit 2015-12-03 17:59:34 +05:30
Rushabh Mehta
ca4c663e07 Merge branch 'develop' 2015-12-03 17:58:58 +05:30
Rushabh Mehta
275b3eec0d bumped to version 6.12.3 2015-12-03 18:28:57 +06:00
Rushabh Mehta
acaef538c2 Merge pull request #4420 from rmehta/stock-entry-fix
[minor] allow stock entry for manufacture without production order
2015-12-03 17:58:07 +05:30
Rushabh Mehta
041b062014 Merge pull request #4419 from nabinhait/salary_payment_days
[fix] Payment Days and holidays considering joining and relieving dates
2015-12-03 17:57:24 +05:30
Rushabh Mehta
39e603a154 Merge pull request #4413 from nabinhait/bank_transfer_exchange_rate
Bank transfer exchange rate and account balance in COA
2015-12-03 17:56:03 +05:30
Nabin Hait
a4eeb919e6 [fix] Set payment days considering joinging date, reliving date and applicable holidays 2015-12-03 15:10:30 +05:30
Nabin Hait
c4d9554a05 [fix] Payment Days and holidays considering joining and relieving dates 2015-12-03 15:10:30 +05:30
Rushabh Mehta
2e1c8f27c4 Merge pull request #4421 from nabinhait/tax_rule_fix
[fix] Toggle required for sales and purchase tax template based on tax type
2015-12-03 11:50:09 +05:30
Nabin Hait
4c7a32e446 [fix] Toggle required for sales and purchase tax template based on tax type 2015-12-03 11:47:38 +05:30
Rushabh Mehta
2c069a418a [minor] allow stock entry for manufacture without production order 2015-12-03 11:10:23 +05:30
Rushabh Mehta
ba2596a7e0 [minor] validate email id before inviting user 2015-12-03 10:35:11 +05:30
Rushabh Mehta
f7911687a0 [minor] fixes to patch 2015-12-03 08:09:42 +05:30
Rushabh Mehta
ceb82324ad Merge branch 'develop' 2015-12-02 14:54:45 +05:30
Rushabh Mehta
5dd1aa9f31 bumped to version 6.12.2 2015-12-02 15:24:45 +06:00
Rushabh Mehta
80ada3eddd Merge pull request #4415 from nabinhait/salary_slip_fix
[fix] Inactive salary structure validation
2015-12-02 14:52:11 +05:30
Nabin Hait
8df5900f98 [fix] Inactive salary structure validation 2015-12-02 14:50:08 +05:30
Nabin Hait
f58a3726a7 Balance in chart of accounts in both company and account currency 2015-12-02 12:28:06 +05:30
Nabin Hait
1c77506e80 [fix] Don't overwrite exchange rate on saving for bank transfer 2015-12-02 12:28:06 +05:30
Rushabh Mehta
f1f556c0ac Merge pull request #4409 from nabinhait/reorder_level
[fix] Reorder Qty mandatory if reorder level entered
2015-12-02 12:25:09 +05:30
Rushabh Mehta
4a1b9ac793 Merge pull request #4407 from nabinhait/develop
[fix] Mapping allowed for negative quantity
2015-12-02 12:24:49 +05:30
Nabin Hait
20abc2d0e8 [fix] Reorder Qty mandatory if reorder level entered 2015-12-01 19:01:19 +05:30
Rushabh Mehta
4f9fe9c856 Merge branch 'develop' 2015-12-01 18:18:28 +05:30
Rushabh Mehta
4496cc1e80 bumped to version 6.12.1 2015-12-01 18:48:28 +06:00
Rushabh Mehta
29cca2352c [hot] [fix] trial balance report 2015-12-01 18:17:33 +05:30
Nabin Hait
d793fc9446 [fix] Mapping allowed for negative quantity 2015-12-01 17:28:12 +05:30
Rushabh Mehta
84f44ad5eb Merge pull request #4345 from nabinhait/stock_reco
[fix] Get items in stock reconciliation based on default warehouse
2015-12-01 16:50:32 +05:30
Nabin Hait
5b73dea9f6 [fix] Get items in stock reconciliation based on default warehouse or existing bin 2015-12-01 16:47:17 +05:30
Rushabh Mehta
cd90478c6d Merge pull request #4406 from nabinhait/recurring_test_fix
[fix] Recurring test case fixed for the 1st day of the month
2015-12-01 16:43:27 +05:30
Nabin Hait
c4edcf1532 [fix] Recurring test case fixed for the 1st day of the month 2015-12-01 16:28:35 +05:30
Rushabh Mehta
70885f63a5 Merge branch 'develop' 2015-12-01 16:24:13 +05:30
Rushabh Mehta
48b1633ff5 bumped to version 6.12.0 2015-12-01 16:54:13 +06:00
Rushabh Mehta
4140fa59c5 [translations] 2015-12-01 16:02:15 +05:30
Rushabh Mehta
afacc3d779 [minor] catch illegal reference, via error report 2015-12-01 15:53:07 +05:30
Rushabh Mehta
87b0bec2cf Merge pull request #4405 from rmehta/get-product-bundle-fixes
[fixes] [ux] get product bundle items only on po, mr and button on toolbar
2015-12-01 15:14:23 +05:30
Rushabh Mehta
29f9f6c147 [fixes] [ux] get product bundle items only on po, mr and button on toolbar 2015-12-01 11:36:22 +05:30
Rushabh Mehta
37d9d6fdea Merge pull request #4402 from nabinhait/allow_root_accounts
[feature] Allowed custom root accounts in Chart of Accounts
2015-12-01 10:59:44 +05:30
Rushabh Mehta
0cc177f73c Merge pull request #4400 from nabinhait/total_amount_in_jv
[fix] Total Amount in Journal Entry in bank currency
2015-12-01 10:58:34 +05:30
Nabin Hait
8c4e043747 [feature] Allowed custom root accounts in Chart of Accounts 2015-12-01 10:34:43 +05:30
Rushabh Mehta
3617942ff7 Merge pull request #4395 from nabinhait/drop_ship
[fix] Invoicing against drop-ship Purchase Order
2015-12-01 10:26:25 +05:30
Nabin Hait
ddc295b4b3 [minor] Set expense account as Stock RBNB for perpetual inventory after mapping 2015-11-30 18:40:28 +05:30
Nabin Hait
621f4cd7c9 [fix] Invoicing against drop-ship Purchase Order 2015-11-30 18:40:28 +05:30
Rushabh Mehta
4750b1fdb7 Merge pull request #4397 from rmehta/setup-wizard-fixes
[minor] system settings in setup wizard moved to frappe
2015-11-30 17:17:16 +05:30
Rushabh Mehta
e7bb6544f5 Merge pull request #4401 from nabinhait/pr-for-non-stock-items
[fix] Show 'Make Purchase Receipt' button in PO even if all items are non-stock items
2015-11-30 16:56:28 +05:30
Nabin Hait
72e348daf5 [fix] Show 'Make Purchase Receipt' button in PO even if all items are non-stock items 2015-11-30 16:26:49 +05:30
Nabin Hait
6c173e9730 [fix] Total Amount in Journal Entry in bank currency 2015-11-30 16:13:42 +05:30
Rushabh Mehta
0547a7668e Merge pull request #4398 from nabinhait/bank_reco
[fix] Bank Reconciliation in account currency
2015-11-30 16:06:06 +05:30
Nabin Hait
ec1695dbe3 [fix] Bank Reconciliation in account currency 2015-11-30 15:23:46 +05:30
Rushabh Mehta
7909102edd [minor] system settings in setup wizard moved to frappe 2015-11-30 15:12:45 +05:30
Rushabh Mehta
3f10e0ba2d Merge pull request #4396 from rmehta/stock-reco-fixes
[fixes] stock reco, must always set qty and rate
2015-11-30 14:18:09 +05:30
Rushabh Mehta
9f7de868ef [fixes] stock reco, must always set qty and rate 2015-11-30 14:16:36 +05:30
Rushabh Mehta
d6c5235d58 [minor] [translation] fix #4343 2015-11-30 11:33:01 +05:30
Rushabh Mehta
32e55e174d [minor] fix error message 2015-11-30 10:51:29 +05:30
Anand Doshi
8d968ceb94 Merge branch 'develop' 2015-11-27 17:38:46 +05:30
Anand Doshi
47e82d1a49 bumped to version 6.11.3 2015-11-27 18:08:46 +06:00
Anand Doshi
563c243ec6 Revert "[hotfix] total amount in journal entry"
This reverts commit 5b03a75970.
2015-11-27 17:38:17 +05:30
Anand Doshi
7781763efa Merge branch 'develop' 2015-11-27 17:24:49 +05:30
Anand Doshi
711e675987 bumped to version 6.11.2 2015-11-27 17:54:49 +06:00
Anand Doshi
5b03a75970 [hotfix] total amount in journal entry 2015-11-27 17:24:06 +05:30
Anand Doshi
f4c3819134 Merge branch 'develop' 2015-11-27 15:08:57 +05:30
Anand Doshi
b8591da62c bumped to version 6.11.1 2015-11-27 15:38:57 +06:00
Anand Doshi
a5f0a7ce06 [change-log] 2015-11-27 15:08:36 +05:30
Rushabh Mehta
9785cd35dc [minor] quote optional in email digest 2015-11-27 14:50:15 +05:30
Anand Doshi
e38a53443a Merge pull request #4386 from rmehta/bank-reco-bulk-edit
[enhancement] bulk edit in bank reconciliation, #4356
2015-11-27 14:46:58 +05:30
Anand Doshi
70f57eb7f0 [fix] call apply price list, apply pricing rule only if price list is mentioned or there are items in the table 2015-11-27 14:38:01 +05:30
Rushabh Mehta
2d70887aaf [enhancement] bulk edit in bank reconciliation, #4356 2015-11-27 11:37:18 +05:30
Anand Doshi
15b22c9d7d Merge pull request #4383 from anandpdoshi/fix/auto-material-request-template
[fix] Show Item Name in re-order email. Fixes #4381
2015-11-27 11:31:36 +05:30
Anand Doshi
4b12740e8d [fix] Shipment in portal. Fixes #4291 2015-11-26 18:22:03 +05:30
Anand Doshi
f942d97a18 [fix] removed UOM Replace Utility from message 2015-11-26 16:08:09 +05:30
Anand Doshi
5cf7a0bf72 [fix] Show Item Name in re-order email. Fixes #4381 2015-11-26 15:11:18 +05:30
Anand Doshi
49abb18928 Merge branch 'develop' 2015-11-26 12:42:07 +05:30
Anand Doshi
7c016d2ee2 bumped to version 6.11.0 2015-11-26 13:12:06 +06:00
Anand Doshi
666fbaff8c [translations] 2015-11-26 12:40:13 +05:30
Anand Doshi
6674d1dc2b [change-log] 2015-11-26 12:37:52 +05:30
Anand Doshi
5225a9752b Merge pull request #4377 from rmehta/jv-print-fix
[fix] total amount in journal entry
2015-11-26 11:05:35 +05:30
Rushabh Mehta
0fd67b23f4 [minor] duplicate button on BOM cancel 2015-11-26 10:37:24 +05:30
Rushabh Mehta
b82bdd6f1f [fix] total amount in journal entry 2015-11-26 09:08:07 +05:30
Rushabh Mehta
131bec67bc Merge pull request #4373 from anandpdoshi/fix/status-updater-after-not-null
[fix] status update - update qty after int float not null change
2015-11-25 18:09:13 +05:30
Anand Doshi
ebae726237 [fix] status update - update qty after int float not null change 2015-11-25 17:55:47 +05:30
Anand Doshi
3314f1cba7 Merge pull request #4374 from rmehta/reorder-fix
[minor] re-order at re-order level, not below
2015-11-25 17:54:36 +05:30
Anand Doshi
a4870118ea Merge pull request #4365 from anandpdoshi/fix/print-hide-if-0
[fix] Show Credit/Debit as blank in Journal Entry Account if its value is 0
2015-11-25 17:28:54 +05:30
Rushabh Mehta
03b3d66b90 [minor] re-order at re-order level, not below 2015-11-25 17:23:00 +05:30
Anand Doshi
5c968abcef [fix] Show Credit/Debit as blank in Journal Entry Account if its value is 0 2015-11-25 16:33:00 +05:30
Anand Doshi
699d9be4b7 Merge pull request #4369 from bohlian/develop
Removed Warehouse Requirement for SerialNo Listing
2015-11-25 15:19:47 +05:30
Anand Doshi
ad5cf9b22e Merge pull request #4370 from rmehta/manual-contribs
[manual] contributions via Robert Becht
2015-11-25 15:18:56 +05:30
Anand Doshi
cdb63fd52a Merge pull request #4366 from anandpdoshi/fix/setup-wizard-fiscal-year
[fix] validate fiscal year dates and company name
2015-11-25 15:18:28 +05:30
Rushabh Mehta
bf07cba6a8 [manual] contributions via Robert Becht 2015-11-25 14:42:02 +05:30
bohlian
ff1ab26088 Removed Warehouse Requirement for SerialNo Listing
Removed the requirement that Warehouse has to be assigned for Serial Number to appear in the listing.
2015-11-25 16:06:20 +08:00
Anand Doshi
5c3469a01e [fix] validate fiscal year dates and company name 2015-11-24 17:06:54 +05:30
Anand Doshi
625592e997 Merge pull request #4363 from anandpdoshi/fix/web-form-customization
[fix] Changed Country fieldtype to Link in Web Form
2015-11-24 13:26:23 +05:30
Anand Doshi
7221805587 [fix] Changed Country fieldtype to Link in Web Form 2015-11-23 19:20:51 +05:30
Anand Doshi
a0961bc0cf Merge pull request #4360 from nabinhait/bom_fix
[fix] Update exploded materials table from 'Update Cost' button
2015-11-23 16:55:31 +05:30
Nabin Hait
cf3cf2ca1f [fix] Update exploded materials table from 'Update Cost' button 2015-11-23 15:12:18 +05:30
Anand Doshi
17e9b9444d Merge pull request #4355 from nabinhait/items_from_product_bundle
Get Items from Product Bundle button in purchase cycle
2015-11-23 12:59:41 +05:30
Nabin Hait
c4f4c09e42 Get Items from Product Bundle button in purchase cycle 2015-11-23 12:51:37 +05:30
Anand Doshi
fe1e5884b8 Merge pull request #4354 from nabinhait/pcv
[fix] Period closing account should be of type Liability / Equity
2015-11-23 12:35:06 +05:30
Nabin Hait
072c540ae3 [fix] Period closing account should be of type Liability / Equity 2015-11-23 09:52:08 +05:30
Anand Doshi
3012f0d39a Merge branch 'develop' 2015-11-20 18:10:04 +05:30
Anand Doshi
c6d91b8fb2 bumped to version 6.10.2 2015-11-20 18:40:04 +06:00
Anand Doshi
019111b05c [translations] 2015-11-20 18:00:11 +05:30
Anand Doshi
ddad05dab3 [fix] Customer de-duplication sql 2015-11-20 17:29:40 +05:30
Nabin Hait
9e425863a1 Merge pull request #4342 from revant/patch-2
fix frappe call to update_purchase_receipt_status
2015-11-20 12:47:35 +05:30
Revant Nandgaonkar
bde324a90f fix frappe call to update_purchase_receipt_status
changed update_purchase_order_status to update_purchase_receipt_status
2015-11-20 12:41:58 +05:30
Anand Doshi
b133240298 Merge branch 'develop' 2015-11-20 00:42:15 +05:30
Anand Doshi
56c605f36e bumped to version 6.10.1 2015-11-20 01:12:15 +06:00
Anand Doshi
8c56adf42b [hotfix] drop ship patch 2015-11-20 00:41:28 +05:30
Nabin Hait
690023538e Merge branch 'develop' 2015-11-19 14:34:29 +05:30
Nabin Hait
19ce11aa9c bumped to version 6.10.0 2015-11-19 15:04:29 +06:00
Nabin Hait
f649013079 Merge pull request #4329 from anandpdoshi/int-float-not-null
[enhancement] Int, Currency, Float, Percent as not null and default to 0
2015-11-19 14:30:58 +05:30
Anand Doshi
120ea62acc [fix] get_balance_on: convert date to string 2015-11-19 14:24:39 +05:30
Anand Doshi
602e8253be [enhancement] Int, Currency, Float, Percent as not null and default to 0 2015-11-19 13:23:36 +05:30
Nabin Hait
06df19b56a Reload PO Item before patch 2015-11-19 12:46:37 +05:30
Nabin Hait
0f72750fc8 Merge pull request #4338 from anandpdoshi/fix/salary-slip-earning-deduction
[fix] pull earning and deduction on change of employee
2015-11-19 12:06:37 +05:30
Nabin Hait
5f0b93ed71 Merge pull request #4337 from nabinhait/payment_tool_fix
[fix] Mapping from Payment Tool
2015-11-19 12:05:38 +05:30
Nabin Hait
5284b22c53 [fix] Mapping from negative outstanding invoice 2015-11-19 11:42:23 +05:30
Nabin Hait
343c1a5cbd [fix] Mapping from Payment Tool 2015-11-19 11:42:22 +05:30
Nabin Hait
6daa5746f8 Merge pull request #4335 from saurabh6790/drop-ship-fixes-1
Move Drop Ship from Purchase Order to Purchase Order Items
2015-11-19 11:40:06 +05:30
Anand Doshi
7763bb5c15 [fix] pull earning and deduction on change of employee 2015-11-18 19:04:03 +05:30
Saurabh
b65c69f9eb [fixes] drop ship test case fixes 2015-11-18 17:39:26 +05:30
Saurabh
2e292060c5 [fix] Reserved and ordered qty fix for drop ship orders 2015-11-18 17:39:26 +05:30
Saurabh
a4bf02de6c [fixes] overlapping allocation 2015-11-18 17:39:26 +05:30
Saurabh
3bcf82c7a6 [fixes] test leave allocation record creation 2015-11-18 17:39:26 +05:30
Saurabh
55222a5b82 [fixes] test case fixes 2015-11-18 17:39:26 +05:30
Saurabh
2c85efe31a [fixes] hide drop ship section and typo 2015-11-18 17:39:26 +05:30
Saurabh
20628f5bd8 [patch] mo drop shipment from purchase order to purchase order item 2015-11-18 17:39:25 +05:30
Saurabh
caf122f015 [fixes] dropship fixes 2015-11-18 17:39:25 +05:30
Nabin Hait
b73f3da02c Merge pull request #4332 from nabinhait/pi_fix
[fix] Check Purchase Receipt mandatory only for stock items
2015-11-18 17:30:29 +05:30
Nabin Hait
f0607b45c5 Merge pull request #4334 from revant/patch-1
Mode of Payment validate
2015-11-18 17:29:54 +05:30
Nabin Hait
b45ca3ada0 Merge pull request #4331 from nabinhait/pcv_fix
[fix] Allowed Equity accounts in closing account in Period Closing Voucher
2015-11-18 17:15:57 +05:30
Nabin Hait
11e8728715 Merge pull request #4336 from nabinhait/offer_letter_print_format
[fix] Don't add pagebreak in print format if terms contains only spaces and newlines
2015-11-18 17:15:34 +05:30
Rushabh Mehta
edc8ab03b5 [minor] fixed description 2015-11-18 16:48:19 +05:30
Revant Nandgaonkar
27c266b081 improve mode_of_payment validate_accounts
using frappe.db.get_value instead of frappe.get_list
2015-11-18 13:28:09 +05:30
Nabin Hait
c7fc11a812 [fix] Don't add pagebreak in print format if terms contains only spaces and newlines 2015-11-18 12:59:00 +05:30
Rushabh Mehta
d962d1c96f [minor] remove feedback line from digest 2015-11-18 10:53:03 +05:30
Revant Nandgaonkar
11f8a0033a Mode of Payment validate
Error when Same Company is entered multiple times in accounts
Error when Company of Ledger account doesn't match with Company Selected
2015-11-17 21:15:00 +05:30
Anand Doshi
da79740cdf [fix] injection 2015-11-17 18:27:50 +05:30
Nabin Hait
2cf1699937 [fix] Check Purchase Receipt mandatory only for stock items 2015-11-17 17:32:07 +05:30
Nabin Hait
1a3413875f [fix] Allowed Equity accounts in closing account in Period Closing Voucher 2015-11-17 17:12:44 +05:30
Anand Doshi
3667da1053 [fix] Set user_id as Reply-To in birthday reminder emails 2015-11-16 19:31:20 +05:30
Nabin Hait
a5ac1f024e Merge branch 'develop' 2015-11-16 18:12:03 +05:30
Nabin Hait
d9e57978b8 bumped to version 6.9.2 2015-11-16 18:42:03 +06:00
Nabin Hait
fee95f1135 Merge pull request #4328 from nabinhait/hotfix1
[hotfix]
2015-11-16 18:11:18 +05:30
Nabin Hait
e8f4790d0a [hotfix] 2015-11-16 18:10:15 +05:30
Nabin Hait
e1feab1d70 Merge branch 'develop' 2015-11-16 17:07:38 +05:30
Nabin Hait
6826ca19b1 bumped to version 6.9.1 2015-11-16 17:37:38 +06:00
Nabin Hait
de46fd62d8 Delete v6_9_1.md 2015-11-16 17:06:51 +05:30
Nabin Hait
c7c2d17823 Merge pull request #4327 from nabinhait/item_fix
[change-log] Added change log
2015-11-16 17:05:45 +05:30
Nabin Hait
6f7cd47ac6 [change-log] Added change log 2015-11-16 17:04:48 +05:30
Nabin Hait
11fc0723c9 Merge pull request #4326 from nabinhait/item_fix
Item fix and change log
2015-11-16 17:02:02 +05:30
Nabin Hait
94e90bddaa [change-log] Added change log 2015-11-16 17:01:12 +05:30
Nabin Hait
43ce642649 [fix] Uncheck 'Is Production Item' if it is a non-stock item 2015-11-16 16:50:59 +05:30
Nabin Hait
a975fea3ac Merge branch 'develop' 2015-11-16 16:42:56 +05:30
Nabin Hait
8e2d76bd63 bumped to version 6.9.0 2015-11-16 17:12:56 +06:00
Anand Doshi
34af16140e Merge pull request #4315 from rmehta/standard-in-web-form
Web form, make standard
2015-11-16 16:24:14 +05:30
Nabin Hait
b3a68c3f40 Merge pull request #4323 from nabinhait/leaves
[fix][cleanup] Leave allocation, application and balance report cleanup and fixes
2015-11-16 15:57:04 +05:30
Nabin Hait
9f2fd009b0 Merge pull request #4318 from nabinhait/sal_fix
[fix] Check Salary Structure validity
2015-11-16 15:52:52 +05:30
Nabin Hait
3858d12f1d Merge pull request #4317 from nabinhait/close_feature
Show Close button in Delivery Note and Purchase Receipt, only if it is returned and user has submit permission
2015-11-16 15:52:41 +05:30
Nabin Hait
adc93b797a Merge pull request #4316 from nabinhait/advance_fix
[fix] Invoice Outstanding calculation related to advance
2015-11-16 15:50:32 +05:30
Nabin Hait
b6de519571 [fix] Test case fixed 2015-11-16 15:50:10 +05:30
Nabin Hait
58c4646199 [fix][cleanup] Leave allocation, application and balance report cleanup and fixes 2015-11-16 15:35:14 +05:30
Anand Doshi
4fbf01fd9d [fix] urlencode address list's link 2015-11-16 15:05:49 +05:30
Anand Doshi
1ed82834ce [fix] re-make setup wizard slides on change of language 2015-11-16 12:58:14 +05:30
Nabin Hait
cd87e76d88 [fix] Check Salary Structure validity 2015-11-15 11:06:55 +05:30
Rushabh Mehta
834b3e6f83 [fix] added missing address hook for website permissions 2015-11-13 14:38:12 +05:30
Nabin Hait
95d025f9aa Show Close button in Delivery Note and Purchase Receipt, only if it is returned and user has submit permission 2015-11-13 14:22:32 +05:30
Nabin Hait
90c6d7bb47 [fix] Invoice Outstanding calculation related to advance 2015-11-13 14:04:03 +05:30
Nabin Hait
59ba9e3d56 Merge pull request #4314 from anandpdoshi/fix/po-non-stock-receive
[fix] Don't show Receive for a Purchase Order having non-stock items, show Close button only for users with Submit rights
2015-11-13 13:59:04 +05:30
Rushabh Mehta
c1531e7008 [minor] catch SSL error on make_thumbnail, via support 2015-11-13 11:39:38 +05:30
Rushabh Mehta
511421b6a3 [minor] [enhancement] ability to make web-form standard, reload web-forms, merge after https://github.com/frappe/frappe/pull/1405 2015-11-13 11:04:50 +05:30
Rushabh Mehta
26c54bb4fb [minor] new quote 2015-11-13 10:42:20 +05:30
Anand Doshi
2c93d67463 Merge branch 'develop' 2015-11-12 20:37:12 +05:30
Anand Doshi
d4b05fbd51 bumped to version 6.8.4 2015-11-12 21:07:12 +06:00
Anand Doshi
d65a03d437 [fix] material request type in reorder 2015-11-12 20:36:44 +05:30
Anand Doshi
fd288d4211 Merge branch 'develop' 2015-11-12 20:35:48 +05:30
Anand Doshi
f774f75c63 bumped to version 6.8.3 2015-11-12 21:05:48 +06:00
Anand Doshi
e34a1b5fa2 Merge branch 'develop' 2015-11-12 20:01:53 +05:30
Anand Doshi
5f6546c8a5 bumped to version 6.8.2 2015-11-12 20:31:53 +06:00
Anand Doshi
ca5b593e38 [hotfix] setup wizard tax rate 2015-11-12 20:00:50 +05:30
Anand Doshi
cea5479f4d [fix] Don't show Receive for a Purchase Order having non-stock items, show Close button only for users with Submit rights 2015-11-12 18:39:57 +05:30
Anand Doshi
6303f84d45 [minor] fix test case 2015-11-12 18:11:58 +05:30
Anand Doshi
5dd00a7e89 Merge branch 'develop' 2015-11-12 17:42:41 +05:30
Anand Doshi
87c0e9f03a bumped to version 6.8.1 2015-11-12 18:12:41 +06:00
Anand Doshi
d40d1e9a59 [optimize] Payment Reconciliation and Payment Tool 2015-11-12 17:42:05 +05:30
Anand Doshi
e19abfbe70 Merge branch 'develop' 2015-11-12 17:10:49 +05:30
Anand Doshi
3fc1c44334 bumped to version 6.8.0 2015-11-12 17:40:48 +06:00
Anand Doshi
bb347f5afa [translations] 2015-11-12 16:39:58 +05:30
Anand Doshi
938b530ebf [change-log] 2015-11-12 15:44:09 +05:30
Anand Doshi
28962f26d4 Merge pull request #4307 from frappe/v5.x.x
[fix] Stock Entry additional costs patch fix for v4 accounts
2015-11-12 15:30:59 +05:30
Anand Doshi
0b5489ca88 Merge pull request #4312 from nabinhait/delete_uom_replace_utility
Deleted Stock UOM Replace Utility
2015-11-12 15:26:41 +05:30
Anand Doshi
adebf31041 Merge pull request #4313 from saurabh6790/doc
[help-page] drop-shipping documentation
2015-11-12 15:25:50 +05:30
Anand Doshi
7fbab12c5d Merge branch 'rmehta-setup-wizard-in-frappe' into develop 2015-11-12 12:48:31 +05:30
Saurabh
11cc43a5a6 [help-page] drop-shipping documentation 2015-11-12 12:39:21 +05:30
Nabin Hait
61fb7ee5b8 Deleted Stock UOM Replace Utility 2015-11-12 12:06:47 +05:30
Rushabh Mehta
37b4d75e4a [re-org] setup wizard in frappe 2015-11-12 11:45:47 +05:30
Anand Doshi
f71ecbba2c Merge pull request #4311 from rmehta/auth-rule-cleanup
Auth rule cleanup
2015-11-12 11:40:55 +05:30
Anand Doshi
c5c6c0669f [fix] gross profit 2015-11-12 11:07:32 +05:30
Anand Doshi
fe85b2ea17 Merge branch 'nabinhait-erpnext_docs' into develop 2015-11-10 18:59:55 +05:30
Anand Doshi
1c1eb7018c [docs] fixed Linked With and title 2015-11-10 18:58:56 +05:30
Anand Doshi
8df5b5e3a1 Merge branch 'develop' 2015-11-10 11:31:29 +05:30
Anand Doshi
39982a5f02 bumped to version 6.7.8 2015-11-10 12:01:29 +06:00
Rushabh Mehta
8f228dd7f9 [fix] [minor] closed not in notifications 2015-11-10 11:28:35 +05:30
Rushabh Mehta
739aa4d51a [minor] allow pricing rule to have negative discount 2015-11-09 17:05:12 +05:30
Nabin Hait
f9ef0e4e15 [docs] Fixed ref docs, image and video links 2015-11-09 15:41:45 +05:30
Nabin Hait
fc51ec7f58 [docs] Added existing erpnext manual 2015-11-09 14:40:34 +05:30
Nabin Hait
7ba4d02444 [docs] First commit for docs 2015-11-09 14:40:29 +05:30
Anand Doshi
87b5fcb3b5 Merge branch 'develop' 2015-11-09 13:17:49 +05:30
Anand Doshi
7489d29813 bumped to version 6.7.7 2015-11-09 13:47:49 +06:00
Anand Doshi
268d300030 Merge pull request #4297 from frappe/revert-4294-develop
Revert b28573ab03
2015-11-09 13:17:04 +05:30
Anand Doshi
7f77002015 Revert b28573ab03 2015-11-09 13:16:24 +05:30
Anand Doshi
b28573ab03 Merge pull request #4294 from neilLasrado/develop
[Minor fix] Allowed maintenance schedule to be imported via data import tool
2015-11-09 13:13:41 +05:30
Anand Doshi
c756ff67b0 Merge pull request #4296 from anandpdoshi/sales-order-allow-delivery
[fix] Allow both Purchase Order and Delivery from Sales Order, based on drop shipping checkbox
2015-11-09 13:13:14 +05:30
Anand Doshi
4e72ef1421 [fix] Allow both Purchase Order and Delivery from Sales Order, based on drop shipping checkbox 2015-11-09 13:01:49 +05:30
Neil Trini Lasrado
6b173f3a67 Allowed maintenance schedule to be imported via data import tool 2015-11-09 11:38:06 +05:30
Rushabh Mehta
bbcce8cca0 [minor] [cleanup] cosmetic cleanup and fix to start auth rule, did not do big cleanup 2015-11-09 11:28:51 +05:30
Rushabh Mehta
c438c1dec7 [minor] allow pricing rule to have negative discount 2015-11-07 20:28:43 +05:30
Anand Doshi
fcfced624a Merge branch 'develop' 2015-11-07 15:40:22 +05:30
Anand Doshi
64949bfc4b bumped to version 6.7.6 2015-11-07 16:10:22 +06:00
Anand Doshi
438c4fb279 [patch] reload doctype Leave Allocation 2015-11-07 15:38:29 +05:30
Rushabh Mehta
ae4c8a6a48 Merge branch 'develop' 2015-11-06 16:54:17 +05:30
Rushabh Mehta
0d7213122a bumped to version 6.7.5 2015-11-06 17:24:17 +06:00
Rushabh Mehta
4268b0092a [minor] don't show po / mr buttons if delivered 2015-11-06 16:52:18 +05:30
Rushabh Mehta
64e31e9a4e [fix] process payroll 2015-11-06 14:47:12 +05:30
Rushabh Mehta
0a0c267edb Merge branch 'develop' 2015-11-06 11:45:09 +05:30
Rushabh Mehta
1a8d4b6ea7 bumped to version 6.7.4 2015-11-06 12:15:09 +06:00
Rushabh Mehta
97426776bd Merge pull request #4281 from nabinhait/address_fix
[fix] Clear addressed and contacts on a new form
2015-11-06 11:02:31 +05:30
Rushabh Mehta
60e7f01fd4 Merge branch 'develop' 2015-11-06 10:49:53 +05:30
Rushabh Mehta
169089bdde bumped to version 6.7.3 2015-11-06 11:19:53 +06:00
Rushabh Mehta
c14f80838b [fix] [hot] leave allocation patch 2015-11-06 10:49:16 +05:30
Rushabh Mehta
a5007db902 Merge branch 'develop' 2015-11-06 10:41:06 +05:30
Rushabh Mehta
0d58501229 bumped to version 6.7.2 2015-11-06 11:11:06 +06:00
Nabin Hait
7c654cd1bb Leave allocation patch included 2015-11-06 10:37:26 +05:30
Rushabh Mehta
54fc260a42 [minor] trigger link triggers while mapping material request to po to set supplier default currency 2015-11-05 15:26:02 +05:30
Rushabh Mehta
7a39d51366 [fix] pull tax rate in item tax 2015-11-05 15:19:11 +05:30
Rushabh Mehta
79c94426f7 Merge pull request #4277 from nabinhait/gross_profit_fix
[fix][report] Buying amount for product bundle in Gross Profit report
2015-11-05 14:04:30 +05:30
Nabin Hait
c3ced9a0b5 [fix][report] Buying amount for product bundle in Gross Profit report 2015-11-05 13:13:31 +05:30
Rushabh Mehta
c825575940 Merge branch 'develop' 2015-11-05 10:51:31 +05:30
Rushabh Mehta
afd3209017 bumped to version 6.7.1 2015-11-05 11:21:31 +06:00
Rushabh Mehta
c541b87bb9 [thumbnail] remove attachment if fails 2015-11-05 10:49:42 +05:30
Rushabh Mehta
b42f3e34ef Merge branch 'develop' 2015-11-04 18:18:08 +05:30
Rushabh Mehta
6a7edd32aa bumped to version 6.7.0 2015-11-04 18:48:07 +06:00
Rushabh Mehta
fc307970aa [translations] 2015-11-04 18:02:45 +05:30
Rushabh Mehta
b9e7cb02f4 [change-log] 2015-11-04 17:02:13 +05:30
Rushabh Mehta
a20a419cb8 Merge pull request #4274 from saurabh6790/drop-shipping
[fixes] update delivery status
2015-11-04 16:41:22 +05:30
Saurabh
d805bd7daf [fixes] update delivery status 2015-11-04 16:40:09 +05:30
Rushabh Mehta
ac53f2dbb1 [test] [fix] 2015-11-04 15:47:08 +05:30
Rushabh Mehta
20a7d820ab [fix] shot ledger buttons for closed DN / PR 2015-11-04 15:31:41 +05:30
Rushabh Mehta
d48c2394e8 [cleanup] drop ship testing & cleanup 2015-11-04 15:24:04 +05:30
Rushabh Mehta
58101e9e6c Merge pull request #4272 from nabinhait/report-fix1
[report] Added delay in payment column
2015-11-04 13:18:42 +05:30
Rushabh Mehta
666131d2fe Merge pull request #4271 from saurabh6790/drop-shipping
Exclude warehouse from drop ship and re-open status for DN / PR
2015-11-04 13:18:20 +05:30
Rushabh Mehta
118f043335 Merge pull request #4270 from rmehta/email-digest-fix
Email digest fixes
2015-11-04 13:18:08 +05:30
Nabin Hait
b4a51ec80b [report] Added delay in payment column 2015-11-04 13:09:48 +05:30
Saurabh
6197860643 [fixes] test case update 2015-11-04 12:43:40 +05:30
Saurabh
95fbfa4928 [fixes] typo fixes 2015-11-04 12:10:01 +05:30
Saurabh
b7f0a4961e - no delivery / reserve warehouse in drop ship
- “Re-open” in DN / PR after “Stop” / “Close"
- check for closed status in reports
2015-11-04 12:03:54 +05:30
Rushabh Mehta
9c044eefff [cleanup] re-arrange drop ship field 2015-11-03 18:28:37 +05:30
Rushabh Mehta
5951692db0 [fix] cleanup stop-resume code 2015-11-03 18:20:39 +05:30
Rushabh Mehta
bd4814fbb7 [fix] email digest periods for weekly and monthly 2015-11-03 16:55:33 +05:30
Rushabh Mehta
7d23e4286e [minor] move item to top in stock module page 2015-11-03 16:25:09 +05:30
Rushabh Mehta
15ea751f3c Merge pull request #4268 from saurabh6790/drop-shipping
[fixes] missing delivered by supplier field
2015-11-03 10:43:27 +05:30
Saurabh
c40148e0da [fixes] missing delivered by supplier field 2015-11-03 10:32:46 +05:30
Rushabh Mehta
a9dda232b2 [minor] move item to top in stock module page 2015-11-02 17:47:50 +05:30
Rushabh Mehta
1f25c45ad7 Merge pull request #4266 from saurabh6790/fixes1
[fixes] args fixes
2015-11-02 16:26:40 +05:30
Saurabh
12ffd914ee [fixes] args fixes 2015-11-02 16:10:09 +05:30
Rushabh Mehta
b1d8979a59 Merge pull request #4179 from saurabh6790/drop-shipping
Drop shipping
2015-11-02 15:43:48 +05:30
Rushabh Mehta
ec2d0030b7 Merge pull request #4265 from nabinhait/jv_fix
[cleanup] Make Payment Entry from Order/Invoice
2015-11-02 15:23:01 +05:30
Rushabh Mehta
55d0506155 Merge pull request #4264 from superlack/patch-3
Update time_log_batch.py
2015-11-02 15:21:59 +05:30
Rushabh Mehta
5e9b52c273 Merge pull request #4263 from superlack/patch-2
Update time_log_batch_detail.json
2015-11-02 15:21:54 +05:30
Rushabh Mehta
00b4663e12 Merge pull request #4262 from saurabh6790/close_pr_dn
[feature] Close feature for Purchase Receipt and Delivery Note
2015-11-02 15:21:19 +05:30
Rushabh Mehta
e54a4004ec Merge pull request #4258 from anandpdoshi/fixes-3to6
[fix] issues encountered migrating from v3/4 to 6
2015-11-02 15:20:25 +05:30
Rushabh Mehta
d0b086ca54 Merge pull request #4255 from anandpdoshi/slovene-language
added Slovene and updated translations
2015-11-02 15:20:17 +05:30
Rushabh Mehta
8d1191ac8f Merge pull request #4252 from anandpdoshi/edge-case-website-variant-selection
[fix] Edge case in variant selection in website - when variant has less number of attributes than template
2015-11-02 15:20:10 +05:30
Rushabh Mehta
a938b81e1c Merge pull request #4251 from saurabh6790/hr
Leave allocation based on Date range
2015-11-02 15:19:55 +05:30
Saurabh
7cd0ba70d9 [fixes] typo error 2015-11-02 15:18:23 +05:30
Nabin Hait
66340f9894 [cleanup] Make Payment Entry from Order/Invoice 2015-11-02 14:40:47 +05:30
superlack
41f7f7442b Update time_log_batch.py 2015-11-02 00:39:36 -08:00
superlack
126fb31f9a Update time_log_batch_detail.json 2015-11-02 00:38:17 -08:00
Saurabh
a8a91cca16 [feature] Close feature for Purchase Receipt and Delivery Note 2015-11-02 12:57:08 +05:30
Saurabh
381385d19a [fixes] add status 'Closed' in filter creating PR, PI from PO and SI, DN from SO 2015-11-02 11:30:51 +05:30
Anand Doshi
aba8fdd18d [fix] issues encountered migrating from v3/4 to 6 2015-10-31 22:49:42 +05:30
Nabin Hait
915778fb69 [fix] Clear addressed and contacts on a new form 2015-10-30 14:43:13 +05:30
Anand Doshi
bacc679df5 [language] added Slovene and updated translations 2015-10-30 12:54:27 +05:30
Anand Doshi
b0388d971a [minor] reduced size of video placeholder 2015-10-30 12:54:10 +05:30
Saurabh
61c9ea938d [Change Log] change log entry for drop shipment 2015-10-30 12:02:24 +05:30
Saurabh
6956eee790 [fixes] test case and code rewrite 2015-10-29 19:43:35 +05:30
Saurabh
2e65aadb1e [fixes] reload doc after status update and supplier address fetching 2015-10-29 19:43:35 +05:30
Saurabh
653cffec1e [change_log and fixes] set print hide, add change_log 2015-10-29 19:43:35 +05:30
Saurabh
cc8f1afa56 [fixes] test case fixes for drop shipping 2015-10-29 19:43:35 +05:30
Saurabh
2f702dcb32 [fixes] bulk close facility, rename Drop Ship to Delivered By Supplier 2015-10-29 19:43:35 +05:30
Saurabh
f857d81f35 [fixes]test case to check updated delivered qty 2015-10-29 19:43:34 +05:30
Saurabh
6d64fe378d [fixes] remover per_ordered field and update delivered qty from perchase order via delivered by supplier -1 2015-10-29 19:43:34 +05:30
Saurabh
b0ab93f779 [fixes] typo error 2015-10-29 19:43:34 +05:30
Saurabh
df1c1a573f [fixes] test case for per_ordered 2015-10-29 19:43:34 +05:30
Saurabh
a1f2aec918 [fixes] check ordered and reserved qrt, check closed status for so and po 2015-10-29 19:43:34 +05:30
Saurabh
d8930a776d [fixes] test case import fix 2015-10-29 19:43:34 +05:30
Saurabh
8a8ef85174 [fixes] reviwe fixes 2015-10-29 19:43:33 +05:30
Saurabh
edba048c14 [fixes] set is_stock_item for test items 2015-10-29 19:43:33 +05:30
Saurabh
b705798ccb [enhance & fixes] Print Format on PO for Drop Shipping 2015-10-29 19:43:33 +05:30
Saurabh
5e0b0b4b97 [enhance] make PO from SO if supplier is specified 2015-10-29 19:43:33 +05:30
Saurabh
a4efbf0db7 [fixes] check for close status 2015-10-29 19:43:33 +05:30
Saurabh
e930f0f74e [fixes] filter on supplier list for DropShip, checking closed status 2015-10-29 19:43:33 +05:30
Saurabh
99543f72d8 [fixes] test case for drop shipping and minor fixes for test_reserved_qty_for_partial_delivery & test_reserved_qty_for_partial_delivery_with_packing_list 2015-10-29 19:43:32 +05:30
Saurabh
1a9646739a [fixes][rename-field-name] drop_ship to is_drop_ship 2015-10-29 19:43:32 +05:30
Saurabh
bd65cb8817 [fixes] field rename and test case for drop ship 2015-10-29 19:43:32 +05:30
Saurabh
98b287565a [enhance] close purchase order 2015-10-29 19:43:32 +05:30
Saurabh
c6dbe70256 [Fixes] Drop Shipping 2015-10-29 19:43:32 +05:30
Saurabh
556536615e [minor fix] Status fix in listview 2015-10-29 19:43:31 +05:30
Saurabh
8bd96f1c08 [Test Case] Test case to check drop shipping 2015-10-29 19:43:31 +05:30
Saurabh
5b7e9a1c94 [minor fixes] 2015-10-29 19:43:31 +05:30
Saurabh
c306b21415 [merge fixes] 2015-10-29 19:43:31 +05:30
Anand Doshi
c39cef363c [fix] stop welcome video if user moves to another page 2015-10-29 18:37:17 +05:30
Nabin Hait
baefec4498 Merge branch 'develop' 2015-10-29 16:35:06 +05:30
Nabin Hait
02a56b4e1a bumped to version 6.6.7 2015-10-29 17:05:06 +06:00
Nabin Hait
9a6df0341f Merge pull request #4246 from anandpdoshi/welcome-to-erpnext
Show Welcome to ERPNext after completing Setup Wizard
2015-10-29 16:29:10 +05:30
Nabin Hait
5a90e3b2e9 Merge pull request #4254 from nabinhait/pr_qty
[fix] Consider Rejected Qty for Qty validation in Purchase Receipt
2015-10-29 16:27:02 +05:30
Anand Doshi
7dab3c1f85 Show Welcome to ERPNext after completing Setup Wizard 2015-10-29 15:32:00 +05:30
Nabin Hait
f9a974385a [fix] Consider Rejected Qty for Qty validation in Purchase Receipt 2015-10-29 14:54:29 +05:30
Saurabh
20a653e829 [fixes] Test case fixes for leave application 2015-10-29 14:27:57 +05:30
Saurabh
a2c668cb77 [fixes] patch, test cases and validations 2015-10-29 14:27:57 +05:30
Saurabh
d0b0a80be3 [enhacement] remove fiscal year from leave allocation 2015-10-29 14:27:57 +05:30
Anand Doshi
532b9e8bfb [fix] Edge case in variant selection in website - when variant has less number of attributes than template 2015-10-29 13:20:07 +05:30
Anand Doshi
32e48bb568 Merge pull request #4250 from anandpdoshi/disable-item
[enhancement] Ability to disable an Item
2015-10-29 13:12:20 +05:30
Anand Doshi
21e09a2bd8 [enhancement] Ability to disable an Item 2015-10-29 12:39:47 +05:30
Nabin Hait
1aa6e98136 Merge pull request #4249 from nabinhait/cc_fix
[fix] Default cost center as per company
2015-10-29 12:28:20 +05:30
Nabin Hait
023c036afa Merge pull request #4248 from anandpdoshi/item-variant-expired
[fix] don't show expired items in website item list. Fixes #4210.
2015-10-29 12:28:03 +05:30
Nabin Hait
8372c44262 [fix] Default cost center as per company 2015-10-29 11:50:36 +05:30
Anand Doshi
6d69ca6bac [fix] don't show expired items in website item list. Fixes #4210. 2015-10-29 11:35:16 +05:30
Nabin Hait
283b55f88c Merge branch 'develop' 2015-10-28 16:07:13 +05:30
Nabin Hait
4757d0634a bumped to version 6.6.6 2015-10-28 16:37:13 +06:00
Nabin Hait
dc8ce7f7e9 Merge pull request #4245 from nabinhait/sr_no
[fix] Serial No query in Warranty Claim
2015-10-28 15:51:32 +05:30
Nabin Hait
d02375e89d Merge branch 'anandpdoshi-file-fix' into develop 2015-10-28 15:50:41 +05:30
Nabin Hait
a90a0528aa Fixed conflict 2015-10-28 15:50:26 +05:30
Nabin Hait
350f9592d3 Merge pull request #4237 from sbkolate/develop
[minor] Update Help Video Links in Buying, CRM, Selling  #4233
2015-10-28 15:44:39 +05:30
Nabin Hait
43e50de6ef Merge pull request #4243 from nabinhait/last_pur_rate
[patch] Deleted Item-wise Last Purchase Rate report
2015-10-28 15:42:35 +05:30
Nabin Hait
a530f410e3 Merge pull request #4242 from nabinhait/to_warehouse_dn
[fix] Ignore users permission for To Warehouse field in Delivery Note
2015-10-28 15:42:16 +05:30
Nabin Hait
bdfb070ed6 [fix] Serial No query in Warranty Claim 2015-10-28 15:38:22 +05:30
Anand Doshi
caa9fc033f [hotfix] vietnamese translation for Debit Note 2015-10-28 14:34:48 +05:30
Nabin Hait
15bf4e5599 [patch] Deleted Item-wise Last Purchase Rate report 2015-10-28 12:48:32 +05:30
Nabin Hait
6d490e530a [fix] Ignore users permission for To Warehouse field in Delivery Note 2015-10-28 12:43:45 +05:30
Rushabh Mehta
9b363fe5f1 Merge pull request #4240 from hubdotcom/patch-1
change to JavaScript
2015-10-28 10:10:23 +05:30
Jamie
3c5df9f64c change to JavaScript 2015-10-27 16:37:45 +00:00
Sambhaji Kolate
fd53991dfa [minor] Update Help Video Links in Buying, CRM, Selling #4233 2015-10-27 17:01:27 +05:30
Anand Doshi
c794ca53fb [fix] delete file records created via item.py even if website_image file didn't exist 2015-10-27 16:56:42 +05:30
Nabin Hait
fa0adafa82 Merge branch 'develop' 2015-10-27 11:29:35 +05:30
Nabin Hait
99f4b43641 bumped to version 6.6.5 2015-10-27 11:59:35 +06:00
Nabin Hait
fdeab29e94 Removed console.log 2015-10-27 11:23:43 +05:30
Nabin Hait
31755b485f Merge pull request #4232 from anandpdoshi/variant-smart-selection
Numeric attribute selector, smart selection of variant based on attribute combinations
2015-10-27 11:22:54 +05:30
Anand Doshi
3f3696d1eb [enhancement] [website] numeric attribute selector, smart selection of variant based on attribute combinations 2015-10-26 21:55:34 +05:30
Nabin Hait
e1a478779c Merge pull request #4231 from nabinhait/pos_fix
[fix] Is POS trigger
2015-10-26 18:22:04 +05:30
Nabin Hait
6c6f3789d0 [fix] Is POS trigger 2015-10-26 18:01:12 +05:30
Nabin Hait
044c43a5cb Merge pull request #4230 from nabinhait/fix26
minor fix
2015-10-26 17:43:17 +05:30
Nabin Hait
9ce9c052e4 Merge pull request #4229 from nabinhait/fix25
[fix] Account Type in Chart of Accounts
2015-10-26 17:43:11 +05:30
Nabin Hait
83e68bb837 minor fix 2015-10-26 17:40:31 +05:30
Nabin Hait
415df04834 [fix] Account Type in Chart of Accounts 2015-10-26 16:43:09 +05:30
Nabin Hait
6d2d6862d6 Merge pull request #4228 from nabinhait/exchange_rate
[fix] account currency is not mandatory in get exchange rate
2015-10-26 15:27:19 +05:30
Nabin Hait
13a65d52dd Merge pull request #4226 from nabinhait/email_digest
[fix] Events in Email Digest
2015-10-26 14:47:09 +05:30
Nabin Hait
6485d4a749 [fix] account currency is not mandatory in get exchange rate 2015-10-26 14:31:17 +05:30
Nabin Hait
2e63c80523 Merge pull request #4220 from nabinhait/fix21
Don't delete tax template and pos profile while deleting company transactions
2015-10-26 14:14:44 +05:30
Nabin Hait
23bd21778e [fix] Events in Email Digest 2015-10-26 14:14:09 +05:30
Nabin Hait
a3f490890d Merge pull request #4227 from nabinhait/dn_to_wh
[fix] Label changed for Target Warehouse in Delivery Note
2015-10-26 13:02:59 +05:30
Nabin Hait
8e3ea32d6d Merge pull request #4222 from nabinhait/tax_rule
Set tax rule based on date
2015-10-26 13:02:21 +05:30
Nabin Hait
c4a1a943ef Merge pull request #4221 from nabinhait/fix22
[fix] Value mapping while making bank entry from Expense Claim
2015-10-26 13:00:52 +05:30
Nabin Hait
abc0b64b68 [fix] Label changed for Target Warehouse in Delivery Note 2015-10-26 11:58:43 +05:30
Nabin Hait
00818bfa90 Set tax rule based on date 2015-10-23 16:26:09 +05:30
Anand Doshi
b9bfe6117e [optimization] Stock Projected Qty report 2015-10-23 14:49:09 +05:30
Nabin Hait
7a9f46d9d1 [fix] Value mapping while making bank entry from Expense Claim 2015-10-23 13:19:01 +05:30
Nabin Hait
a10b52c6e6 Don't delete tax template and pos profile while deleting company transactions 2015-10-23 13:02:55 +05:30
Rushabh Mehta
5033e7b431 [hot] fix stock projected qty 2015-10-23 10:51:56 +05:30
Rushabh Mehta
e6791ee78e [fix] digest values in absolute 2015-10-23 10:39:46 +05:30
Anand Doshi
b84ba868e6 Merge branch 'develop' 2015-10-22 22:02:59 +05:30
Anand Doshi
1c501b6aac bumped to version 6.6.4 2015-10-22 22:32:59 +06:00
Anand Doshi
9a2a6d8fcb [hotfix] setup wizard is_pro_application if not service 2015-10-22 22:02:22 +05:30
Anand Doshi
0b59d1c78b Merge branch 'develop' 2015-10-22 21:59:21 +05:30
Anand Doshi
0fbf10797c bumped to version 6.6.3 2015-10-22 22:29:21 +06:00
Anand Doshi
58344cbb81 [hotfix] setup wizard is_pro_application if not service 2015-10-22 21:57:13 +05:30
Anand Doshi
c6e2c8f79e Merge branch 'develop' 2015-10-22 19:36:09 +05:30
Anand Doshi
b64b461d53 bumped to version 6.6.2 2015-10-22 20:06:09 +06:00
Anand Doshi
0b93bdcf40 [fix] get_party_gle_currency caching 2015-10-22 19:33:08 +05:30
Anand Doshi
e3910d02a5 Merge branch 'develop' 2015-10-22 18:53:19 +05:30
Anand Doshi
0af146cea6 bumped to version 6.6.1 2015-10-22 19:23:19 +06:00
Anand Doshi
683f756d0f [fix] Fetch company of employee in leave application 2015-10-22 18:52:15 +05:30
Anand Doshi
d905204e49 [fix] Update expense account in old purchase invoices if missing 2015-10-22 18:49:08 +05:30
Anand Doshi
d8bc40d7f0 [fix] party gle currency validation 2015-10-22 17:55:22 +05:30
Nabin Hait
e9b445c853 [fix] Stock Entry additional costs patch fix for v4 accounts 2015-09-05 11:17:11 +05:30
2224 changed files with 183496 additions and 61092 deletions

View File

@@ -6,7 +6,7 @@
Includes: Accounting, Inventory, CRM, Sales, Purchase, Projects, HRMS. Requires MariaDB.
ERPNext is built on the [Frappe](https://github.com/frappe/frappe) Framework, a full-stack web app framework in Python & Javascript.
ERPNext is built on the [Frappe](https://github.com/frappe/frappe) Framework, a full-stack web app framework in Python & JavaScript.
- [User Guide](https://manual.erpnext.com)
- [Getting Help](http://erpnext.org/getting-help.html)

View File

@@ -1,2 +1,2 @@
from __future__ import unicode_literals
__version__ = '6.6.0'
__version__ = '6.13.0'

View File

@@ -20,6 +20,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"permlevel": 0,
@@ -41,6 +42,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -63,6 +65,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Account Name",
"length": 0,
"no_copy": 1,
"oldfieldname": "account_name",
"oldfieldtype": "Data",
@@ -87,6 +90,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Is Group",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -109,6 +113,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"oldfieldname": "company",
"oldfieldtype": "Link",
@@ -132,7 +137,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Root Type",
"label": "Root Type",
"length": 0,
"no_copy": 0,
"options": "\nAsset\nLiability\nIncome\nExpense\nEquity",
"permlevel": 0,
@@ -154,7 +160,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Report Type",
"label": "Report Type",
"length": 0,
"no_copy": 0,
"options": "\nBalance Sheet\nProfit and Loss",
"permlevel": 0,
@@ -178,6 +185,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Currency",
"length": 0,
"no_copy": 0,
"options": "Currency",
"permlevel": 0,
@@ -200,6 +208,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -222,6 +231,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Parent Account",
"length": 0,
"no_copy": 0,
"oldfieldname": "parent_account",
"oldfieldtype": "Link",
@@ -246,7 +256,8 @@
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Account Type",
"label": "Account Type",
"length": 0,
"no_copy": 0,
"oldfieldname": "account_type",
"oldfieldtype": "Select",
@@ -272,6 +283,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Rate",
"length": 0,
"no_copy": 0,
"oldfieldname": "tax_rate",
"oldfieldtype": "Currency",
@@ -295,7 +307,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Frozen",
"label": "Frozen",
"length": 0,
"no_copy": 0,
"oldfieldname": "freeze_account",
"oldfieldtype": "Select",
@@ -320,6 +333,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Warehouse",
"length": 0,
"no_copy": 0,
"options": "Warehouse",
"permlevel": 0,
@@ -341,7 +355,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Balance must be",
"label": "Balance must be",
"length": 0,
"no_copy": 0,
"options": "\nDebit\nCredit",
"permlevel": 0,
@@ -364,6 +379,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Lft",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
@@ -385,6 +401,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Rgt",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
@@ -406,6 +423,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Old Parent",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
@@ -426,7 +444,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:38:37.436071",
"max_attachments": 0,
"modified": "2015-11-16 06:29:41.535663",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Account",

View File

@@ -65,12 +65,19 @@ class Account(Document):
if self.root_type != db_value.root_type:
frappe.db.sql("update `tabAccount` set root_type=%s where lft > %s and rgt < %s",
(self.root_type, self.lft, self.rgt))
if self.root_type and not self.report_type:
self.report_type = "Balance Sheet" \
if self.root_type in ("Asset", "Liability", "Equity") else "Profit and Loss"
def validate_root_details(self):
# does not exists parent
if frappe.db.exists("Account", self.name):
if not frappe.db.get_value("Account", self.name, "parent_account"):
throw(_("Root cannot be edited."), RootNotEditable)
if not self.parent_account and not self.is_group:
frappe.throw(_("Root Account must be a group"))
def validate_frozen_accounts_modifier(self):
old_value = frappe.db.get_value("Account", self.name, "freeze_account")
@@ -127,11 +134,11 @@ class Account(Document):
and docstatus != 2""", self.name)
def validate_mandatory(self):
if not self.report_type:
throw(_("Report Type is mandatory"))
if not self.root_type:
throw(_("Root Type is mandatory"))
if not self.report_type:
throw(_("Report Type is mandatory"))
def validate_warehouse_account(self):
if not cint(frappe.defaults.get_global_default("auto_accounting_for_stock")):
@@ -147,6 +154,8 @@ class Account(Document):
self.validate_warehouse(old_warehouse)
if self.warehouse:
self.validate_warehouse(self.warehouse)
elif self.warehouse:
self.warehouse = None
def validate_warehouse(self, warehouse):
if frappe.db.get_value("Stock Ledger Entry", {"warehouse": warehouse}):

View File

@@ -11,7 +11,10 @@
"IVA por Cobrar": {},
"Retenciones de IVA recibidas": {}
},
"Inventario": {}
"Inventario": {
"is_group": 1,
"account_type": "Stock"
}
},
"No Corriente": {
"Activos Fijos": {},

View File

@@ -2,10 +2,29 @@
// License: GNU General Public License v3. See license.txt
frappe.ui.form.on("Bank Reconciliation", {
setup: function(frm) {
frm.get_docfield("journal_entries").allow_bulk_edit = 1;
frm.add_fetch("bank_account", "account_currency", "account_currency");
},
onload: function(frm) {
frm.set_query("bank_account", function() {
return {
"filters": {
"account_type": "Bank",
"is_group": 0
}
};
});
frm.set_value("from_date", frappe.datetime.month_start());
frm.set_value("to_date", frappe.datetime.month_end());
},
refresh: function(frm) {
frm.disable_save();
},
update_clearance_date: function(frm) {
return frappe.call({
method: "update_details",
@@ -22,19 +41,3 @@ frappe.ui.form.on("Bank Reconciliation", {
});
}
});
cur_frm.cscript.onload = function(doc, cdt, cdn) {
cur_frm.add_fetch("bank_account", "company", "company");
cur_frm.set_query("bank_account", function() {
return {
"filters": {
"account_type": "Bank",
"is_group": 0
}
};
});
cur_frm.set_value("from_date", frappe.datetime.month_start());
cur_frm.set_value("to_date", frappe.datetime.month_end());
}

View File

@@ -19,10 +19,12 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Bank 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": 1,
@@ -34,17 +36,19 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "company",
"fieldname": "account_currency",
"fieldtype": "Link",
"hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Company",
"in_list_view": 0,
"label": "Account Currency",
"length": 0,
"no_copy": 0,
"options": "Company",
"options": "Currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -63,9 +67,11 @@
"in_filter": 0,
"in_list_view": 1,
"label": "From Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -84,9 +90,11 @@
"in_filter": 0,
"in_list_view": 1,
"label": "To Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -105,9 +113,11 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Include Reconciled 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,
@@ -126,10 +136,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Get Relevant Entries",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -148,10 +160,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Journal Entries",
"length": 0,
"no_copy": 0,
"options": "Bank Reconciliation Detail",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -170,10 +184,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Update Clearance Date",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -192,10 +208,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Amount",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"options": "account_currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -213,7 +231,9 @@
"is_submittable": 0,
"issingle": 1,
"istable": 0,
"modified": "2015-02-05 05:11:34.776660",
"max_attachments": 0,
"menu_index": 0,
"modified": "2015-11-30 12:44:45.105451",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Reconciliation",
@@ -241,5 +261,6 @@
}
],
"read_only": 1,
"read_only_onload": 0
"read_only_onload": 0,
"version": 0
}

View File

@@ -15,12 +15,11 @@ class BankReconciliation(Document):
condition = ""
if not self.include_reconciled_entries:
condition = "and ifnull(clearance_date, '') in ('', '0000-00-00')"
condition = "and (clearance_date is null or clearance_date='0000-00-00')"
dl = frappe.db.sql("""select t1.name, t1.cheque_no, t1.cheque_date, t2.debit,
t2.credit, t1.posting_date, t2.against_account, t1.clearance_date,
t2.reference_type, t2.reference_name
dl = frappe.db.sql("""select t1.name, t1.cheque_no, t1.cheque_date, t2.debit_in_account_currency,
t2.credit_in_account_currency, t1.posting_date, t2.against_account, t1.clearance_date
from
`tabJournal Entry` t1, `tabJournal Entry Account` t2
where
@@ -39,11 +38,11 @@ class BankReconciliation(Document):
nl.voucher_id = d.name
nl.cheque_number = d.cheque_no
nl.cheque_date = d.cheque_date
nl.debit = d.debit
nl.credit = d.credit
nl.debit = d.debit_in_account_currency
nl.credit = d.credit_in_account_currency
nl.against_account = d.against_account
nl.clearance_date = d.clearance_date
self.total_amount += flt(d.debit) - flt(d.credit)
self.total_amount += flt(d.debit_in_account_currency) - flt(d.credit_in_account_currency)
def update_details(self):
vouchers = []

View File

@@ -18,35 +18,14 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Voucher ID",
"length": 0,
"no_copy": 0,
"oldfieldname": "voucher_id",
"oldfieldtype": "Link",
"options": "Journal Entry",
"permlevel": 0,
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "clearance_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Clearance Date",
"no_copy": 0,
"oldfieldname": "clearance_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -65,34 +44,13 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Against Account",
"length": 0,
"no_copy": 0,
"oldfieldname": "against_account",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "cheque_number",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Cheque Number",
"no_copy": 0,
"oldfieldname": "cheque_number",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -111,12 +69,14 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Debit",
"length": 0,
"no_copy": 0,
"oldfieldname": "debit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"options": "account_currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -135,12 +95,14 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Credit",
"length": 0,
"no_copy": 0,
"oldfieldname": "credit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"options": "account_currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -152,47 +114,25 @@
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "reference_type",
"fieldtype": "Link",
"fieldname": "column_break_5",
"fieldtype": "Column Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Reference Type",
"length": 0,
"no_copy": 0,
"options": "DocType",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"read_only": 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,
"collapsible": 0,
"fieldname": "reference_name",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Reference Name",
"no_copy": 0,
"options": "reference_type",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
"unique": 0,
"width": "50%"
},
{
"allow_on_submit": 0,
@@ -205,11 +145,38 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Posting Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "posting_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"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,
"collapsible": 0,
"fieldname": "cheque_number",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Cheque Number",
"length": 0,
"no_copy": 0,
"oldfieldname": "cheque_number",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -226,19 +193,69 @@
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"in_list_view": 0,
"label": "Cheque Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "cheque_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"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,
"collapsible": 0,
"fieldname": "clearance_date",
"fieldtype": "Date",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Clearance Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "clearance_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"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,
"collapsible": 0,
"fieldname": "data_10",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
],
"hide_heading": 0,
@@ -249,12 +266,15 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:38:39.149782",
"max_attachments": 0,
"menu_index": 0,
"modified": "2015-12-04 11:01:24.286320",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Bank Reconciliation Detail",
"owner": "Administrator",
"permissions": [],
"read_only": 0,
"read_only_onload": 0
"read_only_onload": 0,
"version": 0
}

View File

@@ -19,6 +19,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Account",
"length": 0,
"no_copy": 0,
"oldfieldname": "account",
"oldfieldtype": "Link",
@@ -43,6 +44,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Budget Allocated",
"length": 0,
"no_copy": 0,
"oldfieldname": "budget_allocated",
"oldfieldtype": "Currency",
@@ -67,6 +69,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Fiscal Year",
"length": 0,
"no_copy": 0,
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
@@ -89,7 +92,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:38:40.727468",
"max_attachments": 0,
"modified": "2015-11-16 06:29:43.050558",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Budget Detail",

View File

@@ -18,6 +18,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -40,7 +41,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Series",
"label": "Series",
"length": 0,
"no_copy": 0,
"options": "C-FORM-",
"permlevel": 0,
@@ -63,6 +65,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "C-Form No",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -84,6 +87,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Received Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -105,6 +109,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Customer",
"length": 0,
"no_copy": 0,
"options": "Customer",
"permlevel": 0,
@@ -126,6 +131,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -149,6 +155,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
@@ -171,6 +178,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Fiscal Year",
"length": 0,
"no_copy": 0,
"options": "Fiscal Year",
"permlevel": 0,
@@ -192,7 +200,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Quarter",
"label": "Quarter",
"length": 0,
"no_copy": 0,
"options": "\nI\nII\nIII\nIV",
"permlevel": 0,
@@ -215,6 +224,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Amount",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -237,6 +247,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "State",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -257,6 +268,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -278,6 +290,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Invoices",
"length": 0,
"no_copy": 0,
"options": "C-Form Invoice Detail",
"permlevel": 0,
@@ -300,6 +313,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Invoiced Amount",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -322,6 +336,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "C-Form",
"permlevel": 0,
@@ -344,7 +359,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 3,
"modified": "2015-10-02 07:38:40.926061",
"modified": "2015-11-16 06:29:43.143528",
"modified_by": "Administrator",
"module": "Accounts",
"name": "C-Form",

View File

@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
# test_records = frappe.get_test_records('C-Form')
class TestCForm(unittest.TestCase):
pass

View File

@@ -18,6 +18,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Invoice No",
"length": 0,
"no_copy": 0,
"options": "Sales Invoice",
"permlevel": 0,
@@ -42,6 +43,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Invoice Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -66,6 +68,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Territory",
"length": 0,
"no_copy": 0,
"options": "Territory",
"permlevel": 0,
@@ -90,6 +93,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Net Total",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -114,6 +118,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Grand Total",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -136,7 +141,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:38:41.105885",
"max_attachments": 0,
"modified": "2015-11-16 06:29:43.221484",
"modified_by": "Administrator",
"module": "Accounts",
"name": "C-Form Invoice Detail",

View File

@@ -21,6 +21,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -42,6 +43,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Cost Center Name",
"length": 0,
"no_copy": 1,
"oldfieldname": "cost_center_name",
"oldfieldtype": "Data",
@@ -65,6 +67,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Parent Cost Center",
"length": 0,
"no_copy": 0,
"oldfieldname": "parent_cost_center",
"oldfieldtype": "Link",
@@ -89,6 +92,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Company",
"length": 0,
"no_copy": 0,
"oldfieldname": "company_name",
"oldfieldtype": "Link",
@@ -112,6 +116,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -135,6 +140,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Is Group",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -158,6 +164,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Budget",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -180,6 +187,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Distribution Id",
"length": 0,
"no_copy": 0,
"oldfieldname": "distribution_id",
"oldfieldtype": "Link",
@@ -205,6 +213,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Budgets",
"length": 0,
"no_copy": 0,
"oldfieldname": "budget_details",
"oldfieldtype": "Table",
@@ -229,6 +238,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "lft",
"length": 0,
"no_copy": 1,
"oldfieldname": "lft",
"oldfieldtype": "Int",
@@ -252,6 +262,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "rgt",
"length": 0,
"no_copy": 1,
"oldfieldname": "rgt",
"oldfieldtype": "Int",
@@ -275,6 +286,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "old_parent",
"length": 0,
"no_copy": 1,
"oldfieldname": "old_parent",
"oldfieldtype": "Data",
@@ -298,7 +310,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:38:42.617993",
"max_attachments": 0,
"modified": "2015-11-16 06:29:43.870712",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Cost Center",

View File

@@ -22,6 +22,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Year Name",
"length": 0,
"no_copy": 0,
"oldfieldname": "year",
"oldfieldtype": "Data",
@@ -45,6 +46,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Disabled",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -67,6 +69,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Year Start Date",
"length": 0,
"no_copy": 1,
"oldfieldname": "year_start_date",
"oldfieldtype": "Date",
@@ -90,6 +93,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Year End Date",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
@@ -111,6 +115,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Companies",
"length": 0,
"no_copy": 0,
"options": "Fiscal Year Company",
"permlevel": 0,
@@ -133,7 +138,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:38:50.942038",
"max_attachments": 0,
"modified": "2015-11-16 06:29:47.289982",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Fiscal Year",

View File

@@ -19,6 +19,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
@@ -39,7 +40,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:38:51.045350",
"max_attachments": 0,
"modified": "2015-11-16 06:29:47.344839",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Fiscal Year Company",

View File

@@ -19,6 +19,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Posting Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "posting_date",
"oldfieldtype": "Date",
@@ -42,6 +43,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Transaction Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "transaction_date",
"oldfieldtype": "Date",
@@ -65,6 +67,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Account",
"length": 0,
"no_copy": 0,
"oldfieldname": "account",
"oldfieldtype": "Link",
@@ -89,6 +92,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Party Type",
"length": 0,
"no_copy": 0,
"options": "DocType",
"permlevel": 0,
@@ -111,6 +115,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Party",
"length": 0,
"no_copy": 0,
"options": "party_type",
"permlevel": 0,
@@ -133,6 +138,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Cost Center",
"length": 0,
"no_copy": 0,
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
@@ -157,6 +163,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Debit Amount",
"length": 0,
"no_copy": 0,
"oldfieldname": "debit",
"oldfieldtype": "Currency",
@@ -182,6 +189,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Credit Amount",
"length": 0,
"no_copy": 0,
"oldfieldname": "credit",
"oldfieldtype": "Currency",
@@ -207,6 +215,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Account Currency",
"length": 0,
"no_copy": 0,
"options": "Currency",
"permlevel": 0,
@@ -230,6 +239,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Debit Amount in Account Currency",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -253,6 +263,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Credit Amount in Account Currency",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -276,6 +287,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Against",
"length": 0,
"no_copy": 0,
"oldfieldname": "against",
"oldfieldtype": "Text",
@@ -299,6 +311,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Against Voucher Type",
"length": 0,
"no_copy": 0,
"oldfieldname": "against_voucher_type",
"oldfieldtype": "Data",
@@ -323,6 +336,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Against Voucher",
"length": 0,
"no_copy": 0,
"oldfieldname": "against_voucher",
"oldfieldtype": "Data",
@@ -347,6 +361,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Voucher Type",
"length": 0,
"no_copy": 0,
"oldfieldname": "voucher_type",
"oldfieldtype": "Select",
@@ -371,6 +386,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Voucher No",
"length": 0,
"no_copy": 0,
"oldfieldname": "voucher_no",
"oldfieldtype": "Data",
@@ -395,6 +411,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Remarks",
"length": 0,
"no_copy": 1,
"oldfieldname": "remarks",
"oldfieldtype": "Text",
@@ -418,6 +435,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Is Opening",
"length": 0,
"no_copy": 0,
"oldfieldname": "is_opening",
"oldfieldtype": "Select",
@@ -442,6 +460,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Is Advance",
"length": 0,
"no_copy": 0,
"oldfieldname": "is_advance",
"oldfieldtype": "Select",
@@ -466,6 +485,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Fiscal Year",
"length": 0,
"no_copy": 0,
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
@@ -490,6 +510,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"oldfieldname": "company",
"oldfieldtype": "Link",
@@ -513,7 +534,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-10-20 12:10:59.771050",
"max_attachments": 0,
"modified": "2015-11-16 06:29:47.382225",
"modified_by": "Administrator",
"module": "Accounts",
"name": "GL Entry",

View File

@@ -6,7 +6,7 @@ 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, get_party_account_currency
from erpnext.accounts.party import validate_party_gle_currency
from erpnext.accounts.utils import get_account_currency
from erpnext.setup.doctype.company.company import get_company_currency
from erpnext.exceptions import InvalidAccountCurrency, CustomerFrozen
@@ -114,19 +114,13 @@ class GLEntry(Document):
.format(self.account, (account_currency or company_currency)), InvalidAccountCurrency)
if self.party_type and self.party:
party_account_currency = get_party_account_currency(self.party_type, self.party, self.company)
if party_account_currency != self.account_currency:
frappe.throw(_("Accounting Entry for {0}: {1} can only be made in currency: {2}")
.format(self.party_type, self.party, party_account_currency), InvalidAccountCurrency)
validate_party_gle_currency(self.party_type, self.party, self.company)
validate_party_gle_currency(self.party_type, self.party, self.company, self.account_currency)
def validate_balance_type(account, adv_adj=False):
if not adv_adj and account:
balance_must_be = frappe.db.get_value("Account", account, "balance_must_be")
if balance_must_be:
balance = frappe.db.sql("""select sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))
balance = frappe.db.sql("""select sum(debit) - sum(credit)
from `tabGL Entry` where account = %s""", account)[0][0]
if (balance_must_be=="Debit" and flt(balance) < 0) or \
@@ -148,14 +142,14 @@ def check_freezing_date(posting_date, adv_adj=False):
def update_outstanding_amt(account, party_type, party, against_voucher_type, against_voucher, on_cancel=False):
if party_type and party:
party_condition = " and ifnull(party_type, '')='{0}' and ifnull(party, '')='{1}'"\
party_condition = " and party_type='{0}' and party='{1}'"\
.format(frappe.db.escape(party_type), frappe.db.escape(party))
else:
party_condition = ""
# get final outstanding amt
bal = flt(frappe.db.sql("""
select sum(ifnull(debit_in_account_currency, 0)) - sum(ifnull(credit_in_account_currency, 0))
select sum(debit_in_account_currency) - sum(credit_in_account_currency)
from `tabGL Entry`
where against_voucher_type=%s and against_voucher=%s
and account = %s {0}""".format(party_condition),
@@ -165,9 +159,9 @@ def update_outstanding_amt(account, party_type, party, against_voucher_type, aga
bal = -bal
elif against_voucher_type == "Journal Entry":
against_voucher_amount = flt(frappe.db.sql("""
select sum(ifnull(debit_in_account_currency, 0)) - sum(ifnull(credit_in_account_currency, 0))
select sum(debit_in_account_currency) - sum(credit_in_account_currency)
from `tabGL Entry` where voucher_type = 'Journal Entry' and voucher_no = %s
and account = %s and ifnull(against_voucher, '') = '' {0}"""
and account = %s and (against_voucher is null or against_voucher='') {0}"""
.format(party_condition), (against_voucher, account))[0][0])
if not against_voucher_amount:

View File

@@ -9,17 +9,17 @@ class TestGLEntry(unittest.TestCase):
def test_round_off_entry(self):
frappe.db.set_value("Company", "_Test Company", "round_off_account", "_Test Write Off - _TC")
frappe.db.set_value("Company", "_Test Company", "round_off_cost_center", "_Test Cost Center - _TC")
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
jv = make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 100, "_Test Cost Center - _TC", submit=False)
jv.get("accounts")[0].debit = 100.01
jv.flags.ignore_validate = True
jv.submit()
round_off_entry = frappe.db.sql("""select name from `tabGL Entry`
where voucher_type='Journal Entry' and voucher_no = %s
where voucher_type='Journal Entry' and voucher_no = %s
and account='_Test Write Off - _TC' and cost_center='_Test Cost Center - _TC'
and ifnull(debit, 0) = 0 and ifnull(credit, 0) = '.01'""", jv.name)
self.assertTrue(round_off_entry)
and debit = 0 and credit = '.01'""", jv.name)
self.assertTrue(round_off_entry)

View File

@@ -368,10 +368,6 @@ 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) {
erpnext.journal_entry.set_debit_credit_in_company_currency(frm, cdt, cdn);
}
})
@@ -408,6 +404,8 @@ $.extend(erpnext.journal_entry, {
frappe.model.set_value(cdt, cdn, "credit",
flt(flt(row.credit_in_account_currency)*row.exchange_rate), precision("credit", row));
cur_frm.cscript.update_totals(frm.doc);
},
set_exchange_rate: function(frm, cdt, cdn) {
@@ -416,7 +414,7 @@ $.extend(erpnext.journal_entry, {
if(row.account_currency == company_currency || !frm.doc.multi_currency) {
frappe.model.set_value(cdt, cdn, "exchange_rate", 1);
} else if (!row.exchange_rate || row.account_type == "Bank") {
} 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",
args: {

View File

@@ -19,10 +19,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"options": "icon-flag",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -42,10 +44,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Title",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -64,13 +68,15 @@
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Entry Type",
"label": "Entry Type",
"length": 0,
"no_copy": 0,
"oldfieldname": "voucher_type",
"oldfieldtype": "Select",
"options": "Journal Entry\nBank Entry\nCash Entry\nCredit Card Entry\nDebit Note\nCredit Note\nContra Entry\nExcise Entry\nWrite Off Entry\nOpening Entry",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -88,13 +94,15 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Series",
"label": "Series",
"length": 0,
"no_copy": 1,
"oldfieldname": "naming_series",
"oldfieldtype": "Select",
"options": "JV-",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -112,10 +120,12 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -135,11 +145,13 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Posting Date",
"length": 0,
"no_copy": 1,
"oldfieldname": "posting_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -158,11 +170,13 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"options": "icon-table",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -181,12 +195,14 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Accounting Entries",
"length": 0,
"no_copy": 0,
"oldfieldname": "entries",
"oldfieldtype": "Table",
"options": "Journal Entry Account",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -204,9 +220,11 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -226,11 +244,13 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Reference Number",
"length": 0,
"no_copy": 1,
"oldfieldname": "cheque_no",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -249,11 +269,13 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Reference Date",
"length": 0,
"no_copy": 1,
"oldfieldname": "cheque_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -272,11 +294,13 @@
"in_filter": 1,
"in_list_view": 0,
"label": "User Remark",
"length": 0,
"no_copy": 1,
"oldfieldname": "user_remark",
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -294,9 +318,11 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -315,12 +341,14 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Total Debit",
"length": 0,
"no_copy": 1,
"oldfieldname": "total_debit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -339,12 +367,14 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Total Credit",
"length": 0,
"no_copy": 1,
"oldfieldname": "total_credit",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -364,12 +394,14 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Difference (Dr - Cr)",
"length": 0,
"no_copy": 1,
"oldfieldname": "difference",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -389,10 +421,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Make Difference Entry",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Button",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -411,10 +445,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Multi Currency",
"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,
@@ -433,10 +469,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Amount",
"length": 0,
"no_copy": 1,
"options": "Company:company:default_currency",
"options": "",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 1,
"reqd": 0,
@@ -455,9 +493,11 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Amount in Words",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 1,
"reqd": 0,
@@ -476,10 +516,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Reference",
"length": 0,
"no_copy": 0,
"options": "icon-pushpin",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -498,11 +540,13 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Clearance Date",
"length": 0,
"no_copy": 1,
"oldfieldname": "clearance_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -522,11 +566,13 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Remark",
"length": 0,
"no_copy": 1,
"oldfieldname": "remark",
"oldfieldtype": "Small Text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -544,9 +590,11 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -565,11 +613,13 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Bill No",
"length": 0,
"no_copy": 0,
"oldfieldname": "bill_no",
"oldfieldtype": "Data",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -588,11 +638,13 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Bill Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "bill_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -611,11 +663,13 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Due Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "due_date",
"oldfieldtype": "Date",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -635,10 +689,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -658,11 +714,13 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off Based On",
"label": "Write Off Based On",
"length": 0,
"no_copy": 0,
"options": "Accounts Receivable\nAccounts Payable",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
@@ -682,10 +740,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Get Outstanding Invoices",
"length": 0,
"no_copy": 0,
"options": "get_outstanding_invoices",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -703,10 +763,12 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -726,10 +788,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off Amount",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
@@ -748,10 +812,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Printing Settings",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -770,9 +836,11 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Pay To / Recd From",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
@@ -790,10 +858,12 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -812,10 +882,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Letter Head",
"length": 0,
"no_copy": 0,
"options": "Letter Head",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -834,12 +906,14 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Print Heading",
"length": 0,
"no_copy": 1,
"oldfieldname": "select_print_heading",
"oldfieldtype": "Link",
"options": "Print Heading",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 1,
"reqd": 0,
@@ -858,11 +932,13 @@
"in_filter": 0,
"in_list_view": 0,
"label": "More Information",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"options": "icon-file-text",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -881,12 +957,14 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"oldfieldname": "company",
"oldfieldtype": "Link",
"options": "Company",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -905,12 +983,14 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Fiscal Year",
"length": 0,
"no_copy": 0,
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
"options": "Fiscal Year",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 1,
@@ -928,10 +1008,12 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -952,13 +1034,15 @@
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Is Opening",
"label": "Is Opening",
"length": 0,
"no_copy": 0,
"oldfieldname": "is_opening",
"oldfieldtype": "Select",
"options": "No\nYes",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -978,11 +1062,13 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Stock Entry",
"length": 0,
"no_copy": 0,
"options": "Stock Entry",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1001,12 +1087,14 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Link",
"options": "Journal Entry",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -1024,7 +1112,9 @@
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:38:54.074343",
"max_attachments": 0,
"menu_index": 0,
"modified": "2015-11-30 16:11:45.556341",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry",
@@ -1096,5 +1186,6 @@
"search_fields": "voucher_type,posting_date, due_date, cheque_no",
"sort_field": "modified",
"sort_order": "DESC",
"title_field": "title"
"title_field": "title",
"version": 0
}

View File

@@ -2,13 +2,13 @@
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import frappe, json
from frappe.utils import cstr, flt, fmt_money, formatdate
from frappe import msgprint, _, scrub
from erpnext.controllers.accounts_controller import AccountsController
from erpnext.accounts.utils import get_balance_on, get_account_currency
from erpnext.setup.utils import get_company_currency
from erpnext.accounts.party import get_party_account
class JournalEntry(AccountsController):
def __init__(self, arg1, arg2=None):
@@ -27,7 +27,8 @@ class JournalEntry(AccountsController):
self.validate_cheque_info()
self.validate_entries_for_advance()
self.validate_multi_currency()
self.validate_debit_and_credit()
self.set_amounts_in_company_currency()
self.validate_total_debit_and_credit()
self.validate_against_jv()
self.validate_reference_doc()
self.set_against_account()
@@ -120,7 +121,7 @@ class JournalEntry(AccountsController):
against_entries = frappe.db.sql("""select * from `tabJournal Entry Account`
where account = %s and docstatus = 1 and parent = %s
and ifnull(reference_type, '') in ("", "Sales Order", "Purchase Order")
and (reference_type is null or reference_type in ("", "Sales Order", "Purchase Order"))
""", (d.account, d.reference_name), as_dict=True)
if not against_entries:
@@ -175,6 +176,9 @@ class JournalEntry(AccountsController):
against_voucher = frappe.db.get_value(d.reference_type, d.reference_name,
[scrub(dt) for dt in field_dict.get(d.reference_type)])
if not against_voucher:
frappe.throw(_("Row {0}: Invalid reference {1}").format(d.idx, d.reference_name))
# check if party and account match
if d.reference_type in ("Sales Invoice", "Purchase Invoice"):
if (against_voucher[0] != d.party or against_voucher[1] != d.account):
@@ -248,7 +252,13 @@ class JournalEntry(AccountsController):
if flt(d.debit > 0): d.against_account = ", ".join(list(set(accounts_credited)))
if flt(d.credit > 0): d.against_account = ", ".join(list(set(accounts_debited)))
def validate_debit_and_credit(self):
def validate_total_debit_and_credit(self):
self.set_total_debit_credit()
if self.difference:
frappe.throw(_("Total Debit must be equal to Total Credit. The difference is {0}")
.format(self.difference))
def set_total_debit_credit(self):
self.total_debit, self.total_credit, self.difference = 0, 0, 0
for d in self.get("accounts"):
if d.debit and d.credit:
@@ -260,10 +270,6 @@ class JournalEntry(AccountsController):
self.difference = flt(self.total_debit, self.precision("total_debit")) - \
flt(self.total_credit, self.precision("total_credit"))
if self.difference:
frappe.throw(_("Total Debit must be equal to Total Credit. The difference is {0}")
.format(self.difference))
def validate_multi_currency(self):
alternate_currency = []
for d in self.get("accounts"):
@@ -280,6 +286,7 @@ class JournalEntry(AccountsController):
self.set_exchange_rate()
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"))
@@ -288,7 +295,7 @@ class JournalEntry(AccountsController):
for d in self.get("accounts"):
if d.account_currency == self.company_currency:
d.exchange_rate = 1
elif not d.exchange_rate or d.account_type=="Bank" or \
elif not d.exchange_rate or d.exchange_rate == 1 or \
(d.reference_type in ("Sales Invoice", "Purchase Invoice") and d.reference_name):
d.exchange_rate = get_exchange_rate(d.account, d.account_currency, self.company,
d.reference_type, d.reference_name, d.debit, d.credit, d.exchange_rate)
@@ -332,20 +339,24 @@ class JournalEntry(AccountsController):
self.remark = ("\n").join(r) #User Remarks is not mandatory
def set_print_format_fields(self):
total_amount = 0.0
bank_account_currency = None
for d in self.get('accounts'):
if d.party_type and d.party:
if not self.pay_to_recd_from:
self.pay_to_recd_from = frappe.db.get_value(d.party_type, d.party,
"customer_name" if d.party_type=="Customer" else "supplier_name")
self.set_total_amount(d.debit or d.credit)
elif frappe.db.get_value("Account", d.account, "account_type") in ["Bank", "Cash"]:
self.set_total_amount(d.debit or d.credit)
total_amount += (d.debit_in_account_currency or d.credit_in_account_currency)
bank_account_currency = d.account_currency
def set_total_amount(self, amt):
self.set_total_amount(total_amount, bank_account_currency)
def set_total_amount(self, amt, currency):
self.total_amount = amt
from frappe.utils import money_in_words
self.total_amount_in_words = money_in_words(amt, self.company_currency)
self.total_amount_in_words = money_in_words(amt, currency)
def make_gl_entries(self, cancel=0, adv_adj=0):
from erpnext.accounts.general_ledger import make_gl_entries
@@ -399,7 +410,7 @@ class JournalEntry(AccountsController):
blank_row.debit_in_account_currency = abs(diff)
blank_row.debit = abs(diff)
self.validate_debit_and_credit()
self.validate_total_debit_and_credit()
def get_outstanding_invoices(self):
self.set('accounts', [])
@@ -427,7 +438,7 @@ class JournalEntry(AccountsController):
elif self.write_off_based_on == 'Accounts Payable':
jd2.credit = total
self.validate_debit_and_credit()
self.validate_total_debit_and_credit()
def get_values(self):
@@ -498,14 +509,17 @@ def get_default_bank_cash_account(company, voucher_type, mode_of_payment=None):
if voucher_type=="Bank Entry":
account = frappe.db.get_value("Company", company, "default_bank_account")
if not account:
account = frappe.db.get_value("Account", {"company": company, "account_type": "Bank", "is_group": 0})
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:
account = frappe.db.get_value("Account", {"company": company, "account_type": "Cash", "is_group": 0})
account = frappe.db.get_value("Account",
{"company": company, "account_type": "Cash", "is_group": 0})
if account:
account_details = frappe.db.get_value("Account", account, ["account_currency", "account_type"], as_dict=1)
account_details = frappe.db.get_value("Account", account,
["account_currency", "account_type"], as_dict=1)
return {
"account": account,
"balance": get_balance_on(account),
@@ -514,206 +528,122 @@ def get_default_bank_cash_account(company, voucher_type, mode_of_payment=None):
}
@frappe.whitelist()
def get_payment_entry_from_sales_invoice(sales_invoice):
"""Returns new Journal Entry document as dict for given Sales Invoice"""
from erpnext.accounts.utils import get_balance_on
si = frappe.get_doc("Sales Invoice", sales_invoice)
def get_payment_entry_against_order(dt, dn):
ref_doc = frappe.get_doc(dt, dn)
# exchange rate
exchange_rate = get_exchange_rate(si.debit_to, si.party_account_currency, si.company,
si.doctype, si.name)
if flt(ref_doc.per_billed, 2) > 0:
frappe.throw(_("Can only make payment against unbilled {0}").format(dt))
jv = get_payment_entry(si)
jv.remark = 'Payment received against Sales Invoice {0}. {1}'.format(si.name, si.remarks)
# credit customer
row1 = jv.get("accounts")[0]
row1.account = si.debit_to
row1.account_currency = si.party_account_currency
row1.party_type = "Customer"
row1.party = si.customer
row1.balance = get_balance_on(si.debit_to)
row1.party_balance = get_balance_on(party=si.customer, party_type="Customer")
row1.credit_in_account_currency = si.outstanding_amount
row1.reference_type = si.doctype
row1.reference_name = si.name
row1.exchange_rate = exchange_rate
row1.account_type = "Receivable" if si.customer else ""
# debit bank
row2 = jv.get("accounts")[1]
if row2.account_currency == si.party_account_currency:
row2.debit_in_account_currency = si.outstanding_amount
if dt == "Sales Order":
party_type = "Customer"
amount_field_party = "credit_in_account_currency"
amount_field_bank = "debit_in_account_currency"
else:
row2.debit_in_account_currency = si.outstanding_amount * exchange_rate
party_type = "Supplier"
amount_field_party = "debit_in_account_currency"
amount_field_bank = "credit_in_account_currency"
# set multi currency check
if row1.account_currency != si.company_currency or row2.account_currency != si.company_currency:
jv.multi_currency = 1
return jv.as_dict()
@frappe.whitelist()
def get_payment_entry_from_purchase_invoice(purchase_invoice):
"""Returns new Journal Entry document as dict for given Purchase Invoice"""
pi = frappe.get_doc("Purchase Invoice", purchase_invoice)
exchange_rate = get_exchange_rate(pi.credit_to, pi.party_account_currency, pi.company,
pi.doctype, pi.name)
jv = get_payment_entry(pi)
jv.remark = 'Payment against Purchase Invoice {0}. {1}'.format(pi.name, pi.remarks)
jv.exchange_rate = exchange_rate
# credit supplier
row1 = jv.get("accounts")[0]
row1.account = pi.credit_to
row1.account_currency = pi.party_account_currency
row1.party_type = "Supplier"
row1.party = pi.supplier
row1.balance = get_balance_on(pi.credit_to)
row1.party_balance = get_balance_on(party=pi.supplier, party_type="Supplier")
row1.debit_in_account_currency = pi.outstanding_amount
row1.reference_type = pi.doctype
row1.reference_name = pi.name
row1.exchange_rate = exchange_rate
row1.account_type = "Payable" if pi.supplier else ""
# credit bank
row2 = jv.get("accounts")[1]
if row2.account_currency == pi.party_account_currency:
row2.credit_in_account_currency = pi.outstanding_amount
else:
row2.credit_in_account_currency = pi.outstanding_amount * exchange_rate
# set multi currency check
if row1.account_currency != pi.company_currency or row2.account_currency != pi.company_currency:
jv.multi_currency = 1
return jv.as_dict()
@frappe.whitelist()
def get_payment_entry_from_sales_order(sales_order):
"""Returns new Journal Entry document as dict for given Sales Order"""
from erpnext.accounts.utils import get_balance_on
from erpnext.accounts.party import get_party_account
so = frappe.get_doc("Sales Order", sales_order)
if flt(so.per_billed, 2) != 0.0:
frappe.throw(_("Can only make payment against unbilled Sales Order"))
jv = get_payment_entry(so)
jv.remark = 'Advance payment received against Sales Order {0}.'.format(so.name)
party_account = get_party_account("Customer", so.customer, so.company)
party_account = get_party_account(party_type, ref_doc.get(party_type.lower()), ref_doc.company)
party_account_currency = get_account_currency(party_account)
exchange_rate = get_exchange_rate(party_account, party_account_currency, so.company)
if party_account_currency == so.company_currency:
amount = flt(so.base_grand_total) - flt(so.advance_paid)
if party_account_currency == ref_doc.company_currency:
amount = flt(ref_doc.base_grand_total) - flt(ref_doc.advance_paid)
else:
amount = flt(so.grand_total) - flt(so.advance_paid)
amount = flt(ref_doc.grand_total) - flt(ref_doc.advance_paid)
# credit customer
row1 = jv.get("accounts")[0]
row1.account = party_account
row1.account_currency = party_account_currency
row1.party_type = "Customer"
row1.party = so.customer
row1.balance = get_balance_on(party_account)
row1.party_balance = get_balance_on(party=so.customer, party_type="Customer")
row1.credit_in_account_currency = amount
row1.reference_type = so.doctype
row1.reference_name = so.name
row1.is_advance = "Yes"
row1.exchange_rate = exchange_rate
row1.account_type = "Receivable"
# debit bank
row2 = jv.get("accounts")[1]
if row2.account_currency == party_account_currency:
row2.debit_in_account_currency = amount
else:
row2.debit_in_account_currency = amount * exchange_rate
# set multi currency check
if row1.account_currency != so.company_currency or row2.account_currency != so.company_currency:
jv.multi_currency = 1
return jv.as_dict()
return get_payment_entry(ref_doc, {
"party_type": party_type,
"party_account": party_account,
"party_account_currency": party_account_currency,
"amount_field_party": amount_field_party,
"amount_field_bank": amount_field_bank,
"amount": amount,
"remarks": 'Advance Payment received against {0} {1}'.format(dt, dn),
"is_advance": "Yes"
})
@frappe.whitelist()
def get_payment_entry_from_purchase_order(purchase_order):
"""Returns new Journal Entry document as dict for given Sales Order"""
from erpnext.accounts.utils import get_balance_on
from erpnext.accounts.party import get_party_account
po = frappe.get_doc("Purchase Order", purchase_order)
if flt(po.per_billed, 2) != 0.0:
frappe.throw(_("Can only make payment against unbilled Sales Order"))
jv = get_payment_entry(po)
jv.remark = 'Advance payment made against Purchase Order {0}.'.format(po.name)
party_account = get_party_account("Supplier", po.supplier, po.company)
party_account_currency = get_account_currency(party_account)
exchange_rate = get_exchange_rate(party_account, party_account_currency, po.company)
if party_account_currency == po.company_currency:
amount = flt(po.base_grand_total) - flt(po.advance_paid)
def get_payment_entry_against_invoice(dt, dn):
ref_doc = frappe.get_doc(dt, dn)
if dt == "Sales Invoice":
party_type = "Customer"
party_account = ref_doc.debit_to
else:
amount = flt(po.grand_total) - flt(po.advance_paid)
party_type = "Supplier"
party_account = ref_doc.credit_to
# credit customer
row1 = jv.get("accounts")[0]
row1.account = party_account
row1.party_type = "Supplier"
row1.party = po.supplier
row1.balance = get_balance_on(party_account)
row1.party_balance = get_balance_on(party=po.supplier, party_type="Supplier")
row1.debit_in_account_currency = amount
row1.reference_type = po.doctype
row1.reference_name = po.name
row1.is_advance = "Yes"
row1.exchange_rate = exchange_rate
row1.account_type = "Payable"
# debit bank
row2 = jv.get("accounts")[1]
if row2.account_currency == party_account_currency:
row2.credit_in_account_currency = amount
if (dt=="Sales Invoice" and ref_doc.outstanding_amount > 0) \
or (dt=="Purchase Invoice" and ref_doc.outstanding_amount < 0):
amount_field_party = "credit_in_account_currency"
amount_field_bank = "debit_in_account_currency"
else:
row2.credit_in_account_currency = amount * exchange_rate
amount_field_party = "debit_in_account_currency"
amount_field_bank = "credit_in_account_currency"
# set multi currency check
if row1.account_currency != po.company_currency or row2.account_currency != po.company_currency:
jv.multi_currency = 1
return get_payment_entry(ref_doc, {
"party_type": party_type,
"party_account": party_account,
"party_account_currency": ref_doc.party_account_currency,
"amount_field_party": amount_field_party,
"amount_field_bank": amount_field_bank,
"amount": abs(ref_doc.outstanding_amount),
"remarks": 'Payment received against {0} {1}. {2}'.format(dt, dn, ref_doc.remarks),
"is_advance": "No"
})
return jv.as_dict()
def get_payment_entry(ref_doc, args):
cost_center = frappe.db.get_value("Company", ref_doc.company, "cost_center")
exchange_rate = get_exchange_rate(args.get("party_account"), args.get("party_account_currency"),
ref_doc.company, ref_doc.doctype, ref_doc.name)
def get_payment_entry(doc):
bank_account = get_default_bank_cash_account(doc.company, "Bank Entry")
jv = frappe.new_doc("Journal Entry")
jv.update({
"voucher_type": "Bank Entry",
"company": ref_doc.company,
"remark": args.get("remarks")
})
jv = frappe.new_doc('Journal Entry')
jv.voucher_type = 'Bank Entry'
jv.company = doc.company
jv.fiscal_year = doc.fiscal_year
jv.append("accounts")
d2 = jv.append("accounts")
party_row = jv.append("accounts", {
"account": args.get("party_account"),
"party_type": args.get("party_type"),
"party": ref_doc.get(args.get("party_type").lower()),
"cost_center": cost_center,
"account_type": frappe.db.get_value("Account", args.get("party_account"), "account_type"),
"account_currency": args.get("party_account_currency") or \
get_account_currency(args.get("party_account")),
"balance": get_balance_on(args.get("party_account")),
"party_balance": get_balance_on(party=args.get("party"), party_type=args.get("party_type")),
"exchange_rate": exchange_rate,
args.get("amount_field_party"): args.get("amount"),
"is_advance": args.get("is_advance"),
"reference_type": ref_doc.doctype,
"reference_name": ref_doc.name
})
bank_row = jv.append("accounts")
bank_account = get_default_bank_cash_account(ref_doc.company, "Bank Entry")
if bank_account:
d2.account = bank_account["account"]
d2.balance = bank_account["balance"]
d2.account_currency = bank_account["account_currency"]
d2.account_type = bank_account["account_type"]
d2.exchange_rate = get_exchange_rate(bank_account["account"],
bank_account["account_currency"], doc.company)
bank_row.update(bank_account)
bank_row.exchange_rate = get_exchange_rate(bank_account["account"],
bank_account["account_currency"], ref_doc.company)
return jv
bank_row.cost_center = cost_center
if bank_row.account_currency == args.get("party_account_currency"):
bank_row.set(args.get("amount_field_bank"), args.get("amount"))
else:
bank_row.set(args.get("amount_field_bank"), args.get("amount") * exchange_rate)
# set multi currency check
if party_row.account_currency != ref_doc.company_currency \
or (bank_row.account_currency and bank_row.account_currency != ref_doc.company_currency):
jv.multi_currency = 1
jv.set_amounts_in_company_currency()
jv.set_total_debit_credit()
return jv.as_dict()
@frappe.whitelist()
def get_opening_accounts(company):
@@ -728,24 +658,27 @@ def get_against_jv(doctype, txt, searchfield, start, page_len, filters):
return frappe.db.sql("""select jv.name, jv.posting_date, jv.user_remark
from `tabJournal Entry` jv, `tabJournal Entry Account` jv_detail
where jv_detail.parent = jv.name and jv_detail.account = %s and ifnull(jv_detail.party, '') = %s
and ifnull(jv_detail.reference_type, '') = ''
and jv.docstatus = 1 and jv.{0} like %s order by jv.name desc limit %s, %s""".format(searchfield),
and (jv_detail.reference_type is null or jv_detail.reference_type = '')
and jv.docstatus = 1 and jv.`{0}` like %s order by jv.name desc limit %s, %s""".format(frappe.db.escape(searchfield)),
(filters.get("account"), cstr(filters.get("party")), "%{0}%".format(txt), start, page_len))
@frappe.whitelist()
def get_outstanding(args):
if not frappe.has_permission("Account"):
frappe.msgprint(_("No Permission"), raise_exception=1)
args = eval(args)
if isinstance(args, basestring):
args = json.loads(args)
company_currency = get_company_currency(args.get("company"))
if args.get("doctype") == "Journal Entry":
condition = " and party=%(party)s" if args.get("party") else ""
against_jv_amount = frappe.db.sql("""
select sum(ifnull(debit_in_account_currency, 0)) - sum(ifnull(credit_in_account_currency, 0))
select sum(debit_in_account_currency) - sum(credit_in_account_currency)
from `tabJournal Entry Account` where parent=%(docname)s and account=%(account)s {0}
and ifnull(reference_type, '')=''""".format(condition), args)
and (reference_type is null or reference_type = '')""".format(condition), args)
against_jv_amount = flt(against_jv_amount[0][0]) if against_jv_amount else 0
amount_field = "credit_in_account_currency" if against_jv_amount > 0 else "debit_in_account_currency"
@@ -775,7 +708,6 @@ def get_party_account_and_balance(company, party_type, party):
if not frappe.has_permission("Account"):
frappe.msgprint(_("No Permission"), raise_exception=1)
from erpnext.accounts.party import get_party_account
account = get_party_account(party_type, party, company)
account_balance = get_balance_on(account=account)
@@ -811,14 +743,30 @@ def get_account_balance_and_party_type(account, date, company, debit=None, credi
"exchange_rate": get_exchange_rate(account, account_details.account_currency,
company, debit=debit, credit=credit, exchange_rate=exchange_rate)
}
# un-set party if not party type
if not party_type:
grid_values["party"] = ""
return grid_values
@frappe.whitelist()
def get_exchange_rate(account, account_currency, company,
def get_exchange_rate(account, account_currency=None, company=None,
reference_type=None, reference_name=None, debit=None, credit=None, exchange_rate=None):
from erpnext.setup.utils import get_exchange_rate
account_details = frappe.db.get_value("Account", account,
["account_type", "root_type", "account_currency", "company"], as_dict=1)
if not account_details:
frappe.throw(_("Please select correct account"))
if not company:
company = account_details.company
if not account_currency:
account_currency = account_details.account_currency
company_currency = get_company_currency(company)
account_details = frappe.db.get_value("Account", account, ["account_type", "root_type"], as_dict=1)
if account_currency != company_currency:
if reference_type in ("Sales Invoice", "Purchase Invoice") and reference_name:

View File

@@ -10,7 +10,7 @@
"fields": [
{
"allow_on_submit": 0,
"bold": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "account",
"fieldtype": "Link",
@@ -19,12 +19,14 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Account",
"length": 0,
"no_copy": 0,
"oldfieldname": "account",
"oldfieldtype": "Link",
"options": "Account",
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"print_width": "250px",
"read_only": 0,
"report_hide": 0,
@@ -45,10 +47,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Account Type",
"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,
@@ -67,12 +71,14 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Account Balance",
"length": 0,
"no_copy": 1,
"oldfieldname": "balance",
"oldfieldtype": "Data",
"options": "account_currency",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -93,12 +99,14 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Cost Center",
"length": 0,
"no_copy": 0,
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
"options": "Cost Center",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"print_width": "180px",
"read_only": 0,
"report_hide": 0,
@@ -118,9 +126,11 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -139,10 +149,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": 0,
@@ -161,10 +173,12 @@
"in_filter": 0,
"in_list_view": 1,
"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": 0,
@@ -183,11 +197,13 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Party Balance",
"length": 0,
"no_copy": 0,
"options": "account_currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -208,10 +224,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Currency",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -230,11 +248,13 @@
"in_filter": 0,
"in_list_view": 0,
"label": "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,
@@ -252,10 +272,12 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -274,10 +296,12 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Exchange Rate",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "6",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -296,9 +320,11 @@
"in_filter": 0,
"in_list_view": 0,
"label": "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,
@@ -308,7 +334,7 @@
},
{
"allow_on_submit": 0,
"bold": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "debit_in_account_currency",
"fieldtype": "Currency",
@@ -316,12 +342,14 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Debit in Account Currency",
"label": "Debit",
"length": 0,
"no_copy": 0,
"options": "account_currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -331,7 +359,7 @@
},
{
"allow_on_submit": 0,
"bold": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "debit",
"fieldtype": "Currency",
@@ -340,6 +368,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Debit in Company Currency",
"length": 0,
"no_copy": 1,
"oldfieldname": "debit",
"oldfieldtype": "Currency",
@@ -347,6 +376,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -364,9 +394,11 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -376,7 +408,7 @@
},
{
"allow_on_submit": 0,
"bold": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "credit_in_account_currency",
"fieldtype": "Currency",
@@ -384,12 +416,14 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Credit in Account Currency",
"label": "Credit",
"length": 0,
"no_copy": 0,
"options": "account_currency",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 1,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -399,7 +433,7 @@
},
{
"allow_on_submit": 0,
"bold": 0,
"bold": 1,
"collapsible": 0,
"fieldname": "credit",
"fieldtype": "Currency",
@@ -408,6 +442,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Credit in Company Currency",
"length": 0,
"no_copy": 1,
"oldfieldname": "credit",
"oldfieldtype": "Currency",
@@ -415,6 +450,7 @@
"permlevel": 0,
"precision": "",
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
@@ -433,9 +469,11 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Reference",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -454,11 +492,13 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Reference Type",
"length": 0,
"no_copy": 0,
"options": "\nSales Invoice\nPurchase Invoice\nJournal Entry\nSales Order\nPurchase Order\nExpense Claim",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -477,11 +517,13 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Reference Name",
"length": 0,
"no_copy": 0,
"options": "reference_type",
"permlevel": 0,
"precision": "",
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -499,9 +541,11 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -520,12 +564,14 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Is Advance",
"length": 0,
"no_copy": 1,
"oldfieldname": "is_advance",
"oldfieldtype": "Select",
"options": "No\nYes",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -544,11 +590,13 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Against Account",
"length": 0,
"no_copy": 1,
"oldfieldname": "against_account",
"oldfieldtype": "Text",
"permlevel": 0,
"print_hide": 1,
"print_hide_if_no_value": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
@@ -565,7 +613,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-20 12:10:22.203395",
"max_attachments": 0,
"modified": "2015-12-02 04:14:37.571883",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Journal Entry Account",

View File

@@ -20,6 +20,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Mode of Payment",
"length": 0,
"no_copy": 0,
"oldfieldname": "mode_of_payment",
"oldfieldtype": "Data",
@@ -43,6 +44,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Accounts",
"length": 0,
"no_copy": 0,
"options": "Mode of Payment Account",
"permlevel": 0,
@@ -65,7 +67,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:38:57.318104",
"max_attachments": 0,
"modified": "2015-11-16 06:29:50.335559",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Mode of Payment",

View File

@@ -5,6 +5,24 @@ from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe import _
class ModeofPayment(Document):
pass
def validate(self):
self.validate_accounts()
self.validate_repeating_companies()
def validate_repeating_companies(self):
"""Error when Same Company is entered multiple times in accounts"""
accounts_list = []
for entry in self.accounts:
accounts_list.append(entry.company)
if len(accounts_list)!= len(set(accounts_list)):
frappe.throw(_("Same Company is entered more than once"))
def validate_accounts(self):
for entry in self.accounts:
"""Error when Company of Ledger account doesn't match with Company Selected"""
if frappe.db.get_value("Account", entry.default_account, "company") != entry.company:
frappe.throw(_("Account does not match with Company"))

View File

@@ -19,6 +19,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
@@ -43,6 +44,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Default Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
@@ -63,7 +65,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:38:57.388194",
"max_attachments": 0,
"modified": "2015-11-16 06:29:50.367895",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Mode of Payment Account",

View File

@@ -21,6 +21,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Distribution Name",
"length": 0,
"no_copy": 0,
"oldfieldname": "distribution_id",
"oldfieldtype": "Data",
@@ -44,6 +45,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Fiscal Year",
"length": 0,
"no_copy": 0,
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
@@ -68,6 +70,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Monthly Distribution Percentages",
"length": 0,
"no_copy": 0,
"oldfieldname": "budget_distribution_details",
"oldfieldtype": "Table",
@@ -91,7 +94,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:38:57.594541",
"max_attachments": 0,
"modified": "2015-11-16 06:29:50.431735",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Monthly Distribution",

View File

@@ -19,6 +19,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Month",
"length": 0,
"no_copy": 0,
"oldfieldname": "month",
"oldfieldtype": "Data",
@@ -42,6 +43,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Percentage Allocation",
"length": 0,
"no_copy": 0,
"oldfieldname": "percentage_allocation",
"oldfieldtype": "Currency",
@@ -63,7 +65,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:38:57.670950",
"max_attachments": 0,
"modified": "2015-11-16 06:29:50.468982",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Monthly Distribution Percentage",

View File

@@ -19,6 +19,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
@@ -41,6 +42,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -63,6 +65,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
@@ -82,7 +85,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:38:59.582533",
"max_attachments": 0,
"modified": "2015-11-16 06:29:51.450360",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Party Account",

View File

@@ -6,6 +6,7 @@ import frappe
from frappe.utils import flt
from frappe import msgprint, _
from frappe.model.document import Document
from erpnext.accounts.utils import get_outstanding_invoices
class PaymentReconciliation(Document):
def get_unreconciled_entries(self):
@@ -17,7 +18,7 @@ class PaymentReconciliation(Document):
dr_or_cr = "credit_in_account_currency" if self.party_type == "Customer" \
else "debit_in_account_currency"
cond = self.check_condition(dr_or_cr)
cond = self.check_condition()
bank_account_condition = "t2.against_account like %(bank_cash_account)s" \
if self.bank_cash_account else "1=1"
@@ -32,7 +33,7 @@ class PaymentReconciliation(Document):
t1.name = t2.parent and t1.docstatus = 1 and t2.docstatus = 1
and t2.party_type = %(party_type)s and t2.party = %(party)s
and t2.account = %(account)s and {dr_or_cr} > 0
and ifnull(t2.reference_type, '') in ('', 'Sales Order', 'Purchase Order')
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')
@@ -65,65 +66,11 @@ class PaymentReconciliation(Document):
def get_invoice_entries(self):
#Fetch JVs, Sales and Purchase Invoices for 'invoices' to reconcile against
non_reconciled_invoices = []
dr_or_cr = "debit_in_account_currency" if self.party_type == "Customer" else "credit_in_account_currency"
cond = self.check_condition(dr_or_cr)
invoice_list = frappe.db.sql("""
select
voucher_no, voucher_type, posting_date,
ifnull(sum({dr_or_cr}), 0) as invoice_amount
from
`tabGL Entry`
where
party_type = %(party_type)s and party = %(party)s
and account = %(account)s and {dr_or_cr} > 0 {cond}
and (CASE
WHEN voucher_type = 'Journal Entry'
THEN ifnull(against_voucher, '') = ''
ELSE 1=1
END)
group by voucher_type, voucher_no
""".format(**{
"cond": cond,
"dr_or_cr": dr_or_cr
}), {
"party_type": self.party_type,
"party": self.party,
"account": self.receivable_payable_account,
}, as_dict=True)
condition = self.check_condition()
for d in invoice_list:
payment_amount = frappe.db.sql("""
select
ifnull(sum(ifnull({0}, 0)), 0)
from
`tabGL Entry`
where
party_type = %(party_type)s and party = %(party)s
and account = %(account)s and {0} > 0
and against_voucher_type = %(against_voucher_type)s
and ifnull(against_voucher, '') = %(against_voucher)s
""".format("credit_in_account_currency" if self.party_type == "Customer"
else "debit_in_account_currency"), {
"party_type": self.party_type,
"party": self.party,
"account": self.receivable_payable_account,
"against_voucher_type": d.voucher_type,
"against_voucher": d.voucher_no
}
)
payment_amount = payment_amount[0][0] if payment_amount else 0
if d.invoice_amount - payment_amount > 0.005:
non_reconciled_invoices.append({
'voucher_no': d.voucher_no,
'voucher_type': d.voucher_type,
'posting_date': d.posting_date,
'invoice_amount': flt(d.invoice_amount),
'outstanding_amount': flt(d.invoice_amount - payment_amount, 2)
})
non_reconciled_invoices = get_outstanding_invoices(self.party_type, self.party,
self.receivable_payable_account, condition=condition)
self.add_invoice_entries(non_reconciled_invoices)
@@ -210,13 +157,18 @@ class PaymentReconciliation(Document):
if not invoices_to_reconcile:
frappe.throw(_("Please select Allocated Amount, Invoice Type and Invoice Number in atleast one row"))
def check_condition(self, dr_or_cr):
cond = self.from_date and " and posting_date >= '" + self.from_date + "'" or ""
cond += self.to_date and " and posting_date <= '" + self.to_date + "'" or ""
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 ""
if self.party_type == "Customer":
dr_or_cr = "debit_in_account_currency"
else:
dr_or_cr = "credit_in_account_currency"
if self.minimum_amount:
cond += " and {0} >= %s".format(dr_or_cr) % self.minimum_amount
cond += " and `{0}` >= {1}".format(dr_or_cr, flt(self.minimum_amount))
if self.maximum_amount:
cond += " and {0} <= %s".format(dr_or_cr) % self.maximum_amount
cond += " and `{0}` <= {1}".format(dr_or_cr, flt(self.maximum_amount))
return cond

View File

@@ -19,6 +19,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Invoice Type",
"length": 0,
"no_copy": 0,
"options": "Sales Invoice\nPurchase Invoice\nJournal Entry",
"permlevel": 0,
@@ -41,6 +42,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Invoice Number",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
@@ -63,6 +65,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Invoice Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -84,6 +87,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -105,6 +109,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -126,6 +131,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Outstanding Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -144,7 +150,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-16 06:14:07.460813",
"max_attachments": 0,
"modified": "2015-11-16 06:29:51.516537",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation Invoice",

View File

@@ -19,6 +19,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Journal Entry",
"length": 0,
"no_copy": 0,
"options": "Journal Entry",
"permlevel": 0,
@@ -41,6 +42,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Posting Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -62,6 +64,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -83,6 +86,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Is Advance",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -104,6 +108,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Voucher Detail Number",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -125,6 +130,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -146,6 +152,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Invoice Number",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
@@ -168,6 +175,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Allocated amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -190,6 +198,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -211,6 +220,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Remark",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -229,7 +239,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:38:59.835936",
"max_attachments": 0,
"modified": "2015-11-16 06:29:51.563989",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Reconciliation Payment",

View File

@@ -8,6 +8,7 @@ from frappe.utils import flt
from frappe.model.document import Document
import json
from erpnext.accounts.utils import get_account_currency
from erpnext.accounts.doctype.journal_entry.journal_entry import get_exchange_rate
class PaymentTool(Document):
def make_journal_entry(self):
@@ -19,7 +20,15 @@ class PaymentTool(Document):
jv.company = self.company
jv.cheque_no = self.reference_no
jv.cheque_date = self.reference_date
party_account_currency, party_account_type = frappe.db.get_value("Account", self.party_account,
["account_currency", "account_type"])
bank_account_currency, bank_account_type = None, None
if self.payment_account:
bank_account_currency, bank_account_type = frappe.db.get_value("Account", self.payment_account,
["account_currency", "account_type"])
if not self.total_payment_amount:
frappe.throw(_("Please enter Payment Amount in atleast one row"))
@@ -27,27 +36,56 @@ class PaymentTool(Document):
if not frappe.db.get_value(v.against_voucher_type, {"name": v.against_voucher_no}):
frappe.throw(_("Row {0}: {1} is not a valid {2}").format(v.idx, v.against_voucher_no,
v.against_voucher_type))
if v.payment_amount:
exchange_rate = get_exchange_rate(self.party_account, party_account_currency,
self.company, v.against_voucher_type, v.against_voucher_no)
d1 = jv.append("accounts")
d1.account = self.party_account
d1.party_type = self.party_type
d1.party = self.party
d1.account_currency = party_account_currency
d1.account_type = party_account_type
d1.balance = get_balance_on(self.party_account)
d1.party_balance = get_balance_on(party=self.party, party_type=self.party_type)
d1.exchange_rate = exchange_rate
d1.set("debit_in_account_currency" if self.received_or_paid=="Paid" \
else "credit_in_account_currency", flt(v.payment_amount))
d1.set("reference_type", v.against_voucher_type)
d1.set("reference_name", v.against_voucher_no)
d1.set('is_advance', 'Yes' if v.against_voucher_type in ['Sales Order', 'Purchase Order'] else 'No')
total_payment_amount = flt(total_payment_amount) + \
flt(d1.debit_in_account_currency) - flt(d1.credit_in_account_currency)
d1.reference_type = v.against_voucher_type
d1.reference_name = v.against_voucher_no
d1.is_advance = 'Yes' \
if v.against_voucher_type in ['Sales Order', 'Purchase Order'] else 'No'
amount = flt(d1.debit_in_account_currency) - flt(d1.credit_in_account_currency)
if bank_account_currency == party_account_currency:
total_payment_amount += amount
else:
total_payment_amount += amount*exchange_rate
d2 = jv.append("accounts")
d2.account = self.payment_account
d2.set('debit_in_account_currency' if total_payment_amount < 0 \
else 'credit_in_account_currency', abs(total_payment_amount))
if self.payment_account:
d2.balance = get_balance_on(self.payment_account)
bank_account_currency, bank_account_type = frappe.db.get_value("Account", self.payment_account,
["account_currency", "account_type"])
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.account_balance = get_balance_on(self.payment_account)
amount_field_bank = 'debit_in_account_currency' if total_payment_amount < 0 \
else 'credit_in_account_currency'
d2.set(amount_field_bank, abs(total_payment_amount))
company_currency = frappe.db.get_value("Company", self.company, "default_currency")
if party_account_currency != company_currency or \
(bank_account_currency and bank_account_currency != company_currency):
jv.multi_currency = 1
jv.set_amounts_in_company_currency()
jv.set_total_debit_credit()
return jv.as_dict()
@@ -63,20 +101,18 @@ def get_outstanding_vouchers(args):
party_account_currency = get_account_currency(args.get("party_account"))
company_currency = frappe.db.get_value("Company", args.get("company"), "default_currency")
if args.get("party_type") == "Customer" and args.get("received_or_paid") == "Received":
amount_query = "ifnull(debit_in_account_currency, 0) - ifnull(credit_in_account_currency, 0)"
elif args.get("party_type") == "Supplier" and args.get("received_or_paid") == "Paid":
amount_query = "ifnull(credit_in_account_currency, 0) - ifnull(debit_in_account_currency, 0)"
else:
if ((args.get("party_type") == "Customer" and args.get("received_or_paid") == "Paid")
or (args.get("party_type") == "Supplier" and args.get("received_or_paid") == "Received")):
frappe.throw(_("Please enter the Against Vouchers manually"))
# Get all outstanding sales /purchase invoices
outstanding_invoices = get_outstanding_invoices(amount_query, args.get("party_account"),
args.get("party_type"), args.get("party"))
outstanding_invoices = get_outstanding_invoices(args.get("party_type"), args.get("party"), args.get("party_account"))
# Get all SO / PO which are not fully billed or aginst which full advance not paid
orders_to_be_billed = get_orders_to_be_billed(args.get("party_type"), args.get("party"),
party_account_currency, company_currency)
return outstanding_invoices + orders_to_be_billed
def get_orders_to_be_billed(party_type, party, party_account_currency, company_currency):
@@ -87,8 +123,8 @@ def get_orders_to_be_billed(party_type, party, party_account_currency, company_c
orders = frappe.db.sql("""
select
name as voucher_no,
ifnull({ref_field}, 0) as invoice_amount,
(ifnull({ref_field}, 0) - ifnull(advance_paid, 0)) as outstanding_amount,
{ref_field} as invoice_amount,
({ref_field} - advance_paid) as outstanding_amount,
transaction_date as posting_date
from
`tab{voucher_type}`
@@ -96,8 +132,8 @@ def get_orders_to_be_billed(party_type, party, party_account_currency, company_c
{party_type} = %s
and docstatus = 1
and ifnull(status, "") != "Stopped"
and ifnull({ref_field}, 0) > ifnull(advance_paid, 0)
and abs(100 - ifnull(per_billed, 0)) > 0.01
and {ref_field} > advance_paid
and abs(100 - per_billed) > 0.01
""".format(**{
"ref_field": ref_field,
"voucher_type": voucher_type,
@@ -118,7 +154,7 @@ def get_against_voucher_amount(against_voucher_type, against_voucher_no, party_a
ref_field = "base_grand_total" if party_account_currency == company_currency else "grand_total"
if against_voucher_type in ["Sales Order", "Purchase Order"]:
select_cond = "{0} as total_amount, ifnull({0}, 0) - ifnull(advance_paid, 0) as outstanding_amount"\
select_cond = "{0} as total_amount, {0} - advance_paid as outstanding_amount"\
.format(ref_field)
elif against_voucher_type in ["Sales Invoice", "Purchase Invoice"]:
select_cond = "{0} as total_amount, outstanding_amount".format(ref_field)
@@ -127,6 +163,6 @@ def get_against_voucher_amount(against_voucher_type, against_voucher_no, party_a
select_cond = "{0} as total_amount".format(ref_field)
details = frappe.db.sql("""select {0} from `tab{1}` where name = %s"""
.format(select_cond, against_voucher_type), against_voucher_no, as_dict=1)
.format(select_cond, frappe.db.escape(against_voucher_type)), against_voucher_no, as_dict=1)
return details[0] if details else {}

View File

@@ -19,6 +19,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Against Voucher Type",
"length": 0,
"no_copy": 0,
"options": "DocType",
"permlevel": 0,
@@ -43,6 +44,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Against Voucher No",
"length": 0,
"no_copy": 0,
"options": "against_voucher_type",
"permlevel": 0,
@@ -64,6 +66,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -86,6 +89,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Total Amount",
"length": 0,
"no_copy": 0,
"options": "party_account_currency",
"permlevel": 0,
@@ -108,6 +112,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Outstanding Amount",
"length": 0,
"no_copy": 0,
"options": "party_account_currency",
"permlevel": 0,
@@ -130,6 +135,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Payment Amount",
"length": 0,
"no_copy": 0,
"options": "party_account_currency",
"permlevel": 0,
@@ -149,7 +155,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:38:59.950506",
"max_attachments": 0,
"modified": "2015-11-16 06:29:51.626386",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Tool Detail",

View File

@@ -10,12 +10,12 @@ cur_frm.cscript.onload = function(doc, cdt, cdn) {
// ***************** Get Account Head *****************
cur_frm.fields_dict['closing_account_head'].get_query = function(doc, cdt, cdn) {
return{
filters:{
"company": doc.company,
"root_type": "Liability",
"freeze_account": "No",
"is_group": 0
}
return {
filters: [
['Account', 'company', '=', doc.company],
['Account', 'is_group', '=', '0'],
['Account', 'freeze_account', '=', 'No'],
['Account', 'root_type', 'in', 'Liability, Equity']
]
}
}

View File

@@ -18,6 +18,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
@@ -41,6 +42,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Transaction Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "transaction_date",
"oldfieldtype": "Date",
@@ -64,6 +66,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Posting Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "posting_date",
"oldfieldtype": "Date",
@@ -87,6 +90,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Closing Fiscal Year",
"length": 0,
"no_copy": 0,
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
@@ -111,6 +115,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Data",
@@ -135,6 +140,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"oldfieldname": "company",
"oldfieldtype": "Select",
@@ -158,6 +164,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
@@ -181,6 +188,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Closing Account Head",
"length": 0,
"no_copy": 0,
"oldfieldname": "closing_account_head",
"oldfieldtype": "Link",
@@ -205,6 +213,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Remarks",
"length": 0,
"no_copy": 0,
"oldfieldname": "remarks",
"oldfieldtype": "Small Text",
@@ -227,7 +236,8 @@
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"modified": "2015-10-21 12:40:58.278256",
"max_attachments": 0,
"modified": "2015-11-16 06:29:51.671436",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Period Closing Voucher",

View File

@@ -22,21 +22,21 @@ class PeriodClosingVoucher(AccountsController):
def validate_account_head(self):
closing_account_type = frappe.db.get_value("Account", self.closing_account_head, "root_type")
if closing_account_type != "Liability":
frappe.throw(_("Closing Account {0} must be of type 'Liability'")
if closing_account_type not in ["Liability", "Equity"]:
frappe.throw(_("Closing Account {0} must be of type Liability / Equity")
.format(self.closing_account_head))
account_currency = get_account_currency(self.closing_account_head)
company_currency = frappe.db.get_value("Company", self.company, "default_currency")
company_currency = frappe.db.get_value("Company", self.company, "default_currency")
if account_currency != company_currency:
frappe.throw(_("Currency of the Closing Account must be {0}").format(company_currency))
def validate_posting_date(self):
from erpnext.accounts.utils import get_fiscal_year, validate_fiscal_year
validate_fiscal_year(self.posting_date, self.fiscal_year, label=_("Posting Date"), doc=self)
self.year_start_date = get_fiscal_year(self.posting_date, self.fiscal_year)[1]
pce = frappe.db.sql("""select name from `tabPeriod Closing Voucher`
@@ -50,7 +50,7 @@ class PeriodClosingVoucher(AccountsController):
gl_entries = []
net_pl_balance = 0
pl_accounts = self.get_pl_balances()
for acc in pl_accounts:
if flt(acc.balance_in_company_currency):
gl_entries.append(self.get_gl_dict({
@@ -67,7 +67,7 @@ class PeriodClosingVoucher(AccountsController):
}))
net_pl_balance += flt(acc.balance_in_company_currency)
if net_pl_balance:
gl_entries.append(self.get_gl_dict({
"account": self.closing_account_head,
@@ -76,20 +76,20 @@ class PeriodClosingVoucher(AccountsController):
"credit_in_account_currency": abs(net_pl_balance) if net_pl_balance < 0 else 0,
"credit": abs(net_pl_balance) if net_pl_balance < 0 else 0
}))
from erpnext.accounts.general_ledger import make_gl_entries
make_gl_entries(gl_entries)
def get_pl_balances(self):
"""Get balance for pl accounts"""
return frappe.db.sql("""
select
t1.account, t2.account_currency, sum(ifnull(t1.debit_in_account_currency,0))-sum(ifnull(t1.credit_in_account_currency,0))
as balance_in_account_currency,
sum(ifnull(t1.debit,0))-sum(ifnull(t1.credit,0)) as balance_in_company_currency
select
t1.account, t2.account_currency,
sum(t1.debit_in_account_currency) - sum(t1.credit_in_account_currency) as balance_in_account_currency,
sum(t1.debit) - sum(t1.credit) as balance_in_company_currency
from `tabGL Entry` t1, `tabAccount` t2
where t1.account = t2.name and ifnull(t2.report_type, '') = 'Profit and Loss'
where t1.account = t2.name and t2.report_type = 'Profit and Loss'
and t2.docstatus < 2 and t2.company = %s
and t1.posting_date between %s and %s
group by t1.account
""", (self.company, self.get("year_start_date"), self.posting_date), as_dict=1)
""", (self.company, self.get("year_start_date"), self.posting_date), as_dict=1)

View File

@@ -12,60 +12,60 @@ from erpnext.accounts.doctype.journal_entry.test_journal_entry import make_journ
class TestPeriodClosingVoucher(unittest.TestCase):
def test_closing_entry(self):
year_start_date = get_fiscal_year(today())[1]
make_journal_entry("_Test Bank - _TC", "Sales - _TC", 400,
make_journal_entry("_Test Bank - _TC", "Sales - _TC", 400,
"_Test Cost Center - _TC", submit=True)
make_journal_entry("_Test Account Cost for Goods Sold - _TC",
make_journal_entry("_Test Account Cost for Goods Sold - _TC",
"_Test Bank - _TC", 600, "_Test Cost Center - _TC", submit=True)
random_expense_account = frappe.db.sql("""
select t1.account,
sum(ifnull(t1.debit,0))-sum(ifnull(t1.credit,0)) as balance,
sum(ifnull(t1.debit_in_account_currency,0))-sum(ifnull(t1.credit_in_account_currency,0)) \
select t1.account,
sum(t1.debit) - sum(t1.credit) as balance,
sum(t1.debit_in_account_currency) - sum(t1.credit_in_account_currency) \
as balance_in_account_currency
from `tabGL Entry` t1, `tabAccount` t2
where t1.account = t2.name and ifnull(t2.root_type, '') = 'Expense'
where t1.account = t2.name and t2.root_type = 'Expense'
and t2.docstatus < 2 and t2.company = '_Test Company'
and t1.posting_date between %s and %s
group by t1.account
having sum(ifnull(t1.debit,0)) > sum(ifnull(t1.credit,0))
having sum(t1.debit) > sum(t1.credit)
limit 1""", (year_start_date, today()), as_dict=True)
profit_or_loss = frappe.db.sql("""select sum(ifnull(t1.debit,0))-sum(ifnull(t1.credit,0)) as balance
profit_or_loss = frappe.db.sql("""select sum(t1.debit) - sum(t1.credit) as balance
from `tabGL Entry` t1, `tabAccount` t2
where t1.account = t2.name and ifnull(t2.report_type, '') = 'Profit and Loss'
where t1.account = t2.name and t2.report_type = 'Profit and Loss'
and t2.docstatus < 2 and t2.company = '_Test Company'
and t1.posting_date between %s and %s""", (year_start_date, today()))
profit_or_loss = flt(profit_or_loss[0][0]) if profit_or_loss else 0
pcv = self.make_period_closing_voucher()
# Check value for closing account
gle_amount_for_closing_account = frappe.db.sql("""select ifnull(debit, 0) - ifnull(credit, 0)
gle_amount_for_closing_account = frappe.db.sql("""select debit - credit
from `tabGL Entry` where voucher_type='Period Closing Voucher' and voucher_no=%s
and account = '_Test Account Reserves and Surplus - _TC'""", pcv.name)
gle_amount_for_closing_account = flt(gle_amount_for_closing_account[0][0]) \
if gle_amount_for_closing_account else 0
self.assertEqual(gle_amount_for_closing_account, profit_or_loss)
if random_expense_account:
# Check posted value for teh above random_expense_account
gle_for_random_expense_account = frappe.db.sql("""
select ifnull(debit, 0) - ifnull(credit, 0) as amount,
ifnull(debit_in_account_currency, 0) - ifnull(credit_in_account_currency, 0)
select debit - credit as amount,
debit_in_account_currency - credit_in_account_currency
as amount_in_account_currency
from `tabGL Entry`
where voucher_type='Period Closing Voucher' and voucher_no=%s and account =%s""",
from `tabGL Entry`
where voucher_type='Period Closing Voucher' and voucher_no=%s and account =%s""",
(pcv.name, random_expense_account[0].account), as_dict=True)
self.assertEqual(gle_for_random_expense_account[0].amount, -1*random_expense_account[0].balance)
self.assertEqual(gle_for_random_expense_account[0].amount_in_account_currency,
self.assertEqual(gle_for_random_expense_account[0].amount_in_account_currency,
-1*random_expense_account[0].balance_in_account_currency)
def make_period_closing_voucher(self):
pcv = frappe.get_doc({
"doctype": "Period Closing Voucher",
@@ -77,7 +77,7 @@ class TestPeriodClosingVoucher(unittest.TestCase):
})
pcv.insert()
pcv.submit()
return pcv

View File

@@ -19,6 +19,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Applicable for User",
"length": 0,
"no_copy": 0,
"oldfieldname": "user",
"oldfieldtype": "Link",
@@ -43,6 +44,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Series",
"length": 0,
"no_copy": 1,
"oldfieldname": "naming_series",
"oldfieldtype": "Select",
@@ -67,6 +69,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Warehouse",
"length": 0,
"no_copy": 0,
"oldfieldname": "warehouse",
"oldfieldtype": "Link",
@@ -93,6 +96,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Update Stock",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -113,6 +117,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -135,6 +140,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Customer",
"length": 0,
"no_copy": 0,
"oldfieldname": "customer_account",
"oldfieldtype": "Link",
@@ -159,6 +165,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Company",
"length": 0,
"no_copy": 0,
"oldfieldname": "company",
"oldfieldtype": "Link",
@@ -183,6 +190,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Currency",
"length": 0,
"no_copy": 0,
"oldfieldname": "currency",
"oldfieldtype": "Select",
@@ -207,6 +215,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Mode of Payment",
"length": 0,
"no_copy": 0,
"options": "Mode of Payment",
"permlevel": 0,
@@ -229,6 +238,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -251,6 +261,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Print Format",
"length": 0,
"no_copy": 0,
"options": "Print Format",
"permlevel": 0,
@@ -274,6 +285,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Letter Head",
"length": 0,
"no_copy": 0,
"oldfieldname": "letter_head",
"oldfieldtype": "Select",
@@ -298,6 +310,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Print Heading",
"length": 0,
"no_copy": 0,
"oldfieldname": "select_print_heading",
"oldfieldtype": "Select",
@@ -322,6 +335,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Terms and Conditions",
"length": 0,
"no_copy": 0,
"oldfieldname": "tc_name",
"oldfieldtype": "Link",
@@ -345,6 +359,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
@@ -368,6 +383,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Territory",
"length": 0,
"no_copy": 0,
"oldfieldname": "territory",
"oldfieldtype": "Link",
@@ -392,6 +408,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Price List",
"length": 0,
"no_copy": 0,
"oldfieldname": "price_list_name",
"oldfieldtype": "Select",
@@ -415,6 +432,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -437,6 +455,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
@@ -460,6 +479,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off Cost Center",
"length": 0,
"no_copy": 0,
"options": "Cost Center",
"permlevel": 0,
@@ -483,6 +503,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Taxes and Charges",
"length": 0,
"no_copy": 0,
"oldfieldname": "charge",
"oldfieldtype": "Link",
@@ -506,6 +527,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -528,6 +550,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Cash/Bank Account",
"length": 0,
"no_copy": 0,
"oldfieldname": "cash_bank_account",
"oldfieldtype": "Link",
@@ -552,6 +575,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Income Account",
"length": 0,
"no_copy": 0,
"oldfieldname": "income_account",
"oldfieldtype": "Link",
@@ -577,6 +601,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Expense Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
@@ -599,6 +624,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Cost Center",
"length": 0,
"no_copy": 0,
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
@@ -622,7 +648,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:39:00.196535",
"max_attachments": 0,
"modified": "2015-11-16 06:29:51.741253",
"modified_by": "Administrator",
"module": "Accounts",
"name": "POS Profile",

View File

@@ -20,6 +20,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -41,6 +42,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Title",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
@@ -63,7 +65,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Apply On",
"label": "Apply On",
"length": 0,
"no_copy": 0,
"options": "\nItem Code\nItem Group\nBrand",
"permlevel": 0,
@@ -87,6 +90,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Item Code",
"length": 0,
"no_copy": 0,
"options": "Item",
"permlevel": 0,
@@ -110,6 +114,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Brand",
"length": 0,
"no_copy": 0,
"options": "Brand",
"permlevel": 0,
@@ -133,6 +138,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Item Group",
"length": 0,
"no_copy": 0,
"options": "Item Group",
"permlevel": 0,
@@ -154,6 +160,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -176,7 +183,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Priority",
"label": "Priority",
"length": 0,
"no_copy": 0,
"options": "\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n14\n15\n16\n17\n18\n19\n20",
"permlevel": 0,
@@ -199,6 +207,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Disable",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -219,6 +228,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -241,6 +251,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Selling",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -262,6 +273,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Buying",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -282,6 +294,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -304,7 +317,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Applicable For",
"label": "Applicable For",
"length": 0,
"no_copy": 0,
"options": "\nCustomer\nCustomer Group\nTerritory\nSales Partner\nCampaign\nSupplier\nSupplier Type",
"permlevel": 0,
@@ -328,6 +342,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Customer",
"length": 0,
"no_copy": 0,
"options": "Customer",
"permlevel": 0,
@@ -351,6 +366,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Customer Group",
"length": 0,
"no_copy": 0,
"options": "Customer Group",
"permlevel": 0,
@@ -374,6 +390,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Territory",
"length": 0,
"no_copy": 0,
"options": "Territory",
"permlevel": 0,
@@ -397,6 +414,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Sales Partner",
"length": 0,
"no_copy": 0,
"options": "Sales Partner",
"permlevel": 0,
@@ -420,6 +438,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Campaign",
"length": 0,
"no_copy": 0,
"options": "Campaign",
"permlevel": 0,
@@ -443,6 +462,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Supplier",
"length": 0,
"no_copy": 0,
"options": "Supplier",
"permlevel": 0,
@@ -466,6 +486,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Supplier Type",
"length": 0,
"no_copy": 0,
"options": "Supplier Type",
"permlevel": 0,
@@ -487,6 +508,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -509,6 +531,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Min Qty",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -529,6 +552,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -551,6 +575,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Max Qty",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -571,6 +596,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -594,6 +620,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Valid From",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -615,6 +642,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Valid Upto",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -635,6 +663,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -656,6 +685,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
@@ -678,6 +708,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -699,7 +730,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Price or Discount",
"label": "Price or Discount",
"length": 0,
"no_copy": 0,
"options": "\nPrice\nDiscount Percentage",
"permlevel": 0,
@@ -721,6 +753,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -743,6 +776,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Price",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -765,6 +799,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Discount on Price List Rate (%)",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -787,6 +822,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "For Price List",
"length": 0,
"no_copy": 0,
"options": "Price List",
"permlevel": 0,
@@ -809,6 +845,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"options": "Simple",
"permlevel": 0,
@@ -831,6 +868,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Pricing Rule Help",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -851,7 +889,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:39:00.632196",
"max_attachments": 0,
"modified": "2015-11-16 06:29:51.958974",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Pricing Rule",

View File

@@ -59,7 +59,7 @@ class PricingRule(Document):
self.set(f, None)
def validate_price_or_discount(self):
for field in ["Price", "Discount Percentage"]:
for field in ["Price"]:
if flt(self.get(frappe.scrub(field))) < 0:
throw(_("{0} can not be negative").format(field))
@@ -168,14 +168,18 @@ def get_pricing_rules(args):
field = frappe.scrub(parenttype)
condition = ""
if args.get(field):
lft, rgt = frappe.db.get_value(parenttype, args[field], ["lft", "rgt"])
try:
lft, rgt = frappe.db.get_value(parenttype, args[field], ["lft", "rgt"])
except TypeError:
frappe.throw(_("Invalid {0}").format(args[field]))
parent_groups = frappe.db.sql_list("""select name from `tab%s`
where lft<=%s and rgt>=%s""" % (parenttype, '%s', '%s'), (lft, rgt))
if parent_groups:
if allow_blank: parent_groups.append('')
condition = " ifnull("+field+", '') in ('" + \
"', '".join([d.replace("'", "\\'").replace('"', '\\"').replace("%", "%%") for d in parent_groups])+"')"
"', '".join([frappe.db.escape(d) for d in parent_groups])+"')"
return condition
@@ -202,8 +206,8 @@ def get_pricing_rules(args):
return frappe.db.sql("""select * from `tabPricing Rule`
where (item_code=%(item_code)s {item_group_condition} or brand=%(brand)s)
and docstatus < 2 and ifnull(disable, 0) = 0
and ifnull({transaction_type}, 0) = 1 {conditions}
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), args, as_dict=1)

View File

@@ -24,7 +24,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
if(!doc.is_return) {
if(doc.docstatus==1) {
if(doc.outstanding_amount > 0) {
if(doc.outstanding_amount != 0) {
this.frm.add_custom_button(__('Payment'), this.make_bank_entry).addClass("btn-primary");
}
cur_frm.add_custom_button(__('Debit Note'), this.make_debit_note);
@@ -38,7 +38,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
get_query_filters: {
supplier: cur_frm.doc.supplier || undefined,
docstatus: 1,
status: ["!=", "Stopped"],
status: ["not in", ["Stopped", "Closed"]],
per_billed: ["<", 99.99],
company: cur_frm.doc.company
}
@@ -52,6 +52,7 @@ erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
get_query_filters: {
supplier: cur_frm.doc.supplier || undefined,
docstatus: 1,
status: ["!=", "Closed"],
company: cur_frm.doc.company
}
})
@@ -135,9 +136,10 @@ cur_frm.script_manager.make(erpnext.accounts.PurchaseInvoice);
cur_frm.cscript.make_bank_entry = function() {
return frappe.call({
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_from_purchase_invoice",
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_against_invoice",
args: {
"purchase_invoice": cur_frm.doc.name,
"dt": "Purchase Invoice",
"dn": cur_frm.doc.name
},
callback: function(r) {
var doclist = frappe.model.sync(r.message);

View File

@@ -48,7 +48,7 @@ class PurchaseInvoice(BuyingController):
self.check_conversion_rate()
self.validate_credit_to_acc()
self.clear_unallocated_advances("Purchase Invoice Advance", "advances")
self.check_for_stopped_status()
self.check_for_stopped_or_closed_status()
self.validate_with_previous_doc()
self.validate_uom_is_integer("uom", "qty")
self.set_against_expense_account()
@@ -103,14 +103,14 @@ class PurchaseInvoice(BuyingController):
self.party_account_currency = account.account_currency
def check_for_stopped_status(self):
def check_for_stopped_or_closed_status(self):
check_list = []
pc_obj = frappe.get_doc('Purchase Common')
for d in self.get('items'):
if d.purchase_order and not d.purchase_order in check_list and not d.purchase_receipt:
check_list.append(d.purchase_order)
stopped = frappe.db.sql("select name from `tabPurchase Order` where status = 'Stopped' and name = %s", d.purchase_order)
if stopped:
throw(_("Purchase Order {0} is 'Stopped'").format(d.purchase_order))
pc_obj.check_for_stopped_or_closed_status('Purchase Order', d.purchase_order)
def validate_with_previous_doc(self):
super(PurchaseInvoice, self).validate_with_previous_doc({
@@ -150,10 +150,14 @@ class PurchaseInvoice(BuyingController):
against_accounts = []
stock_items = self.get_stock_items()
for item in self.get("items"):
# in case of auto inventory accounting,
# against expense account is always "Stock Received But Not Billed"
# for a stock item and if not epening entry and not drop-ship entry
if auto_accounting_for_stock and item.item_code in stock_items \
and self.is_opening == 'No':
# in case of auto inventory accounting, against expense account is always
# Stock Received But Not Billed for a stock item
and self.is_opening == 'No' and (not item.po_detail or
not frappe.db.get_value("Purchase Order Item", item.po_detail, "delivered_by_supplier")):
item.expense_account = stock_not_billed_account
item.cost_center = None
@@ -176,9 +180,10 @@ class PurchaseInvoice(BuyingController):
throw(_("Purchse Order number required for Item {0}").format(d.item_code))
def pr_required(self):
stock_items = self.get_stock_items()
if frappe.db.get_value("Buying Settings", None, "pr_required") == 'Yes':
for d in self.get('items'):
if not d.purchase_receipt:
if not d.purchase_receipt and d.item_code in stock_items:
throw(_("Purchase Receipt number required for Item {0}").format(d.item_code))
def validate_write_off_account(self):
@@ -394,6 +399,8 @@ class PurchaseInvoice(BuyingController):
make_gl_entries(gl_entries, cancel=(self.docstatus == 2))
def on_cancel(self):
self.check_for_stopped_or_closed_status()
if not self.is_return:
from erpnext.accounts.utils import remove_against_link_from_jv
remove_against_link_from_jv(self.doctype, self.name)
@@ -436,10 +443,10 @@ def get_expense_account(doctype, txt, searchfield, start, page_len, filters):
or tabAccount.account_type in ("Expense Account", "Fixed Asset", "Temporary"))
and tabAccount.is_group=0
and tabAccount.docstatus!=2
and tabAccount.company = '%(company)s'
and tabAccount.%(key)s LIKE '%(txt)s'
%(mcond)s""" % {'company': filters['company'], 'key': searchfield,
'txt': "%%%s%%" % frappe.db.escape(txt), 'mcond':get_match_cond(doctype)})
and tabAccount.company = %(company)s
and tabAccount.{key} LIKE %(txt)s
{mcond}""".format( key=frappe.db.escape(searchfield), mcond=get_match_cond(doctype) ),
{ 'company': filters['company'], 'txt': "%%%s%%" % frappe.db.escape(txt) })
@frappe.whitelist()
def make_debit_note(source_name, target_doc=None):

View File

@@ -221,7 +221,7 @@ class TestPurchaseInvoice(unittest.TestCase):
test_recurring_document(self, test_records)
def test_total_purchase_cost_for_project(self):
existing_purchase_cost = frappe.db.sql("""select sum(ifnull(base_net_amount, 0))
existing_purchase_cost = frappe.db.sql("""select sum(base_net_amount)
from `tabPurchase Invoice Item` where project_name = '_Test Project' and docstatus=1""")
existing_purchase_cost = existing_purchase_cost and existing_purchase_cost[0][0] or 0

View File

@@ -18,6 +18,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Journal Entry",
"length": 0,
"no_copy": 1,
"oldfieldname": "journal_voucher",
"oldfieldtype": "Link",
@@ -44,6 +45,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Journal Entry Detail No",
"length": 0,
"no_copy": 1,
"oldfieldname": "jv_detail_no",
"oldfieldtype": "Date",
@@ -69,6 +71,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Remarks",
"length": 0,
"no_copy": 1,
"oldfieldname": "remarks",
"oldfieldtype": "Small Text",
@@ -93,6 +96,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -114,6 +118,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Advance Amount",
"length": 0,
"no_copy": 1,
"oldfieldname": "advance_amount",
"oldfieldtype": "Currency",
@@ -140,6 +145,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Allocated Amount",
"length": 0,
"no_copy": 1,
"oldfieldname": "allocated_amount",
"oldfieldtype": "Currency",
@@ -164,7 +170,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:39:03.538046",
"max_attachments": 0,
"modified": "2015-11-16 06:29:53.288895",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Advance",

View File

@@ -19,6 +19,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Item",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_code",
"oldfieldtype": "Link",
@@ -42,6 +43,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -63,6 +65,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Item Name",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_name",
"oldfieldtype": "Data",
@@ -86,6 +89,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -108,6 +112,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"oldfieldname": "description",
"oldfieldtype": "Text",
@@ -133,6 +138,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Image",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -155,6 +161,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Image View",
"length": 0,
"no_copy": 0,
"options": "image",
"permlevel": 0,
@@ -178,6 +185,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Quantity and Rate",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -199,6 +207,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Qty",
"length": 0,
"no_copy": 0,
"oldfieldname": "qty",
"oldfieldtype": "Currency",
@@ -221,6 +230,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -242,6 +252,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "UOM",
"length": 0,
"no_copy": 0,
"options": "UOM",
"permlevel": 0,
@@ -264,6 +275,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Conversion Factor",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
@@ -284,6 +296,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -305,6 +318,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Price List Rate",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -328,6 +342,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Discount on Price List Rate (%)",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -348,6 +363,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -369,6 +385,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Price List Rate (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -390,6 +407,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -411,6 +429,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Rate ",
"length": 0,
"no_copy": 0,
"oldfieldname": "import_rate",
"oldfieldtype": "Currency",
@@ -435,6 +454,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Amount",
"length": 0,
"no_copy": 0,
"oldfieldname": "import_amount",
"oldfieldtype": "Currency",
@@ -458,6 +478,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -479,6 +500,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Rate (Company Currency)",
"length": 0,
"no_copy": 0,
"oldfieldname": "rate",
"oldfieldtype": "Currency",
@@ -503,6 +525,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Amount (Company Currency)",
"length": 0,
"no_copy": 0,
"oldfieldname": "amount",
"oldfieldtype": "Currency",
@@ -527,6 +550,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Pricing Rule",
"length": 0,
"no_copy": 0,
"options": "Pricing Rule",
"permlevel": 0,
@@ -548,6 +572,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -570,6 +595,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Net Rate",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -593,6 +619,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Net Amount",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -615,6 +642,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -637,6 +665,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Net Rate (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -660,6 +689,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Net Amount (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -683,6 +713,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Accounting",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -704,6 +735,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Expense Head",
"length": 0,
"no_copy": 0,
"oldfieldname": "expense_head",
"oldfieldtype": "Link",
@@ -729,6 +761,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -750,6 +783,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Project Name",
"length": 0,
"no_copy": 0,
"options": "Project",
"permlevel": 0,
@@ -773,6 +807,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Cost Center",
"length": 0,
"no_copy": 0,
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
@@ -799,6 +834,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Reference",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -820,6 +856,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Brand",
"length": 0,
"no_copy": 0,
"oldfieldname": "brand",
"oldfieldtype": "Data",
@@ -844,6 +881,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Item Group",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_group",
"oldfieldtype": "Link",
@@ -869,6 +907,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Item Tax Rate",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_tax_rate",
"oldfieldtype": "Small Text",
@@ -892,6 +931,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Item Tax Amount",
"length": 0,
"no_copy": 1,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -916,6 +956,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Purchase Order",
"length": 0,
"no_copy": 1,
"oldfieldname": "purchase_order",
"oldfieldtype": "Link",
@@ -939,6 +980,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -960,6 +1002,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Purchase Order Item",
"length": 0,
"no_copy": 1,
"oldfieldname": "po_detail",
"oldfieldtype": "Data",
@@ -983,6 +1026,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Purchase Receipt",
"length": 0,
"no_copy": 1,
"oldfieldname": "purchase_receipt",
"oldfieldtype": "Link",
@@ -1007,6 +1051,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Page Break",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
@@ -1028,6 +1073,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "PR Detail",
"length": 0,
"no_copy": 1,
"oldfieldname": "pr_detail",
"oldfieldtype": "Data",
@@ -1051,6 +1097,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Valuation Rate",
"length": 0,
"no_copy": 1,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -1073,6 +1120,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Raw Materials Supplied Cost",
"length": 0,
"no_copy": 1,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -1093,7 +1141,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-19 03:04:52.304768",
"max_attachments": 0,
"modified": "2015-11-16 06:29:53.343792",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Invoice Item",

View File

@@ -19,7 +19,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Consider Tax or Charge for",
"label": "Consider Tax or Charge for",
"length": 0,
"no_copy": 0,
"oldfieldname": "category",
"oldfieldtype": "Select",
@@ -44,7 +45,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Add or Deduct",
"label": "Add or Deduct",
"length": 0,
"no_copy": 0,
"oldfieldname": "add_deduct_tax",
"oldfieldtype": "Select",
@@ -68,7 +70,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Type",
"label": "Type",
"length": 0,
"no_copy": 0,
"oldfieldname": "charge_type",
"oldfieldtype": "Select",
@@ -94,6 +97,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Reference Row #",
"length": 0,
"no_copy": 0,
"oldfieldname": "row_id",
"oldfieldtype": "Data",
@@ -118,6 +122,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Is this Tax included in Basic Rate?",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -139,6 +144,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -160,6 +166,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Account Head",
"length": 0,
"no_copy": 0,
"oldfieldname": "account_head",
"oldfieldtype": "Link",
@@ -185,6 +192,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Cost Center",
"length": 0,
"no_copy": 0,
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
@@ -209,6 +217,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Description",
"length": 0,
"no_copy": 0,
"oldfieldname": "description",
"oldfieldtype": "Small Text",
@@ -233,6 +242,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -255,6 +265,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Rate",
"length": 0,
"no_copy": 0,
"oldfieldname": "rate",
"oldfieldtype": "Currency",
@@ -277,6 +288,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -299,6 +311,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Amount",
"length": 0,
"no_copy": 0,
"oldfieldname": "tax_amount",
"oldfieldtype": "Currency",
@@ -323,6 +336,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Tax Amount After Discount Amount",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -346,6 +360,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total",
"length": 0,
"no_copy": 0,
"oldfieldname": "total",
"oldfieldtype": "Currency",
@@ -369,6 +384,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -391,6 +407,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Amount (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -414,6 +431,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -437,6 +455,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Tax Amount After Discount Amount",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -460,6 +479,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Item Wise Tax Detail ",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_wise_tax_detail",
"oldfieldtype": "Small Text",
@@ -483,6 +503,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Parenttype",
"length": 0,
"no_copy": 0,
"oldfieldname": "parenttype",
"oldfieldtype": "Data",
@@ -504,7 +525,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:39:06.372275",
"max_attachments": 0,
"modified": "2015-11-16 06:29:54.644704",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Taxes and Charges",

View File

@@ -21,6 +21,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Title",
"length": 0,
"no_copy": 1,
"oldfieldname": "title",
"oldfieldtype": "Data",
@@ -44,6 +45,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Default",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -65,6 +67,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Disabled",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -87,6 +90,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -109,6 +113,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
@@ -131,6 +136,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -153,6 +159,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Purchase Taxes and Charges",
"length": 0,
"no_copy": 0,
"oldfieldname": "purchase_tax_details",
"oldfieldtype": "Table",
@@ -176,7 +183,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:39:06.563868",
"max_attachments": 0,
"modified": "2015-11-16 06:29:54.729312",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Taxes and Charges Template",

View File

@@ -48,8 +48,9 @@ def get_items(price_list, sales_or_purchase, item=None):
ON
(item_det.item_code=i.name or item_det.item_code=i.variant_of)
where
ifnull(i.has_variants, 0) = 0 and
i.has_variants = 0 and
{condition}
order by
{order_by}
i.name""".format(condition=condition, order_by=order_by), args, as_dict=1)
i.name
limit 24""".format(condition=condition, order_by=order_by), args, as_dict=1)

View File

@@ -50,6 +50,13 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
if(doc.update_stock) this.show_stock_ledger();
if(doc.docstatus==1 && !doc.is_return) {
var is_delivered_by_supplier = false;
is_delivered_by_supplier = cur_frm.doc.items.some(function(item){
return item.is_delivered_by_supplier ? true : false;
})
cur_frm.add_custom_button(doc.update_stock ? __('Sales Return') : __('Credit Note'),
this.make_sales_return);
@@ -61,7 +68,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
return item.delivery_note ? true : false;
});
if(!from_delivery_note) {
if(!from_delivery_note && !is_delivered_by_supplier) {
cur_frm.add_custom_button(__('Delivery'), cur_frm.cscript['Make Delivery Note']).addClass("btn-primary");
}
}
@@ -104,7 +111,7 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
source_doctype: "Sales Order",
get_query_filters: {
docstatus: 1,
status: ["!=", "Stopped"],
status: ["not in", ["Stopped", "Closed"]],
per_billed: ["<", 99.99],
customer: cur_frm.doc.customer || undefined,
company: cur_frm.doc.company
@@ -160,6 +167,9 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
me.set_dynamic_labels();
me.calculate_taxes_and_totals();
if(callback_fn) callback_fn();
frappe.after_ajax(function() {
cur_frm.doc.__missing_values_set = false;
})
}
}
});
@@ -320,9 +330,10 @@ cur_frm.cscript['Make Delivery Note'] = function() {
cur_frm.cscript.make_bank_entry = function() {
return frappe.call({
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_from_sales_invoice",
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_against_invoice",
args: {
"sales_invoice": cur_frm.doc.name
"dt": "Sales Invoice",
"dn": cur_frm.doc.name
},
callback: function(r) {
var doclist = frappe.model.sync(r.message);

View File

@@ -21,6 +21,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"options": "icon-user",
"permlevel": 0,
@@ -44,6 +45,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Title",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
@@ -65,7 +67,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Series",
"label": "Series",
"length": 0,
"no_copy": 1,
"oldfieldname": "naming_series",
"oldfieldtype": "Select",
@@ -90,6 +93,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Customer",
"length": 0,
"no_copy": 0,
"oldfieldname": "customer",
"oldfieldtype": "Link",
@@ -115,6 +119,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Customer Name",
"length": 0,
"no_copy": 0,
"oldfieldname": "customer_name",
"oldfieldtype": "Data",
@@ -138,6 +143,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Address",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -159,6 +165,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Contact",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -180,6 +187,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Mobile No",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -201,6 +209,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Contact Email",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
@@ -222,6 +231,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Is POS",
"length": 0,
"no_copy": 0,
"oldfieldname": "is_pos",
"oldfieldtype": "Check",
@@ -246,6 +256,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Is Return",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -267,6 +278,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
@@ -290,6 +302,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Date",
"length": 0,
"no_copy": 1,
"oldfieldname": "posting_date",
"oldfieldtype": "Date",
@@ -313,6 +326,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Payment Due Date",
"length": 0,
"no_copy": 1,
"oldfieldname": "due_date",
"oldfieldtype": "Date",
@@ -336,6 +350,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"oldfieldname": "company",
"oldfieldtype": "Link",
@@ -360,6 +375,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Link",
@@ -385,6 +401,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Return Against Sales Invoice",
"length": 0,
"no_copy": 0,
"options": "Sales Invoice",
"permlevel": 0,
@@ -408,6 +425,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Shipping Address Name",
"length": 0,
"no_copy": 0,
"options": "Address",
"permlevel": 0,
@@ -431,6 +449,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Shipping Address",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -453,6 +472,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Currency and Price List",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
@@ -475,6 +495,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Currency",
"length": 0,
"no_copy": 0,
"oldfieldname": "currency",
"oldfieldtype": "Select",
@@ -500,6 +521,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Exchange Rate",
"length": 0,
"no_copy": 0,
"oldfieldname": "conversion_rate",
"oldfieldtype": "Currency",
@@ -523,6 +545,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -545,6 +568,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Price List",
"length": 0,
"no_copy": 0,
"oldfieldname": "price_list_name",
"oldfieldtype": "Select",
@@ -569,6 +593,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Price List Currency",
"length": 0,
"no_copy": 0,
"options": "Currency",
"permlevel": 0,
@@ -592,6 +617,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Price List Exchange Rate",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "9",
@@ -614,6 +640,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Ignore Pricing Rule",
"length": 0,
"no_copy": 1,
"permlevel": 1,
"print_hide": 1,
@@ -635,6 +662,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"options": "icon-shopping-cart",
@@ -658,6 +686,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Update Stock",
"length": 0,
"no_copy": 0,
"oldfieldname": "update_stock",
"oldfieldtype": "Check",
@@ -681,6 +710,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Items",
"length": 0,
"no_copy": 0,
"oldfieldname": "entries",
"oldfieldtype": "Table",
@@ -705,6 +735,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Packing List",
"length": 0,
"no_copy": 0,
"options": "icon-suitcase",
"permlevel": 0,
@@ -727,6 +758,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Packed Items",
"length": 0,
"no_copy": 0,
"options": "Packed Item",
"permlevel": 0,
@@ -749,6 +781,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Product Bundle Help",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
@@ -769,6 +802,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -790,6 +824,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -813,6 +848,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Net Total (Company Currency)",
"length": 0,
"no_copy": 0,
"oldfieldname": "net_total",
"oldfieldtype": "Currency",
@@ -836,6 +872,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -857,6 +894,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -880,6 +918,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Net Total",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -902,6 +941,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"options": "icon-money",
@@ -925,6 +965,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Taxes and Charges",
"length": 0,
"no_copy": 0,
"oldfieldname": "charge",
"oldfieldtype": "Link",
@@ -948,6 +989,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -969,6 +1011,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Shipping Rule",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Button",
"options": "Shipping Rule",
@@ -991,6 +1034,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -1012,6 +1056,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Sales Taxes and Charges",
"length": 0,
"no_copy": 0,
"oldfieldname": "other_charges",
"oldfieldtype": "Table",
@@ -1036,6 +1081,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Taxes and Charges Calculation",
"length": 0,
"no_copy": 0,
"oldfieldtype": "HTML",
"permlevel": 0,
@@ -1057,6 +1103,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -1078,6 +1125,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Taxes and Charges (Company Currency)",
"length": 0,
"no_copy": 0,
"oldfieldname": "other_charges_total",
"oldfieldtype": "Currency",
@@ -1101,6 +1149,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -1123,6 +1172,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Taxes and Charges",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -1146,6 +1196,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Additional Discount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -1168,7 +1219,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Apply Additional Discount On",
"label": "Apply Additional Discount On",
"length": 0,
"no_copy": 0,
"options": "\nGrand Total\nNet Total",
"permlevel": 0,
@@ -1191,6 +1243,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -1212,6 +1265,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Additional Discount Amount",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -1234,6 +1288,7 @@
"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,
@@ -1257,6 +1312,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"options": "icon-money",
@@ -1280,6 +1336,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Grand Total (Company Currency)",
"length": 0,
"no_copy": 0,
"oldfieldname": "grand_total",
"oldfieldtype": "Currency",
@@ -1304,6 +1361,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Rounded Total (Company Currency)",
"length": 0,
"no_copy": 0,
"oldfieldname": "rounded_total",
"oldfieldtype": "Currency",
@@ -1329,6 +1387,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "In Words (Company Currency)",
"length": 0,
"no_copy": 0,
"oldfieldname": "in_words",
"oldfieldtype": "Data",
@@ -1351,6 +1410,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
@@ -1374,6 +1434,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Grand Total",
"length": 0,
"no_copy": 0,
"oldfieldname": "grand_total_export",
"oldfieldtype": "Currency",
@@ -1398,6 +1459,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Rounded Total",
"length": 0,
"no_copy": 0,
"oldfieldname": "rounded_total_export",
"oldfieldtype": "Currency",
@@ -1422,6 +1484,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "In Words",
"length": 0,
"no_copy": 0,
"oldfieldname": "in_words_export",
"oldfieldtype": "Data",
@@ -1445,6 +1508,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Advance",
"length": 0,
"no_copy": 0,
"oldfieldname": "total_advance",
"oldfieldtype": "Currency",
@@ -1469,6 +1533,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Outstanding Amount",
"length": 0,
"no_copy": 1,
"oldfieldname": "outstanding_amount",
"oldfieldtype": "Currency",
@@ -1494,6 +1559,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Advance Payments",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"options": "icon-money",
@@ -1517,6 +1583,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Get Advances Received",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Button",
"options": "get_advances",
@@ -1540,6 +1607,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Advances",
"length": 0,
"no_copy": 0,
"oldfieldname": "advance_adjustment_details",
"oldfieldtype": "Table",
@@ -1566,6 +1634,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Payments",
"length": 0,
"no_copy": 0,
"options": "icon-money",
"permlevel": 0,
@@ -1588,6 +1657,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Mode of Payment",
"length": 0,
"no_copy": 0,
"oldfieldname": "mode_of_payment",
"oldfieldtype": "Select",
@@ -1613,6 +1683,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Cash/Bank Account",
"length": 0,
"no_copy": 0,
"oldfieldname": "cash_bank_account",
"oldfieldtype": "Link",
@@ -1637,6 +1708,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -1660,6 +1732,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Paid Amount",
"length": 0,
"no_copy": 1,
"oldfieldname": "paid_amount",
"oldfieldtype": "Currency",
@@ -1684,6 +1757,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Paid Amount (Company Currency)",
"length": 0,
"no_copy": 1,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -1709,6 +1783,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -1732,6 +1807,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off Amount",
"length": 0,
"no_copy": 1,
"options": "currency",
"permlevel": 0,
@@ -1754,6 +1830,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off Amount (Company Currency)",
"length": 0,
"no_copy": 1,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -1778,6 +1855,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off Outstanding Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
@@ -1799,6 +1877,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -1822,6 +1901,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
@@ -1845,6 +1925,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Write Off Cost Center",
"length": 0,
"no_copy": 0,
"options": "Cost Center",
"permlevel": 0,
@@ -1868,6 +1949,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Terms",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"options": "",
@@ -1891,6 +1973,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Terms",
"length": 0,
"no_copy": 0,
"oldfieldname": "tc_name",
"oldfieldtype": "Link",
@@ -1915,6 +1998,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Terms and Conditions Details",
"length": 0,
"no_copy": 0,
"oldfieldname": "terms",
"oldfieldtype": "Text Editor",
@@ -1938,6 +2022,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Printing Settings",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -1960,6 +2045,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Letter Head",
"length": 0,
"no_copy": 0,
"oldfieldname": "letter_head",
"oldfieldtype": "Select",
@@ -1983,6 +2069,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -2005,6 +2092,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Print Heading",
"length": 0,
"no_copy": 1,
"oldfieldname": "select_print_heading",
"oldfieldtype": "Link",
@@ -2030,6 +2118,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "More Information",
"length": 0,
"no_copy": 0,
"options": "icon-bullhorn",
"permlevel": 0,
@@ -2052,6 +2141,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Project Name",
"length": 0,
"no_copy": 0,
"oldfieldname": "project_name",
"oldfieldtype": "Link",
@@ -2077,6 +2167,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Territory",
"length": 0,
"no_copy": 0,
"options": "Territory",
"permlevel": 0,
@@ -2100,6 +2191,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Customer Group",
"length": 0,
"no_copy": 0,
"options": "Customer Group",
"permlevel": 0,
@@ -2121,6 +2213,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -2143,6 +2236,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Customer Address",
"length": 0,
"no_copy": 0,
"options": "Address",
"permlevel": 0,
@@ -2165,6 +2259,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Contact Person",
"length": 0,
"no_copy": 0,
"options": "Contact",
"permlevel": 0,
@@ -2188,6 +2283,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Campaign",
"length": 0,
"no_copy": 0,
"oldfieldname": "campaign",
"oldfieldtype": "Link",
@@ -2211,7 +2307,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Source",
"label": "Source",
"length": 0,
"no_copy": 0,
"oldfieldname": "source",
"oldfieldtype": "Select",
@@ -2236,6 +2333,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Accounting Details",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"options": "icon-file-text",
@@ -2260,6 +2358,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Debit To",
"length": 0,
"no_copy": 0,
"oldfieldname": "debit_to",
"oldfieldtype": "Link",
@@ -2284,6 +2383,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Party Account Currency",
"length": 0,
"no_copy": 1,
"options": "Currency",
"permlevel": 0,
@@ -2308,7 +2408,8 @@
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Is Opening Entry",
"label": "Is Opening Entry",
"length": 0,
"no_copy": 0,
"oldfieldname": "is_opening",
"oldfieldtype": "Select",
@@ -2332,7 +2433,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "C-Form Applicable",
"label": "C-Form Applicable",
"length": 0,
"no_copy": 1,
"options": "No\nYes",
"permlevel": 0,
@@ -2355,6 +2457,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "C-Form No",
"length": 0,
"no_copy": 1,
"options": "C-Form",
"permlevel": 0,
@@ -2376,6 +2479,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
@@ -2398,6 +2502,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Posting Time",
"length": 0,
"no_copy": 1,
"oldfieldname": "posting_time",
"oldfieldtype": "Time",
@@ -2421,6 +2526,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Fiscal Year",
"length": 0,
"no_copy": 0,
"oldfieldname": "fiscal_year",
"oldfieldtype": "Select",
@@ -2445,6 +2551,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Remarks",
"length": 0,
"no_copy": 1,
"oldfieldname": "remarks",
"oldfieldtype": "Text",
@@ -2469,6 +2576,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Commission",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"options": "icon-group",
@@ -2492,6 +2600,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Sales Partner",
"length": 0,
"no_copy": 0,
"oldfieldname": "sales_partner",
"oldfieldtype": "Link",
@@ -2515,6 +2624,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
@@ -2538,6 +2648,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Commission Rate (%)",
"length": 0,
"no_copy": 0,
"oldfieldname": "commission_rate",
"oldfieldtype": "Currency",
@@ -2561,6 +2672,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Commission",
"length": 0,
"no_copy": 0,
"oldfieldname": "total_commission",
"oldfieldtype": "Currency",
@@ -2586,6 +2698,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Sales Team",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
@@ -2607,6 +2720,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Sales Team1",
"length": 0,
"no_copy": 0,
"oldfieldname": "sales_team",
"oldfieldtype": "Table",
@@ -2633,6 +2747,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Recurring",
"length": 0,
"no_copy": 0,
"options": "icon-time",
"permlevel": 0,
@@ -2654,6 +2769,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
@@ -2678,6 +2794,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Is Recurring",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
@@ -2700,7 +2817,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Recurring Type",
"label": "Recurring Type",
"length": 0,
"no_copy": 1,
"options": "\nMonthly\nQuarterly\nHalf-yearly\nYearly",
"permlevel": 0,
@@ -2725,6 +2843,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "From Date",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
@@ -2748,6 +2867,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "To Date",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
@@ -2771,6 +2891,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Repeat on Day of Month",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
@@ -2794,6 +2915,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "End Date",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
@@ -2814,6 +2936,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
@@ -2838,6 +2961,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Next Date",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
@@ -2861,6 +2985,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Recurring Id",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
@@ -2884,6 +3009,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Notification Email Address",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
@@ -2906,6 +3032,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Recurring Print Format",
"length": 0,
"no_copy": 0,
"options": "Print Format",
"permlevel": 0,
@@ -2929,6 +3056,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Against Income Account",
"length": 0,
"no_copy": 1,
"oldfieldname": "against_income_account",
"oldfieldtype": "Small Text",
@@ -2951,7 +3079,8 @@
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:39:09.123982",
"max_attachments": 0,
"modified": "2015-11-16 06:29:55.906783",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice",

View File

@@ -52,7 +52,7 @@ class SalesInvoice(SellingController):
self.validate_proj_cust()
self.validate_with_previous_doc()
self.validate_uom_is_integer("stock_uom", "qty")
self.check_stop_sales_order("sales_order")
self.check_stop_or_close_sales_order("sales_order")
self.validate_debit_to_acc()
self.validate_fixed_asset_account()
self.clear_unallocated_advances("Sales Invoice Advance", "advances")
@@ -64,6 +64,7 @@ class SalesInvoice(SellingController):
self.validate_pos()
if cint(self.update_stock):
self.validate_dropship_item()
self.validate_item_code()
self.validate_warehouse()
self.update_current_stock()
@@ -117,7 +118,7 @@ class SalesInvoice(SellingController):
if cint(self.update_stock) == 1:
self.update_stock_ledger()
self.check_stop_sales_order("sales_order")
self.check_stop_or_close_sales_order("sales_order")
from erpnext.accounts.utils import remove_against_link_from_jv
remove_against_link_from_jv(self.doctype, self.name)
@@ -155,7 +156,7 @@ class SalesInvoice(SellingController):
'second_join_field': 'so_detail',
'overflow_type': 'delivery',
'extra_cond': """ and exists(select name from `tabSales Invoice`
where name=`tabSales Invoice Item`.parent and ifnull(update_stock, 0) = 1)"""
where name=`tabSales Invoice Item`.parent and update_stock = 1)"""
},
{
'source_dt': 'Sales Invoice Item',
@@ -359,8 +360,8 @@ class SalesInvoice(SellingController):
"""check for does customer belong to same project as entered.."""
if self.project_name and self.customer:
res = frappe.db.sql("""select name from `tabProject`
where name = %s and (customer = %s or
ifnull(customer,'')='')""", (self.project_name, self.customer))
where name = %s and (customer = %s or customer is null or customer = '')""",
(self.project_name, self.customer))
if not res:
throw(_("Customer {0} does not belong to project {1}").format(self.customer,self.project_name))
@@ -379,6 +380,8 @@ class SalesInvoice(SellingController):
msgprint(_("Item Code required at Row No {0}").format(d.idx), raise_exception=True)
def validate_warehouse(self):
super(SalesInvoice, self).validate_warehouse()
for d in self.get('items'):
if not d.warehouse:
frappe.throw(_("Warehouse required at Row No {0}").format(d.idx))
@@ -407,6 +410,12 @@ class SalesInvoice(SellingController):
if self.c_form_applicable == 'Yes' and self.c_form_no:
msgprint(_("Please remove this Invoice {0} from C-Form {1}")
.format(self.name, self.c_form_no), raise_exception = 1)
def validate_dropship_item(self):
for item in self.items:
if item.sales_order:
if frappe.db.get_value("Sales Order Item", item.so_detail, "delivered_by_supplier"):
frappe.throw(_("Could not update stock, invoice contains drop shipping item."))
def update_current_stock(self):
for d in self.get('items'):
@@ -434,7 +443,7 @@ class SalesInvoice(SellingController):
if not warehouse:
global_pos_profile = frappe.db.sql("""select name, warehouse from `tabPOS Profile`
where ifnull(user,'') = '' and company = %s""", self.company)
where (user is null or user = '') and company = %s""", self.company)
if global_pos_profile:
warehouse = global_pos_profile[0][1]
@@ -667,7 +676,8 @@ def make_delivery_note(source_name, target_doc=None):
"sales_order": "against_sales_order",
"so_detail": "so_detail"
},
"postprocess": update_item
"postprocess": update_item,
"condition": lambda doc: doc.delivered_by_supplier!=1
},
"Sales Taxes and Charges": {
"doctype": "Sales Taxes and Charges",

View File

@@ -18,6 +18,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Journal Entry",
"length": 0,
"no_copy": 1,
"oldfieldname": "journal_voucher",
"oldfieldtype": "Link",
@@ -44,6 +45,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Remarks",
"length": 0,
"no_copy": 1,
"oldfieldname": "remarks",
"oldfieldtype": "Small Text",
@@ -69,6 +71,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Journal Entry Detail No",
"length": 0,
"no_copy": 1,
"oldfieldname": "jv_detail_no",
"oldfieldtype": "Data",
@@ -93,6 +96,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -114,6 +118,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Advance amount",
"length": 0,
"no_copy": 1,
"oldfieldname": "advance_amount",
"oldfieldtype": "Currency",
@@ -140,6 +145,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Allocated amount",
"length": 0,
"no_copy": 1,
"oldfieldname": "allocated_amount",
"oldfieldtype": "Currency",
@@ -164,7 +170,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:39:09.979547",
"max_attachments": 0,
"modified": "2015-11-16 06:29:56.263776",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Advance",

View File

@@ -19,6 +19,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Barcode",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
@@ -40,6 +41,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Item",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_code",
"oldfieldtype": "Link",
@@ -63,6 +65,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -84,6 +87,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Item Name",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_name",
"oldfieldtype": "Data",
@@ -107,6 +111,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Customer's Item Code",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
@@ -128,6 +133,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Edit Description",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -150,6 +156,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"oldfieldname": "description",
"oldfieldtype": "Text",
@@ -174,6 +181,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -196,6 +204,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Image View",
"length": 0,
"no_copy": 0,
"options": "image",
"permlevel": 0,
@@ -219,6 +228,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Image",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -241,6 +251,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -262,6 +273,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Quantity",
"length": 0,
"no_copy": 0,
"oldfieldname": "qty",
"oldfieldtype": "Currency",
@@ -285,6 +297,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Price List Rate",
"length": 0,
"no_copy": 0,
"oldfieldname": "ref_rate",
"oldfieldtype": "Currency",
@@ -310,6 +323,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Discount on Price List Rate (%)",
"length": 0,
"no_copy": 0,
"oldfieldname": "adj_rate",
"oldfieldtype": "Float",
@@ -332,6 +346,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -353,6 +368,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "UOM",
"length": 0,
"no_copy": 0,
"options": "UOM",
"permlevel": 0,
@@ -375,6 +391,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Price List Rate (Company Currency)",
"length": 0,
"no_copy": 0,
"oldfieldname": "base_ref_rate",
"oldfieldtype": "Currency",
@@ -398,6 +415,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -419,6 +437,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Rate",
"length": 0,
"no_copy": 0,
"oldfieldname": "export_rate",
"oldfieldtype": "Currency",
@@ -443,6 +462,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Amount",
"length": 0,
"no_copy": 0,
"oldfieldname": "export_amount",
"oldfieldtype": "Currency",
@@ -466,6 +486,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -487,6 +508,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Rate (Company Currency)",
"length": 0,
"no_copy": 0,
"oldfieldname": "basic_rate",
"oldfieldtype": "Currency",
@@ -511,6 +533,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Amount (Company Currency)",
"length": 0,
"no_copy": 0,
"oldfieldname": "amount",
"oldfieldtype": "Currency",
@@ -535,6 +558,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Pricing Rule",
"length": 0,
"no_copy": 0,
"options": "Pricing Rule",
"permlevel": 0,
@@ -556,6 +580,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -578,6 +603,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Net Rate",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -601,6 +627,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Net Amount",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -623,6 +650,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -645,6 +673,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Net Rate (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -668,6 +697,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Net Amount (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -680,6 +710,53 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 1,
"collapsible_depends_on": "eval:doc.delivered_by_supplier==1",
"fieldname": "drop_ship",
"fieldtype": "Section Break",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Drop Ship",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 0,
"read_only": 0,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "delivered_by_supplier",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Delivered By Supplier",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -691,6 +768,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Accounting Details",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -712,6 +790,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Income Account",
"length": 0,
"no_copy": 0,
"oldfieldname": "income_account",
"oldfieldtype": "Link",
@@ -738,6 +817,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Expense Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
@@ -760,6 +840,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -782,6 +863,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Cost Center",
"length": 0,
"no_copy": 0,
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
@@ -809,6 +891,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Stock Details",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -830,6 +913,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Warehouse",
"length": 0,
"no_copy": 0,
"oldfieldname": "warehouse",
"oldfieldtype": "Link",
@@ -854,6 +938,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Target Warehouse",
"length": 0,
"no_copy": 0,
"options": "Warehouse",
"permlevel": 0,
@@ -877,6 +962,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Serial No",
"length": 0,
"no_copy": 0,
"oldfieldname": "serial_no",
"oldfieldtype": "Small Text",
@@ -900,6 +986,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Batch No",
"length": 0,
"no_copy": 0,
"options": "Batch",
"permlevel": 0,
@@ -923,6 +1010,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Item Group",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_group",
"oldfieldtype": "Link",
@@ -947,6 +1035,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Brand Name",
"length": 0,
"no_copy": 0,
"oldfieldname": "brand",
"oldfieldtype": "Data",
@@ -970,6 +1059,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Item Tax Rate",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_tax_rate",
"oldfieldtype": "Small Text",
@@ -992,6 +1082,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -1013,6 +1104,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Available Batch Qty at Warehouse",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
@@ -1037,6 +1129,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Available Qty at Warehouse",
"length": 0,
"no_copy": 0,
"oldfieldname": "actual_qty",
"oldfieldtype": "Currency",
@@ -1060,6 +1153,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "References",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -1082,6 +1176,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Time Log Batch",
"length": 0,
"no_copy": 0,
"options": "Time Log Batch",
"permlevel": 0,
@@ -1104,6 +1199,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Sales Order",
"length": 0,
"no_copy": 1,
"oldfieldname": "sales_order",
"oldfieldtype": "Link",
@@ -1128,6 +1224,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Sales Order Item",
"length": 0,
"no_copy": 1,
"oldfieldname": "so_detail",
"oldfieldtype": "Data",
@@ -1150,6 +1247,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -1172,6 +1270,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Delivery Note",
"length": 0,
"no_copy": 1,
"oldfieldname": "delivery_note",
"oldfieldtype": "Link",
@@ -1196,6 +1295,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Delivery Note Item",
"length": 0,
"no_copy": 1,
"oldfieldname": "dn_detail",
"oldfieldtype": "Data",
@@ -1219,6 +1319,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Delivered Qty",
"length": 0,
"no_copy": 0,
"oldfieldname": "delivered_qty",
"oldfieldtype": "Currency",
@@ -1241,6 +1342,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -1263,6 +1365,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Page Break",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 1,
@@ -1282,7 +1385,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-19 03:04:52.093181",
"max_attachments": 0,
"modified": "2015-11-16 06:29:56.335017",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Invoice Item",

View File

@@ -18,7 +18,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Type",
"label": "Type",
"length": 0,
"no_copy": 0,
"oldfieldname": "charge_type",
"oldfieldtype": "Select",
@@ -44,6 +45,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Reference Row #",
"length": 0,
"no_copy": 0,
"oldfieldname": "row_id",
"oldfieldtype": "Data",
@@ -67,6 +69,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Account Head",
"length": 0,
"no_copy": 0,
"oldfieldname": "account_head",
"oldfieldtype": "Link",
@@ -92,6 +95,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Cost Center",
"length": 0,
"no_copy": 0,
"oldfieldname": "cost_center_other_charges",
"oldfieldtype": "Link",
@@ -115,6 +119,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -137,6 +142,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Description",
"length": 0,
"no_copy": 0,
"oldfieldname": "description",
"oldfieldtype": "Small Text",
@@ -163,6 +169,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Is this Tax included in Basic Rate?",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
@@ -185,6 +192,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -207,6 +215,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Rate",
"length": 0,
"no_copy": 0,
"oldfieldname": "rate",
"oldfieldtype": "Currency",
@@ -229,6 +238,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -251,6 +261,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Amount",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -274,6 +285,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -297,6 +309,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Tax Amount After Discount Amount",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -319,6 +332,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -341,6 +355,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Amount (Company Currency)",
"length": 0,
"no_copy": 0,
"oldfieldname": "tax_amount",
"oldfieldtype": "Currency",
@@ -365,6 +380,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total (Company Currency)",
"length": 0,
"no_copy": 0,
"oldfieldname": "total",
"oldfieldtype": "Currency",
@@ -390,6 +406,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Tax Amount After Discount Amount (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -412,6 +429,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Item Wise Tax Detail",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_wise_tax_detail",
"oldfieldtype": "Small Text",
@@ -435,6 +453,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Parenttype",
"length": 0,
"no_copy": 0,
"oldfieldname": "parenttype",
"oldfieldtype": "Data",
@@ -456,7 +475,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:39:11.977789",
"max_attachments": 0,
"modified": "2015-11-16 06:29:57.263576",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Taxes and Charges",

View File

@@ -21,6 +21,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Title",
"length": 0,
"no_copy": 1,
"oldfieldname": "title",
"oldfieldtype": "Data",
@@ -44,6 +45,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Default",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -65,6 +67,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Disabled",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -86,6 +89,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -107,6 +111,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Company",
"length": 0,
"no_copy": 0,
"oldfieldname": "company",
"oldfieldtype": "Link",
@@ -130,6 +135,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -152,6 +158,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Sales Taxes and Charges",
"length": 0,
"no_copy": 0,
"oldfieldname": "other_charges",
"oldfieldtype": "Table",
@@ -175,7 +182,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:39:12.157257",
"max_attachments": 0,
"modified": "2015-11-16 06:29:57.346680",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Sales Taxes and Charges Template",

View File

@@ -16,7 +16,7 @@ def valdiate_taxes_and_charges_template(doc):
if doc.is_default == 1:
frappe.db.sql("""update `tab{0}` set is_default = 0
where ifnull(is_default,0) = 1 and name != %s and company = %s""".format(doc.doctype),
where is_default = 1 and name != %s and company = %s""".format(doc.doctype),
(doc.name, doc.company))
for tax in doc.get("taxes"):

View File

@@ -21,6 +21,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Shipping Rule Label",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -42,6 +43,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Disabled",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -64,7 +66,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Calculate Based On",
"label": "Calculate Based On",
"length": 0,
"no_copy": 0,
"options": "Net Total\nNet Weight",
"permlevel": 0,
@@ -88,6 +91,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Shipping Rule Conditions",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -109,6 +113,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Shipping Rule Conditions",
"length": 0,
"no_copy": 0,
"options": "Shipping Rule Condition",
"permlevel": 0,
@@ -132,6 +137,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Valid for Countries",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -153,6 +159,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Worldwide Shipping",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -176,6 +183,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Valid for Countries",
"length": 0,
"no_copy": 0,
"options": "Shipping Rule Country",
"permlevel": 0,
@@ -199,6 +207,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -220,6 +229,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
@@ -241,6 +251,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -262,6 +273,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Shipping Account",
"length": 0,
"no_copy": 0,
"options": "Account",
"permlevel": 0,
@@ -284,6 +296,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Cost Center",
"length": 0,
"no_copy": 0,
"options": "Cost Center",
"permlevel": 0,
@@ -305,7 +318,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:39:12.778062",
"max_attachments": 0,
"modified": "2015-11-16 06:29:57.633071",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Shipping Rule",

View File

@@ -19,6 +19,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "From Value",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -40,6 +41,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "To Value",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -61,6 +63,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Shipping Amount",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -81,7 +84,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:39:12.974539",
"max_attachments": 0,
"modified": "2015-11-16 06:29:57.700694",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Shipping Rule Condition",

View File

@@ -19,6 +19,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Country",
"length": 0,
"no_copy": 0,
"options": "Country",
"permlevel": 0,
@@ -39,7 +40,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:39:13.035775",
"max_attachments": 0,
"modified": "2015-11-16 06:29:57.731755",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Shipping Rule Country",

View File

@@ -4,19 +4,26 @@
cur_frm.add_fetch("customer", "customer_group", "customer_group" );
cur_frm.add_fetch("supplier", "supplier_type", "supplier_type" );
cur_frm.toggle_reqd("sales_tax_template", cur_frm.doc.tax_type=="Sales");
cur_frm.toggle_reqd("purchase_tax_template", cur_frm.doc.tax_type=="Purchase");
frappe.ui.form.on("Tax Rule", "tax_type", function(frm) {
frm.toggle_reqd("sales_tax_template", frm.doc.tax_type=="Sales");
frm.toggle_reqd("purchase_tax_template", frm.doc.tax_type=="Purchase");
})
frappe.ui.form.on("Tax Rule", "onload", function(frm) {
if(frm.doc.__islocal){
if(frm.doc.__islocal) {
frm.set_value("use_for_shopping_cart", 1);
}
})
frappe.ui.form.on("Tax Rule", "refresh", function(frm) {
frappe.ui.form.trigger("Tax Rule", "tax_type");
})
frappe.ui.form.on("Tax Rule", "use_for_shopping_cart", function(frm) {
if(!frm.doc.use_for_shopping_cart && (frappe.get_list("Tax Rule", {"use_for_shopping_cart":1}).length == 0)){
frappe.model.get_value("Shopping Cart Settings", "Shopping Cart Settings", "enabled", function(docfield) {
if(!frm.doc.use_for_shopping_cart &&
(frappe.get_list("Tax Rule", {"use_for_shopping_cart":1}).length == 0)) {
frappe.model.get_value("Shopping Cart Settings", "Shopping Cart Settings",
"enabled", function(docfield) {
if(docfield.enabled){
frm.set_value("use_for_shopping_cart", 1);
frappe.throw(__("Shopping Cart is enabled"));

View File

@@ -20,7 +20,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Tax Type",
"label": "Tax Type",
"length": 0,
"no_copy": 0,
"options": "Sales\nPurchase",
"permlevel": 0,
@@ -44,6 +45,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Use for Shopping Cart",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -65,6 +67,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -88,6 +91,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Sales Tax Template",
"length": 0,
"no_copy": 0,
"options": "Sales Taxes and Charges Template",
"permlevel": 0,
@@ -112,6 +116,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Purchase Tax Template",
"length": 0,
"no_copy": 0,
"options": "Purchase Taxes and Charges Template",
"permlevel": 0,
@@ -135,6 +140,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Filters",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -158,6 +164,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Customer",
"length": 0,
"no_copy": 0,
"options": "Customer",
"permlevel": 0,
@@ -182,6 +189,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Supplier",
"length": 0,
"no_copy": 0,
"options": "Supplier",
"permlevel": 0,
@@ -205,6 +213,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Billing City",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -227,6 +236,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Billing State",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -249,6 +259,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Billing Country",
"length": 0,
"no_copy": 0,
"options": "Country",
"permlevel": 0,
@@ -271,6 +282,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -294,6 +306,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Customer Group",
"length": 0,
"no_copy": 0,
"options": "Customer Group",
"permlevel": 0,
@@ -318,6 +331,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Supplier Type",
"length": 0,
"no_copy": 0,
"options": "Supplier Type",
"permlevel": 0,
@@ -341,6 +355,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Shipping City",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -363,6 +378,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Shipping State",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -385,6 +401,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Shipping Country",
"length": 0,
"no_copy": 0,
"options": "Country",
"permlevel": 0,
@@ -408,6 +425,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Validity",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -430,6 +448,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "From Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -451,6 +470,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -473,6 +493,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "To Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -494,6 +515,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -517,6 +539,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Priority",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -538,6 +561,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -560,6 +584,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
@@ -580,7 +605,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:39:16.298546",
"max_attachments": 0,
"modified": "2015-11-16 06:29:59.201327",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Tax Rule",

View File

@@ -109,7 +109,8 @@ def get_party_details(party, party_type, args=None):
def get_tax_template(posting_date, args):
"""Get matching tax rule"""
args = frappe._dict(args)
conditions = []
conditions = ["""(from_date is null or from_date = '' or from_date <= '{0}')
and (to_date is null or to_date = '' or to_date >= '{0}')""".format(posting_date)]
for key, value in args.iteritems():
if key in "use_for_shopping_cart":
@@ -117,16 +118,16 @@ def get_tax_template(posting_date, args):
else:
conditions.append("ifnull({0}, '') in ('', '{1}')".format(key, frappe.db.escape(cstr(value))))
matching = frappe.db.sql("""select * from `tabTax Rule`
tax_rule = frappe.db.sql("""select * from `tabTax Rule`
where {0}""".format(" and ".join(conditions)), as_dict = True)
if not matching:
if not tax_rule:
return None
for rule in matching:
for rule in tax_rule:
rule.no_of_keys_matched = 0
for key in args:
if rule.get(key): rule.no_of_keys_matched += 1
rule = sorted(matching, lambda b, a: cmp(a.no_of_keys_matched, b.no_of_keys_matched) or cmp(a.priority, b.priority))[0]
rule = sorted(tax_rule, lambda b, a: cmp(a.no_of_keys_matched, b.no_of_keys_matched) or cmp(a.priority, b.priority))[0]
return rule.sales_tax_template or rule.purchase_tax_template

View File

@@ -27,25 +27,25 @@ def process_gl_map(gl_map, merge_entries=True):
gl_map = merge_similar_entries(gl_map)
for entry in gl_map:
# toggle debit, credit if negative entry
# toggle debit, credit if negative entry
if flt(entry.debit) < 0:
entry.credit = flt(entry.credit) - flt(entry.debit)
entry.debit = 0.0
if flt(entry.debit_in_account_currency) < 0:
entry.credit_in_account_currency = \
flt(entry.credit_in_account_currency) - flt(entry.debit_in_account_currency)
entry.debit_in_account_currency = 0.0
if flt(entry.credit) < 0:
entry.debit = flt(entry.debit) - flt(entry.credit)
entry.credit = 0.0
if flt(entry.credit_in_account_currency) < 0:
entry.debit_in_account_currency = \
flt(entry.debit_in_account_currency) - flt(entry.credit_in_account_currency)
entry.credit_in_account_currency = 0.0
return gl_map
def merge_similar_entries(gl_map):
@@ -81,7 +81,7 @@ def check_if_in_list(gle, gl_map):
def save_entries(gl_map, adv_adj, update_outstanding):
validate_account_for_auto_accounting_for_stock(gl_map)
round_off_debit_credit(gl_map)
for entry in gl_map:
make_entry(entry, adv_adj, update_outstanding)
# check against budget
@@ -99,7 +99,7 @@ def validate_account_for_auto_accounting_for_stock(gl_map):
if cint(frappe.db.get_single_value("Accounts Settings", "auto_accounting_for_stock")) \
and gl_map[0].voucher_type=="Journal Entry":
aii_accounts = [d[0] for d in frappe.db.sql("""select name from tabAccount
where account_type = 'Warehouse' and ifnull(warehouse, '')!=''""")]
where account_type = 'Warehouse' and (warehouse != '' and warehouse is not null)""")]
for entry in gl_map:
if entry.account in aii_accounts:
@@ -109,36 +109,36 @@ def validate_account_for_auto_accounting_for_stock(gl_map):
def round_off_debit_credit(gl_map):
precision = get_field_precision(frappe.get_meta("GL Entry").get_field("debit"),
currency=frappe.db.get_value("Company", gl_map[0].company, "default_currency", cache=True))
debit_credit_diff = 0.0
for entry in gl_map:
entry.debit = flt(entry.debit, precision)
entry.credit = flt(entry.credit, precision)
debit_credit_diff += entry.debit - entry.credit
debit_credit_diff = flt(debit_credit_diff, precision)
if abs(debit_credit_diff) >= (5.0 / (10**precision)):
frappe.throw(_("Debit and Credit not equal for {0} #{1}. Difference is {2}.")
.format(gl_map[0].voucher_type, gl_map[0].voucher_no, debit_credit_diff))
elif abs(debit_credit_diff) >= (1.0 / (10**precision)):
make_round_off_gle(gl_map, debit_credit_diff)
def make_round_off_gle(gl_map, debit_credit_diff):
round_off_account, round_off_cost_center = frappe.db.get_value("Company", gl_map[0].company,
round_off_account, round_off_cost_center = frappe.db.get_value("Company", gl_map[0].company,
["round_off_account", "round_off_cost_center"]) or [None, None]
if not round_off_account:
frappe.throw(_("Please mention Round Off Account in Company"))
if not round_off_cost_center:
frappe.throw(_("Please mention Round Off Cost Center in Company"))
round_off_gle = frappe._dict()
for k in ["voucher_type", "voucher_no", "company",
for k in ["voucher_type", "voucher_no", "company",
"posting_date", "remarks", "fiscal_year", "is_opening"]:
round_off_gle[k] = gl_map[0][k]
round_off_gle.update({
"account": round_off_account,
"debit": abs(debit_credit_diff) if debit_credit_diff < 0 else 0,
@@ -149,7 +149,7 @@ def make_round_off_gle(gl_map, debit_credit_diff):
"against_voucher_type": None,
"against_voucher": None
})
gl_map.append(round_off_gle)

View File

@@ -117,7 +117,7 @@ erpnext.AccountsChart = Class.extend({
}
},
{
condition: function(node) { return !node.root && node.expandable; },
condition: function(node) { return node.expandable; },
label: __("Add Child"),
click: function() {
me.make_new()
@@ -146,7 +146,7 @@ erpnext.AccountsChart = Class.extend({
label: __("Rename"),
click: function(node) {
frappe.model.rename_doc(me.ctype, node.label, function(new_name) {
node.reload();
node.reload_parent();
});
},
btnClass: "hidden-xs"
@@ -166,7 +166,10 @@ erpnext.AccountsChart = Class.extend({
var dr_or_cr = node.data.balance < 0 ? "Cr" : "Dr";
if (me.ctype == 'Account' && node.data && node.data.balance!==undefined) {
$('<span class="balance-area pull-right text-muted small">'
+ format_currency(Math.abs(node.data.balance), node.data.account_currency)
+ (node.data.balance_in_account_currency ?
(format_currency(Math.abs(node.data.balance_in_account_currency),
node.data.account_currency) + " / ") : "")
+ format_currency(Math.abs(node.data.balance), node.data.company_currency)
+ " " + dr_or_cr
+ '</span>').insertBefore(node.$ul);
}
@@ -208,14 +211,16 @@ erpnext.AccountsChart = Class.extend({
description: __("Name of new Account. Note: Please don't create accounts for Customers and Suppliers")},
{fieldtype:'Check', fieldname:'is_group', label:__('Is Group'),
description: __('Further accounts can be made under Groups, but entries can be made against non-Groups')},
{fieldtype:'Select', fieldname:'root_type', label:__('Root Type'),
options: ['Asset', 'Liability', 'Equity', 'Income', 'Expense'].join('\n'),
},
{fieldtype:'Select', fieldname:'account_type', label:__('Account Type'),
options: ['', 'Bank', 'Cash', 'Warehouse', 'Receivable', 'Payable',
'Equity', 'Cost of Goods Sold', 'Fixed Asset', 'Expense Account',
'Income Account', 'Tax', 'Chargeable', 'Temporary'].join('\n'),
options: ['', 'Bank', 'Cash', 'Warehouse', 'Tax', 'Chargeable'].join('\n'),
description: __("Optional. This setting will be used to filter in various transactions.") },
{fieldtype:'Float', fieldname:'tax_rate', label:__('Tax Rate')},
{fieldtype:'Link', fieldname:'warehouse', label:__('Warehouse'), options:"Warehouse"},
{fieldtype:'Link', fieldname:'account_currency', label:__('Currency'), options:"Currency"}
{fieldtype:'Link', fieldname:'account_currency', label:__('Currency'), options:"Currency",
description: __("Optional. Sets company's default currency, if not specified.")}
]
})
@@ -239,6 +244,9 @@ erpnext.AccountsChart = Class.extend({
$(fd.warehouse.wrapper).toggle(fd.account_type.get_value()==='Warehouse');
})
// root type if root
$(fd.root_type.wrapper).toggle(node.root);
// create
d.set_primary_action(__("Create New"), function() {
var btn = this;
@@ -254,6 +262,14 @@ erpnext.AccountsChart = Class.extend({
v.parent_account = node.label;
v.company = me.company;
if(node.root) {
v.is_root = true;
v.parent_account = null;
} else {
v.is_root = false;
v.root_type = null;
}
return frappe.call({
args: v,
method: 'erpnext.accounts.utils.add_ac',
@@ -262,7 +278,7 @@ erpnext.AccountsChart = Class.extend({
if(node.expanded) {
node.toggle_node();
}
node.reload();
node.load();
}
});
});
@@ -308,7 +324,7 @@ erpnext.AccountsChart = Class.extend({
if(node.expanded) {
node.toggle_node();
}
node.reload();
node.load();
}
});
});

View File

@@ -18,33 +18,40 @@ def get_companies():
def get_children():
args = frappe.local.form_dict
ctype, company = args['ctype'], args['comp']
fieldname = frappe.db.escape(ctype.lower().replace(' ','_'))
doctype = frappe.db.escape(ctype)
# root
if args['parent'] in ("Accounts", "Cost Centers"):
select_cond = ", root_type, report_type, account_currency" if ctype=="Account" else ""
fields = ", root_type, report_type, account_currency" if ctype=="Account" else ""
acc = frappe.db.sql(""" select
name as value, is_group as expandable %s
from `tab%s`
where ifnull(parent_%s,'') = ''
name as value, is_group as expandable {fields}
from `tab{doctype}`
where ifnull(`parent_{fieldname}`,'') = ''
and `company` = %s and docstatus<2
order by name""" % (select_cond, ctype, ctype.lower().replace(' ','_'), '%s'),
order by name""".format(fields=fields, fieldname = fieldname, doctype=doctype),
company, as_dict=1)
if args["parent"]=="Accounts":
sort_root_accounts(acc)
else:
# other
select_cond = ", account_currency" if ctype=="Account" else ""
fields = ", account_currency" if ctype=="Account" else ""
acc = frappe.db.sql("""select
name as value, is_group as expandable %s
from `tab%s`
where ifnull(parent_%s,'') = %s
name as value, is_group as expandable, parent_{fieldname} as parent {fields}
from `tab{doctype}`
where ifnull(`parent_{fieldname}`,'') = %s
and docstatus<2
order by name""" % (select_cond, ctype, ctype.lower().replace(' ','_'), '%s'),
order by name""".format(fields=fields, fieldname=fieldname, doctype=doctype),
args['parent'], as_dict=1)
if ctype == 'Account':
company_currency = frappe.db.get_value("Company", company, "default_currency")
for each in acc:
each["balance"] = flt(get_balance_on(each.get("value")))
each["company_currency"] = company_currency
each["balance"] = flt(get_balance_on(each.get("value"), in_account_currency=False))
if each.account_currency != company_currency:
each["balance_in_account_currency"] = flt(get_balance_on(each.get("value")))
return acc

View File

@@ -35,7 +35,7 @@ def _get_party_details(party=None, account=None, party_type="Customer", company=
party = out[party_type.lower()]
if not ignore_permissions and not frappe.has_permission(party_type, "read", party):
frappe.throw(_("Not permitted"), frappe.PermissionError)
frappe.throw(_("Not permitted for {0}").format(party), frappe.PermissionError)
party = frappe.get_doc(party_type, party)
@@ -201,11 +201,14 @@ def get_party_gle_currency(party_type, party, company):
return existing_gle_currency[0][0] if existing_gle_currency else None
return frappe.local_cache("party_gle_currency", (party_type, party, company), generator)
return frappe.local_cache("party_gle_currency", (party_type, party, company), generator,
regenerate_if_none=True)
def validate_party_gle_currency(party_type, party, company):
def validate_party_gle_currency(party_type, party, company, party_account_currency=None):
"""Validate party account currency with existing GL Entry's currency"""
party_account_currency = get_party_account_currency(party_type, party, company)
if not party_account_currency:
party_account_currency = get_party_account_currency(party_type, party, company)
existing_gle_currency = get_party_gle_currency(party_type, party, company)
if existing_gle_currency and party_account_currency != existing_gle_currency:
@@ -221,10 +224,10 @@ def validate_party_accounts(doc):
.format(doc.doctype, doc.name), DuplicatePartyAccountError)
else:
companies.append(account.company)
party_account_currency = frappe.db.get_value("Account", account.account, "account_currency")
existing_gle_currency = get_party_gle_currency(doc.doctype, doc.name, account.company)
if existing_gle_currency and party_account_currency != existing_gle_currency:
frappe.throw(_("Accounting entries have already been made in currency {0} for company {1}. Please select a receivable or payable account with currency {0}.").format(existing_gle_currency, account.company))

View File

@@ -0,0 +1,30 @@
{%- from "templates/print_formats/standard_macros.html" import add_header -%}
<div class="page-break">
{%- if not doc.get("print_heading") and not doc.get("select_print_heading")
and doc.set("select_print_heading", _("Payment Receipt Note")) -%}{%- endif -%}
{{ add_header(0, 1, doc, letter_head, no_letterhead) }}
{%- for label, value in (
(_("Received On"), frappe.utils.formatdate(doc.voucher_date)),
(_("Received From"), doc.pay_to_recd_from),
(_("Amount"), "<strong>" + doc.get_formatted("total_amount") + "</strong><br>" + (doc.total_amount_in_words or "") + "<br>"),
(_("Remarks"), doc.remark)
) -%}
<div class="row">
<div class="col-xs-3"><label class="text-right">{{ label }}</label></div>
<div class="col-xs-9">{{ value }}</div>
</div>
{%- endfor -%}
<hr>
<br>
<p class="strong">
{{ _("For") }} {{ doc.company }},<br>
<br>
<br>
<br>
{{ _("Authorized Signatory") }}
</p>
</div>

View File

@@ -1,15 +1,17 @@
{
"creation": "2012-05-01 12:46:31",
"doc_type": "Journal Entry",
"docstatus": 0,
"doctype": "Print Format",
"html": "{%- from \"templates/print_formats/standard_macros.html\" import add_header -%}\n<div class=\"page-break\">\n {%- if not doc.get(\"print_heading\") and not doc.get(\"select_print_heading\") \n and doc.set(\"select_print_heading\", _(\"Payment Receipt Note\")) -%}{%- endif -%}\n {{ add_header(0, 1, doc, letter_head, no_letterhead) }}\n\n {%- for label, value in (\n (_(\"Received On\"), frappe.utils.formatdate(doc.voucher_date)),\n (_(\"Received From\"), doc.pay_to_recd_from),\n (_(\"Amount\"), \"<strong>\" + doc.get_formatted(\"total_amount\") + \"</strong><br>\" + (doc.total_amount_in_words or \"\") + \"<br>\"),\n (_(\"Remarks\"), doc.remark)\n ) -%}\n <div class=\"row\">\n <div class=\"col-xs-3\"><label class=\"text-right\">{{ label }}</label></div>\n <div class=\"col-xs-9\">{{ value }}</div>\n </div>\n\n {%- endfor -%}\n\n <hr>\n <br>\n <p class=\"strong\">\n {{ _(\"For\") }} {{ doc.company }},<br>\n <br>\n <br>\n <br>\n {{ _(\"Authorized Signatory\") }}\n </p>\n</div>\n\n",
"idx": 1,
"modified": "2015-01-16 11:03:22.893209",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Payment Receipt Voucher",
"owner": "Administrator",
"print_format_type": "Server",
"creation": "2012-05-01 12:46:31",
"custom_format": 0,
"disabled": 0,
"doc_type": "Journal Entry",
"docstatus": 0,
"doctype": "Print Format",
"html": "",
"idx": 1,
"modified": "2015-11-25 07:06:00.668141",
"modified_by": "Administrator",
"name": "Payment Receipt Voucher",
"owner": "Administrator",
"print_format_builder": 0,
"print_format_type": "Server",
"standard": "Yes"
}
}

View File

@@ -24,7 +24,7 @@ class ReceivablePayableReport(object):
if party_naming_by == "Naming Series":
columns += [args.get("party_type") + " Name::110"]
columns += [_("Voucher Type") + "::110", _("Voucher No") + ":Dynamic Link/Voucher Type:120",
columns += [_("Voucher Type") + "::110", _("Voucher No") + ":Dynamic Link/"+_("Voucher Type")+":120",
_("Due Date") + ":Date:80"]
if args.get("party_type") == "Supplier":
@@ -216,7 +216,7 @@ class ReceivablePayableReport(object):
self.gl_entries = frappe.db.sql("""select name, posting_date, account, party_type, party,
voucher_type, voucher_no, against_voucher_type, against_voucher, account_currency, remarks, {0}
from `tabGL Entry`
where docstatus < 2 and party_type=%s and ifnull(party, '') != '' {1}
where docstatus < 2 and party_type=%s and (party is not null and party != '') {1}
order by posting_date, party"""
.format(select_fields, conditions), values, as_dict=True)

View File

@@ -2,7 +2,7 @@
{%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %}
</div>
<h2 class="text-center">{%= __("Bank Reconciliation Statement") %}</h2>
<h4 class="text-center">{%= filters.account && (filters.account + ", ") || "" %} {%= filters.company %}</h4>
<h4 class="text-center">{%= filters.account %}</h4>
<hr>
<table class="table table-bordered">
<thead>
@@ -16,31 +16,31 @@
</thead>
<tbody>
{% for(var i=0, l=data.length; i<l; i++) { %}
{% if (data[i][__("Posting Date")]) { %}
{% if (data[i]["posting_date"]) { %}
<tr>
<td>{%= dateutil.str_to_user(data[i][__("Posting Date")]) %}</td>
<td>{%= data[i][__("Journal Entry")] %}</td>
<td>{%= __("Against") %}: {%= data[i][__("Against Account")] %}
{% if (data[i][__("Reference")]) { %}
<br>{%= __("Reference") %}: {%= data[i][__("Reference")] %}
{% if (data[i][__("Ref Date")]) { %}
<br>{%= __("Reference Date") %}: {%= dateutil.str_to_user(data[i][__("Ref Date")]) %}
<td>{%= dateutil.str_to_user(data[i]["posting_date"]) %}</td>
<td>{%= data[i]["journal_entry"] %}</td>
<td>{%= __("Against") %}: {%= data[i]["against_account"] %}
{% if (data[i]["reference"]) { %}
<br>{%= __("Reference") %}: {%= data[i]["reference"] %}
{% if (data[i]["ref_date"]) { %}
<br>{%= __("Reference Date") %}: {%= dateutil.str_to_user(data[i]["ref_date"]) %}
{% } %}
{% } %}
{% if (data[i][__("Clearance Date")]) { %}
<br>{%= __("Clearance Date") %}: {%= dateutil.str_to_user(data[i][__("Clearance Date")]) %}
{% if (data[i]["clearance_date"]) { %}
<br>{%= __("Clearance Date") %}: {%= dateutil.str_to_user(data[i]["clearance_date"]) %}
{% } %}
</td>
<td style="text-align: right">{%= format_currency(data[i][__("Debit")]) %}</td>
<td style="text-align: right">{%= format_currency(data[i][__("Credit")]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["debit"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["credit"]) %}</td>
</tr>
{% } else { %}
<tr>
<td></td>
<td></td>
<td>{%= data[i][__("Journal Entry")] %}</td>
<td style="text-align: right">{%= format_currency(data[i][__("Debit")]) %}</td>
<td style="text-align: right">{%= format_currency(data[i][__("Credit")]) %}</td>
<td>{%= data[i]["journal_entry"] %}</td>
<td style="text-align: right">{%= format_currency(data[i]["debit"]) %}</td>
<td style="text-align: right">{%= format_currency(data[i]["credit"]) %}</td>
</tr>
{% } %}
{% } %}

View File

@@ -12,19 +12,21 @@ def execute(filters=None):
columns = get_columns()
if not filters.get("account"): return columns, []
account_currency = frappe.db.get_value("Account", filters.account, "account_currency")
data = get_entries(filters)
from erpnext.accounts.utils import get_balance_on
balance_as_per_system = get_balance_on(filters["account"], filters["report_date"])
total_debit, total_credit = 0,0
for d in data:
total_debit += flt(d[2])
total_credit += flt(d[3])
total_debit += flt(d.debit)
total_credit += flt(d.credit)
amounts_not_reflected_in_system = frappe.db.sql("""
select sum(ifnull(jvd.debit_in_account_currency, 0) - ifnull(jvd.credit_in_account_currency, 0))
select sum(jvd.debit_in_account_currency - jvd.credit_in_account_currency)
from `tabJournal Entry Account` jvd, `tabJournal Entry` jv
where jvd.parent = jv.name and jv.docstatus=1 and jvd.account=%s
and jv.posting_date > %s and jv.clearance_date <= %s and ifnull(jv.is_opening, 'No') = 'No'
@@ -37,39 +39,112 @@ def execute(filters=None):
+ amounts_not_reflected_in_system
data += [
get_balance_row(_("System Balance"), balance_as_per_system),
[""]*len(columns),
["", '"' + _("Amounts not reflected in bank") + '"', total_debit, total_credit, "", "", "", "", ""],
get_balance_row(_("Amounts not reflected in system"), amounts_not_reflected_in_system),
[""]*len(columns),
get_balance_row(_("Expected balance as per bank"), bank_bal)
get_balance_row(_("System Balance"), balance_as_per_system, account_currency),
{},
{
"journal_entry": '"' + _("Amounts not reflected in bank") + '"',
"debit": total_debit,
"credit": total_credit,
"account_currency": account_currency
},
get_balance_row(_("Amounts not reflected in system"), amounts_not_reflected_in_system,
account_currency),
{},
get_balance_row(_("Expected balance as per bank"), bank_bal, account_currency)
]
return columns, data
def get_columns():
return [_("Posting Date") + ":Date:100", _("Journal Entry") + ":Link/Journal Entry:220",
_("Debit") + ":Currency:120", _("Credit") + ":Currency:120",
_("Against Account") + ":Link/Account:200", _("Reference") + "::100",
_("Ref Date") + ":Date:110", _("Clearance Date") + ":Date:110", _("Currency") + ":Link/Currency:70"
return [
{
"fieldname": "posting_date",
"label": _("Posting Date"),
"fieldtype": "Date",
"width": 100
},
{
"fieldname": "journal_entry",
"label": _("Journal Entry"),
"fieldtype": "Link",
"options": "Journal Entry",
"width": 220
},
{
"fieldname": "debit",
"label": _("Debit"),
"fieldtype": "Currency",
"options": "account_currency",
"width": 120
},
{
"fieldname": "credit",
"label": _("Credit"),
"fieldtype": "Currency",
"options": "account_currency",
"width": 120
},
{
"fieldname": "against_account",
"label": _("Against Account"),
"fieldtype": "Link",
"options": "Account",
"width": 200
},
{
"fieldname": "reference",
"label": _("Reference"),
"fieldtype": "Data",
"width": 100
},
{
"fieldname": "ref_date",
"label": _("Ref Date"),
"fieldtype": "Date",
"width": 110
},
{
"fieldname": "clearance_date",
"label": _("Clearance Date"),
"fieldtype": "Date",
"width": 110
},
{
"fieldname": "account_currency",
"label": _("Currency"),
"fieldtype": "Link",
"options": "Currency",
"width": 100
}
]
def get_entries(filters):
entries = frappe.db.sql("""select
jv.posting_date, jv.name, jvd.debit_in_account_currency, jvd.credit_in_account_currency,
jvd.against_account, jv.cheque_no, jv.cheque_date, jv.clearance_date, jvd.account_currency
jv.posting_date, jv.name as journal_entry, jvd.debit_in_account_currency as debit,
jvd.credit_in_account_currency as credit, jvd.against_account,
jv.cheque_no as reference, jv.cheque_date as ref_date, jv.clearance_date, jvd.account_currency
from
`tabJournal Entry Account` jvd, `tabJournal Entry` jv
where jvd.parent = jv.name and jv.docstatus=1
and jvd.account = %(account)s and jv.posting_date <= %(report_date)s
and ifnull(jv.clearance_date, '4000-01-01') > %(report_date)s
and ifnull(jv.is_opening, 'No') = 'No'
order by jv.name DESC""", filters, as_list=1)
order by jv.name DESC""", filters, as_dict=1)
return entries
def get_balance_row(label, amount):
def get_balance_row(label, amount, account_currency):
if amount > 0:
return ["", '"' + label + '"', amount, 0, "", "", "", "", ""]
return {
"journal_entry": '"' + label + '"',
"debit": amount,
"credit": 0,
"account_currency": account_currency
}
else:
return ["", '"' + label + '"', 0, abs(amount), "", "", "", "", ""]
return {
"journal_entry": '"' + label + '"',
"debit": 0,
"credit": abs(amount),
"account_currency": account_currency
}

View File

@@ -1,16 +1,18 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-07-30 17:28:49",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2015-03-30 05:33:45.353064",
"modified": "2015-11-02 12:32:02.048551",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Delivered Items To Be Billed",
"owner": "Administrator",
"query": "select\n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project_name` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabDelivery Note Item`.`qty` - ifnull((select sum(qty) from `tabSales Invoice Item` \n\t where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n\t `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Qty:Float:110\",\n\t(`tabDelivery Note Item`.`base_amount` - ifnull((select sum(base_amount) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\",\n\t`tabDelivery Note`.`company` as \"Company:Link/Company:\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n `tabDelivery Note`.docstatus = 1 and\n\t`tabDelivery Note`.`status` != \"Stopped\" and\n `tabDelivery Note`.name = `tabDelivery Note Item`.parent and\n (`tabDelivery Note Item`.qty > ifnull((select sum(qty) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\norder by `tabDelivery Note`.`name` desc",
"query": "select\n `tabDelivery Note`.`name` as \"Delivery Note:Link/Delivery Note:120\",\n\t`tabDelivery Note`.`customer` as \"Customer:Link/Customer:120\",\n\t`tabDelivery Note`.`posting_date` as \"Date:Date\",\n\t`tabDelivery Note`.`project_name` as \"Project\",\n\t`tabDelivery Note Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabDelivery Note Item`.`qty` - ifnull((select sum(qty) from `tabSales Invoice Item` \n\t where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n\t `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Qty:Float:110\",\n\t(`tabDelivery Note Item`.`base_amount` - ifnull((select sum(base_amount) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\n\t\tas \"Amount:Currency:110\",\n\t`tabDelivery Note Item`.`item_name` as \"Item Name::150\",\n\t`tabDelivery Note Item`.`description` as \"Description::200\",\n\t`tabDelivery Note`.`company` as \"Company:Link/Company:\"\nfrom `tabDelivery Note`, `tabDelivery Note Item`\nwhere\n `tabDelivery Note`.docstatus = 1 and\n\t`tabDelivery Note`.`status` not in (\"Stopped\", \"Closed\") and\n `tabDelivery Note`.name = `tabDelivery Note Item`.parent and\n (`tabDelivery Note Item`.qty > ifnull((select sum(qty) from `tabSales Invoice Item` \n where `tabSales Invoice Item`.docstatus=1 and \n `tabSales Invoice Item`.delivery_note = `tabDelivery Note`.name and\n `tabSales Invoice Item`.dn_detail = `tabDelivery Note Item`.name), 0))\norder by `tabDelivery Note`.`name` desc",
"ref_doctype": "Sales Invoice",
"report_name": "Delivered Items To Be Billed",
"report_type": "Query Report"

View File

@@ -80,8 +80,13 @@ def get_data(company, root_type, balance_must_be, period_list, ignore_closing_en
return None
accounts, accounts_by_name = filter_accounts(accounts)
gl_entries_by_account = get_gl_entries(company, period_list[0]["from_date"], period_list[-1]["to_date"],
accounts[0].lft, accounts[0].rgt, ignore_closing_entries=ignore_closing_entries)
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)
calculate_values(accounts_by_name, gl_entries_by_account, period_list)
accumulate_values_into_parents(accounts, accounts_by_name, period_list)
@@ -101,7 +106,6 @@ def calculate_values(accounts_by_name, gl_entries_by_account, period_list):
if entry.posting_date <= period.to_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):
"""accumulate children's values in parent accounts"""
for d in reversed(accounts):
@@ -143,15 +147,20 @@ def prepare_data(accounts, balance_must_be, period_list):
return out
def add_total_row(out, balance_must_be, period_list):
row = {
total_row = {
"account_name": "'" + _("Total ({0})").format(balance_must_be) + "'",
"account": None
}
for period in period_list:
row[period.key] = out[0].get(period.key, 0.0)
out[0][period.key] = ""
out.append(row)
for row in out:
if not 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)
row[period.key] = ""
out.append(total_row)
# blank row after Total
out.append({})
@@ -200,7 +209,8 @@ def sort_root_accounts(roots):
roots.sort(compare_roots)
def get_gl_entries(company, from_date, to_date, root_lft, root_rgt, ignore_closing_entries=False):
def set_gl_entries_by_account(company, from_date, to_date, root_lft, root_rgt, gl_entries_by_account,
ignore_closing_entries=False):
"""Returns a dict like { "account": [gl entries], ... }"""
additional_conditions = []
@@ -226,7 +236,6 @@ def get_gl_entries(company, from_date, to_date, root_lft, root_rgt, ignore_closi
},
as_dict=True)
gl_entries_by_account = {}
for entry in gl_entries:
gl_entries_by_account.setdefault(entry.account, []).append(entry)

View File

@@ -85,7 +85,7 @@ def get_columns(filters):
]
columns += [
_("Voucher Type") + "::120", _("Voucher No") + ":Dynamic Link/Voucher Type:160",
_("Voucher Type") + "::120", _("Voucher No") + ":Dynamic Link/"+_("Voucher Type")+":160",
_("Against Account") + "::120", _("Party Type") + "::80", _("Party") + "::150",
_("Cost Center") + ":Link/Cost Center:100", _("Remarks") + "::400"
]
@@ -102,15 +102,15 @@ def get_result(filters, account_details):
return result
def get_gl_entries(filters):
select_fields = """, sum(ifnull(debit_in_account_currency, 0)) as debit_in_account_currency,
sum(ifnull(credit_in_account_currency, 0)) as credit_in_account_currency""" \
select_fields = """, sum(debit_in_account_currency) as debit_in_account_currency,
sum(credit_in_account_currency) as credit_in_account_currency""" \
if filters.get("show_in_account_currency") else ""
group_by_condition = "group by voucher_type, voucher_no, account, cost_center" \
if filters.get("group_by_voucher") else "group by name"
gl_entries = frappe.db.sql("""select posting_date, account, party_type, party,
sum(ifnull(debit, 0)) as debit, sum(ifnull(credit, 0)) as credit,
sum(debit) as debit, sum(credit) as credit,
voucher_type, voucher_no, cost_center, remarks, against, is_opening {select_fields}
from `tabGL Entry`
where company=%(company)s {conditions}
@@ -178,7 +178,8 @@ def get_data_with_opening_closing(filters, account_details, gl_entries):
else:
for gl in gl_entries:
if gl.posting_date >= getdate(filters.from_date) and gl.posting_date <= getdate(filters.to_date):
if gl.posting_date >= getdate(filters.from_date) and gl.posting_date <= getdate(filters.to_date) \
and gl.is_opening == "No":
data.append(gl)

View File

@@ -98,11 +98,18 @@ class GrossProfitGenerator(object):
row.base_amount = flt(row.base_net_amount)
product_bundles = self.product_bundles.get(row.parenttype, {}).get(row.parent, frappe._dict())
product_bundles = []
if row.update_stock:
product_bundles = self.product_bundles.get(row.parenttype, {}).get(row.parent, frappe._dict())
elif row.dn_detail:
product_bundles = self.product_bundles.get("Delivery Note", {})\
.get(row.delivery_note, frappe._dict())
row.item_row = row.dn_detail
# get buying amount
if row.item_code in product_bundles:
row.buying_amount = self.get_buying_amount_from_product_bundle(row, product_bundles[row.item_code])
row.buying_amount = self.get_buying_amount_from_product_bundle(row,
product_bundles[row.item_code])
else:
row.buying_amount = self.get_buying_amount(row, row.item_code)
@@ -142,7 +149,6 @@ class GrossProfitGenerator(object):
new_row.qty += row.qty
new_row.buying_amount += row.buying_amount
new_row.base_amount += row.base_amount
# new_row.allocated_amount += (row.allocated_amount or 0) if new_row.allocated_amount else 0
new_row.gross_profit = new_row.base_amount - new_row.buying_amount
new_row.gross_profit_percent = ((new_row.gross_profit / new_row.base_amount) * 100.0) \
@@ -158,9 +164,9 @@ class GrossProfitGenerator(object):
def get_buying_amount_from_product_bundle(self, row, product_bundle):
buying_amount = 0.0
for bom_item in product_bundle:
if bom_item.get("parent_detail_docname")==row.item_row:
buying_amount += self.get_buying_amount(row, bom_item.item_code)
for packed_item in product_bundle:
if packed_item.get("parent_detail_docname")==row.item_row:
buying_amount += self.get_buying_amount(row, packed_item.item_code)
return buying_amount
@@ -176,14 +182,14 @@ class GrossProfitGenerator(object):
else:
my_sle = self.sle.get((item_code, row.warehouse))
if (row.update_stock or row.dn_detail) and my_sle:
parenttype, parent, item_row = row.parenttype, row.parent, row.item_row
parenttype, parent = row.parenttype, row.parent
if row.dn_detail:
parenttype, parent, item_row = "Delivery Note", row.delivery_note, row.dn_detail
parenttype, parent = "Delivery Note", row.delivery_note
for i, sle in enumerate(my_sle):
# find the stock valution rate from stock ledger entry
if sle.voucher_type == parenttype and parent == sle.voucher_no and \
sle.voucher_detail_no == item_row:
sle.voucher_detail_no == row.item_row:
previous_stock_value = len(my_sle) > i+1 and \
flt(my_sle[i+1].stock_value) or 0.0
return previous_stock_value - flt(sle.stock_value)
@@ -202,7 +208,7 @@ class GrossProfitGenerator(object):
else:
self.average_buying_rate[item_code] = flt(frappe.db.sql("""select avg(valuation_rate)
from `tabStock Ledger Entry`
where item_code = %s and ifnull(qty_after_transaction,0) > 0""", item_code)[0][0])
where item_code = %s and qty_after_transaction > 0""", item_code)[0][0])
return self.average_buying_rate[item_code]

View File

@@ -88,7 +88,7 @@ def get_tax_accounts(item_list, columns):
tax_details = frappe.db.sql("""select parent, account_head, item_wise_tax_detail, charge_type, base_tax_amount_after_discount_amount
from `tabPurchase Taxes and Charges` where parenttype = 'Purchase Invoice'
and docstatus = 1 and ifnull(account_head, '') != '' and category in ('Total', 'Valuation and Total')
and docstatus = 1 and (account_head is not null and account_head != '') and category in ('Total', 'Valuation and Total')
and parent in (%s)""" % ', '.join(['%s']*len(invoice_wise_items)), tuple(invoice_wise_items.keys()))
for parent, account_head, item_wise_tax_detail, charge_type, tax_amount in tax_details:

View File

@@ -86,7 +86,7 @@ def get_tax_accounts(item_list, columns):
tax_details = frappe.db.sql("""select parent, account_head, item_wise_tax_detail,
charge_type, base_tax_amount_after_discount_amount
from `tabSales Taxes and Charges` where parenttype = 'Sales Invoice'
and docstatus = 1 and ifnull(account_head, '') != ''
and docstatus = 1 and (account_head is not null and account_head != '')
and parent in (%s)""" % ', '.join(['%s']*len(invoice_wise_items)),
tuple(invoice_wise_items.keys()))

View File

@@ -1,16 +1,18 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-02-21 14:26:44",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2015-03-30 05:33:29.382709",
"modified": "2015-11-04 11:56:32.699103",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Ordered Items To Be Billed",
"owner": "Administrator",
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project_name` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.base_amount as \"Amount:Currency:110\",\n (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (ifnull(`tabSales Order Item`.base_amount, 0) - (ifnull(`tabSales Order Item`.billed_amt, 0) * ifnull(`tabSales Order`.conversion_rate, 1))) as \"Pending Amount:Currency:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\",\n `tabSales Order`.`company` as \"Company:Link/Company:\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status != \"Stopped\"\n and ifnull(`tabSales Order Item`.billed_amt,0) < ifnull(`tabSales Order Item`.amount,0)\norder by `tabSales Order`.transaction_date asc",
"query": "select \n `tabSales Order`.`name` as \"Sales Order:Link/Sales Order:120\",\n `tabSales Order`.`customer` as \"Customer:Link/Customer:120\",\n `tabSales Order`.`status` as \"Status\",\n `tabSales Order`.`transaction_date` as \"Date:Date\",\n `tabSales Order`.`project_name` as \"Project\",\n `tabSales Order Item`.item_code as \"Item:Link/Item:120\",\n `tabSales Order Item`.base_amount as \"Amount:Currency:110\",\n (`tabSales Order Item`.billed_amt * ifnull(`tabSales Order`.conversion_rate, 1)) as \"Billed Amount:Currency:110\",\n (ifnull(`tabSales Order Item`.base_amount, 0) - (ifnull(`tabSales Order Item`.billed_amt, 0) * ifnull(`tabSales Order`.conversion_rate, 1))) as \"Pending Amount:Currency:120\",\n `tabSales Order Item`.item_name as \"Item Name::150\",\n `tabSales Order Item`.description as \"Description::200\",\n `tabSales Order`.`company` as \"Company:Link/Company:\"\nfrom\n `tabSales Order`, `tabSales Order Item`\nwhere\n `tabSales Order Item`.`parent` = `tabSales Order`.`name`\n and `tabSales Order`.docstatus = 1\n and `tabSales Order`.status not in (\"Stopped\", \"Closed\")\n and ifnull(`tabSales Order Item`.billed_amt,0) < ifnull(`tabSales Order Item`.amount,0)\norder by `tabSales Order`.transaction_date asc",
"ref_doctype": "Sales Invoice",
"report_name": "Ordered Items To Be Billed",
"report_type": "Query Report"

View File

@@ -5,7 +5,7 @@ from __future__ import unicode_literals
import frappe
from frappe import _
from erpnext.accounts.report.accounts_receivable.accounts_receivable import get_ageing_data
from frappe.utils import flt
from frappe.utils import flt, getdate
def execute(filters=None):
if not filters: filters = {}
@@ -13,25 +13,27 @@ def execute(filters=None):
columns = get_columns(filters)
entries = get_entries(filters)
invoice_posting_date_map = get_invoice_posting_date_map(filters)
invoice_details = get_invoice_posting_date_map(filters)
against_date = ""
data = []
for d in entries:
against_date = invoice_posting_date_map.get(d.reference_name) or ""
invoice = invoice_details.get(d.reference_name) or frappe._dict()
if d.reference_type=="Purchase Invoice":
payment_amount = flt(d.debit) or -1 * flt(d.credit)
else:
payment_amount = flt(d.credit) or -1 * flt(d.debit)
row = [d.name, d.party_type, d.party, d.posting_date, d.reference_name,
against_date, d.debit, d.credit, d.cheque_no, d.cheque_date, d.remark]
row = [d.name, d.party_type, d.party, d.posting_date, d.reference_name, invoice.posting_date,
invoice.due_date, d.debit, d.credit, d.cheque_no, d.cheque_date, d.remark]
if d.reference_name:
row += get_ageing_data(30, 60, 90, d.posting_date, against_date, payment_amount)
else:
row += ["", "", "", "", ""]
if invoice.due_date:
row.append((getdate(d.posting_date) - getdate(invoice.due_date)).days or 0)
data.append(row)
return columns, data
@@ -43,13 +45,25 @@ def validate_filters(filters):
.format(filters.payment_type, filters.party_type))
def get_columns(filters):
return [_("Journal Entry") + ":Link/Journal Entry:140",
_("Party Type") + "::100", _("Party") + ":Dynamic Link/Party Type:140",
return [
_("Journal Entry") + ":Link/Journal Entry:140",
_("Party Type") + "::100",
_("Party") + ":Dynamic Link/Party Type:140",
_("Posting Date") + ":Date:100",
_("Against Invoice") + (":Link/Purchase Invoice:130" if filters.get("payment_type") == "Outgoing" else ":Link/Sales Invoice:130"),
_("Against Invoice Posting Date") + ":Date:130", _("Debit") + ":Currency:120", _("Credit") + ":Currency:120",
_("Reference No") + "::100", _("Reference Date") + ":Date:100", _("Remarks") + "::150", _("Age") +":Int:40",
"0-30:Currency:100", "30-60:Currency:100", "60-90:Currency:100", _("90-Above") + ":Currency:100"
_("Invoice") + (":Link/Purchase Invoice:130" if filters.get("payment_type") == "Outgoing" else ":Link/Sales Invoice:130"),
_("Invoice Posting Date") + ":Date:130",
_("Payment Due Date") + ":Date:130",
_("Debit") + ":Currency:120",
_("Credit") + ":Currency:120",
_("Reference No") + "::100",
_("Reference Date") + ":Date:100",
_("Remarks") + "::150",
_("Age") +":Int:40",
"0-30:Currency:100",
"30-60:Currency:100",
"60-90:Currency:100",
_("90-Above") + ":Currency:100",
_("Delay in payment (Days)") + "::150"
]
def get_conditions(filters):
@@ -66,7 +80,14 @@ def get_conditions(filters):
if filters.get("party"):
conditions.append("jvd.party=%(party)s")
if filters.get("party_type"):
conditions.append("jvd.reference_type=%(reference_type)s")
if filters.get("party_type") == "Customer":
filters["reference_type"] = "Sales Invoice"
else:
filters["reference_type"] = "Purchase Invoice"
if filters.get("company"):
conditions.append("jv.company=%(company)s")
@@ -89,12 +110,9 @@ def get_entries(filters):
return entries
def get_invoice_posting_date_map(filters):
invoice_posting_date_map = {}
if filters.get("payment_type") == "Incoming":
for t in frappe.db.sql("""select name, posting_date from `tabSales Invoice`"""):
invoice_posting_date_map[t[0]] = t[1]
else:
for t in frappe.db.sql("""select name, posting_date from `tabPurchase Invoice`"""):
invoice_posting_date_map[t[0]] = t[1]
invoice_details = {}
dt = "Sales Invoice" if filters.get("payment_type") == "Incoming" else "Purchase Invoice"
for t in frappe.db.sql("select name, posting_date, due_date from `tab{0}`".format(dt), as_dict=1):
invoice_details[t.name] = t
return invoice_posting_date_map
return invoice_details

View File

@@ -2,16 +2,17 @@
"add_total_row": 1,
"apply_user_permissions": 1,
"creation": "2013-05-28 15:54:16",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2015-03-30 05:37:23.626083",
"modified": "2015-11-04 11:56:14.321664",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Purchase Order Items To Be Billed",
"owner": "Administrator",
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n `tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project_name` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.base_amount as \"Amount:Currency:100\",\n\t(`tabPurchase Order Item`.billed_amt * ifnull(`tabPurchase Order`.conversion_rate, 1)) as \"Billed Amount:Currency:100\", \n\t(`tabPurchase Order Item`.base_amount - (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1))) as \"Amount to Bill:Currency:100\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n\t`tabPurchase Order`.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status != \"Stopped\"\n\tand (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1)) < ifnull(`tabPurchase Order Item`.base_amount, 0)\norder by `tabPurchase Order`.transaction_date asc",
"query": "select \n `tabPurchase Order`.`name` as \"Purchase Order:Link/Purchase Order:120\",\n `tabPurchase Order`.`transaction_date` as \"Date:Date:100\",\n\t`tabPurchase Order`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Order Item`.`project_name` as \"Project\",\n\t`tabPurchase Order Item`.item_code as \"Item Code:Link/Item:120\",\n\t`tabPurchase Order Item`.base_amount as \"Amount:Currency:100\",\n\t(`tabPurchase Order Item`.billed_amt * ifnull(`tabPurchase Order`.conversion_rate, 1)) as \"Billed Amount:Currency:100\", \n\t(`tabPurchase Order Item`.base_amount - (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1))) as \"Amount to Bill:Currency:100\",\n\t`tabPurchase Order Item`.item_name as \"Item Name::150\",\n\t`tabPurchase Order Item`.description as \"Description::200\",\n\t`tabPurchase Order`.company as \"Company:Link/Company:\"\nfrom\n\t`tabPurchase Order`, `tabPurchase Order Item`\nwhere\n\t`tabPurchase Order Item`.`parent` = `tabPurchase Order`.`name`\n\tand `tabPurchase Order`.docstatus = 1\n\tand `tabPurchase Order`.status not in (\"Stopped\", \"Closed\")\n\tand (ifnull(`tabPurchase Order Item`.billed_amt, 0) * ifnull(`tabPurchase Order`.conversion_rate, 1)) < ifnull(`tabPurchase Order Item`.base_amount, 0)\norder by `tabPurchase Order`.transaction_date asc",
"ref_doctype": "Purchase Invoice",
"report_name": "Purchase Order Items To Be Billed",
"report_type": "Query Report"

View File

@@ -29,7 +29,7 @@ def execute(filters=None):
purchase_receipt = list(set(invoice_po_pr_map.get(inv.name, {}).get("purchase_receipt", [])))
project_name = list(set(invoice_po_pr_map.get(inv.name, {}).get("project_name", [])))
row = [inv.name, inv.posting_date, inv.supplier, inv.supplier_name,
row = [inv.name, inv.posting_date, inv.supplier, inv.supplier_name,
supplier_details.get(inv.supplier),
inv.credit_to, ", ".join(project_name), inv.bill_no, inv.bill_date, inv.remarks,
", ".join(purchase_order), ", ".join(purchase_receipt)]
@@ -54,7 +54,7 @@ def execute(filters=None):
# total tax, grand total, outstanding amount & rounded total
row += [total_tax, inv.base_grand_total, flt(inv.base_grand_total, 2), inv.outstanding_amount]
data.append(row)
data.append(row)
return columns, data
@@ -71,13 +71,15 @@ def get_columns(invoice_list):
if invoice_list:
expense_accounts = frappe.db.sql_list("""select distinct expense_account
from `tabPurchase Invoice Item` where docstatus = 1 and ifnull(expense_account, '') != ''
from `tabPurchase Invoice Item` where docstatus = 1
and (expense_account is not null and expense_account != '')
and parent in (%s) order by expense_account""" %
', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]))
tax_accounts = frappe.db.sql_list("""select distinct account_head
from `tabPurchase Taxes and Charges` where parenttype = 'Purchase Invoice'
and docstatus = 1 and ifnull(account_head, '') != '' and category in ('Total', 'Valuation and Total')
and docstatus = 1 and (account_head is not null and account_head != '')
and category in ('Total', 'Valuation and Total')
and parent in (%s) order by account_head""" %
', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]))
@@ -143,7 +145,7 @@ def get_invoice_tax_map(invoice_list, invoice_expense_map, expense_accounts):
return invoice_expense_map, invoice_tax_map
def get_invoice_po_pr_map(invoice_list):
pi_items = frappe.db.sql("""select parent, purchase_order, purchase_receipt, po_detail,
pi_items = frappe.db.sql("""select parent, purchase_order, purchase_receipt, po_detail,
project_name from `tabPurchase Invoice Item` where parent in (%s)
and (ifnull(purchase_order, '') != '' or ifnull(purchase_receipt, '') != '')""" %
', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]), as_dict=1)

View File

@@ -1,16 +1,18 @@
{
"add_total_row": 0,
"apply_user_permissions": 1,
"creation": "2013-07-30 18:35:10",
"disabled": 0,
"docstatus": 0,
"doctype": "Report",
"idx": 1,
"is_standard": "Yes",
"modified": "2015-04-14 11:56:02.323769",
"modified": "2015-11-02 12:33:11.681513",
"modified_by": "Administrator",
"module": "Accounts",
"name": "Received Items To Be Billed",
"owner": "Administrator",
"query": "select\n `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Receipt`.`posting_date` as \"Date:Date\",\n\t`tabPurchase Receipt Item`.`project_name` as \"Project\",\n\t`tabPurchase Receipt Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabPurchase Receipt Item`.`qty` - ifnull((select sum(qty) from `tabPurchase Invoice Item` \n\t where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus = 1 and\n\t `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t as \"Qty:Float:110\",\n\t(`tabPurchase Receipt Item`.`base_amount` - ifnull((select sum(base_amount) \n from `tabPurchase Invoice Item` \n where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus = 1 and\n `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t as \"Amount:Currency:110\",\n\t`tabPurchase Receipt Item`.`item_name` as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.`description` as \"Description::200\",\n\t`tabPurchase Receipt`.`company` as \"Company:Link/Company:\"\nfrom `tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n `tabPurchase Receipt`.docstatus = 1 and\n `tabPurchase Receipt`.name = `tabPurchase Receipt Item`.parent and\n (`tabPurchase Receipt Item`.qty > ifnull((select sum(qty) from `tabPurchase Invoice Item` \n where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus=1 and \n `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\norder by `tabPurchase Receipt`.`name` desc",
"query": "select\n `tabPurchase Receipt`.`name` as \"Purchase Receipt:Link/Purchase Receipt:120\",\n `tabPurchase Receipt`.`supplier` as \"Supplier:Link/Supplier:120\",\n\t`tabPurchase Receipt`.`posting_date` as \"Date:Date\",\n\t`tabPurchase Receipt Item`.`project_name` as \"Project\",\n\t`tabPurchase Receipt Item`.`item_code` as \"Item:Link/Item:120\",\n\t(`tabPurchase Receipt Item`.`qty` - ifnull((select sum(qty) from `tabPurchase Invoice Item` \n\t where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus = 1 and\n\t `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t as \"Qty:Float:110\",\n\t(`tabPurchase Receipt Item`.`base_amount` - ifnull((select sum(base_amount) \n from `tabPurchase Invoice Item` \n where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus = 1 and\n `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\n\t as \"Amount:Currency:110\",\n\t`tabPurchase Receipt Item`.`item_name` as \"Item Name::150\",\n\t`tabPurchase Receipt Item`.`description` as \"Description::200\",\n\t`tabPurchase Receipt`.`company` as \"Company:Link/Company:\"\nfrom `tabPurchase Receipt`, `tabPurchase Receipt Item`\nwhere\n `tabPurchase Receipt`.docstatus = 1 and `tabPurchase Receipt`.status != \"Closed\" and \n `tabPurchase Receipt`.name = `tabPurchase Receipt Item`.parent and\n (`tabPurchase Receipt Item`.qty > ifnull((select sum(qty) from `tabPurchase Invoice Item` \n where `tabPurchase Invoice Item`.purchase_receipt = `tabPurchase Receipt`.name and\n `tabPurchase Invoice Item`.docstatus=1 and \n `tabPurchase Invoice Item`.pr_detail = `tabPurchase Receipt Item`.name), 0))\norder by `tabPurchase Receipt`.`name` desc",
"ref_doctype": "Purchase Invoice",
"report_name": "Received Items To Be Billed",
"report_type": "Query Report"

View File

@@ -79,7 +79,7 @@ def get_columns(invoice_list):
tax_accounts = frappe.db.sql_list("""select distinct account_head
from `tabSales Taxes and Charges` where parenttype = 'Sales Invoice'
and docstatus = 1 and ifnull(base_tax_amount_after_discount_amount, 0) != 0
and docstatus = 1 and base_tax_amount_after_discount_amount != 0
and parent in (%s) order by account_head""" %
', '.join(['%s']*len(invoice_list)), tuple([inv.name for inv in invoice_list]))

View File

@@ -5,7 +5,7 @@ from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import cint, flt, getdate, formatdate, cstr
from erpnext.accounts.report.financial_statements import filter_accounts, get_gl_entries
from erpnext.accounts.report.financial_statements import filter_accounts, set_gl_entries_by_account
value_fields = ("opening_debit", "opening_credit", "debit", "credit", "closing_debit", "closing_credit")
@@ -45,7 +45,7 @@ def validate_filters(filters):
filters.to_date = filters.year_end_date
def get_data(filters):
accounts = frappe.db.sql("""select name, parent_account, account_name, root_type, report_type, lft, rgt
accounts = frappe.db.sql("""select name, parent_account, account_name, root_type, report_type, lft, rgt
from `tabAccount` where company=%s order by lft""", filters.company, as_dict=True)
if not accounts:
@@ -56,8 +56,10 @@ def get_data(filters):
min_lft, max_rgt = frappe.db.sql("""select min(lft), max(rgt) from `tabAccount`
where company=%s""", (filters.company,))[0]
gl_entries_by_account = get_gl_entries(filters.company, filters.from_date, filters.to_date, min_lft, max_rgt,
ignore_closing_entries=not flt(filters.with_period_closing_entry))
gl_entries_by_account = {}
set_gl_entries_by_account(filters.company, filters.from_date,
filters.to_date, min_lft, max_rgt, gl_entries_by_account, ignore_closing_entries=not flt(filters.with_period_closing_entry))
opening_balances = get_opening_balances(filters)
@@ -67,27 +69,27 @@ def get_data(filters):
data = prepare_data(accounts, filters, total_row)
return data
def get_opening_balances(filters):
balance_sheet_opening = get_rootwise_opening_balances(filters, "Balance Sheet")
pl_opening = get_rootwise_opening_balances(filters, "Profit and Loss")
balance_sheet_opening.update(pl_opening)
return balance_sheet_opening
def get_rootwise_opening_balances(filters, report_type):
additional_conditions = " and posting_date >= %(year_start_date)s" \
if report_type == "Profit and Loss" else ""
if not flt(filters.with_period_closing_entry):
additional_conditions += " and ifnull(voucher_type, '')!='Period Closing Voucher'"
gle = frappe.db.sql("""
select
account, sum(ifnull(debit, 0)) as opening_debit, sum(ifnull(credit, 0)) as opening_credit
select
account, sum(debit) as opening_debit, sum(credit) as opening_credit
from `tabGL Entry`
where
where
company=%(company)s
{additional_conditions}
and (posting_date < %(from_date)s or ifnull(is_opening, 'No') = 'Yes')
@@ -100,11 +102,11 @@ def get_rootwise_opening_balances(filters, report_type):
"year_start_date": filters.year_start_date
},
as_dict=True)
opening = frappe._dict()
for d in gle:
opening.setdefault(d.account, d)
return opening
def calculate_values(accounts, gl_entries_by_account, opening_balances, filters):
@@ -139,7 +141,7 @@ def calculate_values(accounts, gl_entries_by_account, opening_balances, filters)
total_row["debit"] += d["debit"]
total_row["credit"] += d["credit"]
return total_row

View File

@@ -76,7 +76,7 @@ def get_data(filters, show_party_name):
def get_opening_balances(filters):
gle = frappe.db.sql("""
select party, sum(ifnull(debit, 0)) as opening_debit, sum(ifnull(credit, 0)) as opening_credit
select party, sum(debit) as opening_debit, sum(credit) as opening_credit
from `tabGL Entry`
where company=%(company)s
and ifnull(party_type, '') = %(party_type)s and ifnull(party, '') != ''
@@ -96,7 +96,7 @@ def get_opening_balances(filters):
def get_balances_within_period(filters):
gle = frappe.db.sql("""
select party, sum(ifnull(debit, 0)) as debit, sum(ifnull(credit, 0)) as credit
select party, sum(debit) as debit, sum(credit) as credit
from `tabGL Entry`
where company=%(company)s
and ifnull(party_type, '') = %(party_type)s and ifnull(party, '') != ''

View File

@@ -21,7 +21,7 @@ def get_fiscal_year(date=None, fiscal_year=None, label="Date", verbose=1, compan
def get_fiscal_years(transaction_date=None, fiscal_year=None, label="Date", verbose=1, company=None):
# if year start date is 2012-04-01, year end date should be 2013-03-31 (hence subdate)
cond = " ifnull(disabled, 0) = 0"
cond = " disabled = 0"
if fiscal_year:
cond += " and fy.name = %(fiscal_year)s"
else:
@@ -65,7 +65,7 @@ def get_balance_on(account=None, date=None, party_type=None, party=None, in_acco
cond = []
if date:
cond.append("posting_date <= '%s'" % date)
cond.append("posting_date <= '%s'" % frappe.db.escape(cstr(date)))
else:
# get balance of all entries that exist
date = nowdate()
@@ -105,17 +105,17 @@ def get_balance_on(account=None, date=None, party_type=None, party=None, in_acco
if acc.account_currency == frappe.db.get_value("Company", acc.company, "default_currency"):
in_account_currency = False
else:
cond.append("""gle.account = "%s" """ % (account.replace('"', '\\"'), ))
cond.append("""gle.account = "%s" """ % (frappe.db.escape(account), ))
if party_type and party:
cond.append("""gle.party_type = "%s" and gle.party = "%s" """ %
(party_type.replace('"', '\\"'), party.replace('"', '\\"')))
(frappe.db.escape(party_type), frappe.db.escape(party)))
if account or (party_type and party):
if in_account_currency:
select_field = "sum(ifnull(debit_in_account_currency, 0)) - sum(ifnull(credit_in_account_currency, 0))"
select_field = "sum(debit_in_account_currency) - sum(credit_in_account_currency)"
else:
select_field = "sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))"
select_field = "sum(debit) - sum(credit)"
bal = frappe.db.sql("""
SELECT {0}
FROM `tabGL Entry` gle
@@ -134,6 +134,8 @@ def add_ac(args=None):
ac.update(args)
ac.old_parent = ""
ac.freeze_account = "No"
if ac.get("is_root"):
ac.flags.ignore_mandatory = True
ac.insert()
return ac.name
@@ -181,7 +183,7 @@ def check_if_jv_modified(args):
select t2.{dr_or_cr} from `tabJournal Entry` t1, `tabJournal Entry Account` t2
where t1.name = t2.parent and t2.account = %(account)s
and t2.party_type = %(party_type)s and t2.party = %(party)s
and ifnull(t2.reference_type, '') in ("", "Sales Order", "Purchase Order")
and (t2.reference_type is null or t2.reference_type in ("", "Sales Order", "Purchase Order"))
and t1.name = %(voucher_no)s and t2.name = %(voucher_detail_no)s
and t1.docstatus=1 """.format(dr_or_cr = args.get("dr_or_cr")), args)
@@ -211,7 +213,7 @@ def update_against_doc(d, jv_obj):
if d['allocated_amt'] < d['unadjusted_amt']:
jvd = frappe.db.sql("""
select cost_center, balance, against_account, is_advance,
select cost_center, balance, against_account, is_advance,
account_type, exchange_rate, account_currency
from `tabJournal Entry Account` where name = %s
""", d['voucher_detail_no'], as_dict=True)
@@ -282,7 +284,7 @@ def fix_total_debit_credit():
sum(debit) - sum(credit) as diff
from `tabGL Entry`
group by voucher_type, voucher_no
having sum(ifnull(debit, 0)) != sum(ifnull(credit, 0))""", as_dict=1)
having sum(debit) != sum(credit)""", as_dict=1)
for d in vouchers:
if abs(d.diff) > 0:
@@ -301,7 +303,7 @@ def get_stock_and_account_difference(account_list=None, posting_date=None):
difference = {}
account_warehouse = dict(frappe.db.sql("""select name, warehouse from tabAccount
where account_type = 'Warehouse' and ifnull(warehouse, '') != ''
where account_type = 'Warehouse' and (warehouse is not null and warehouse != '')
and name in (%s)""" % ', '.join(['%s']*len(account_list)), account_list))
for account, warehouse in account_warehouse.items():
@@ -372,7 +374,7 @@ def get_actual_expense(args):
if args.get("month_end_date") else ""
return flt(frappe.db.sql("""
select sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))
select sum(debit) - sum(credit)
from `tabGL Entry`
where account='%(account)s' and cost_center='%(cost_center)s'
and fiscal_year='%(fiscal_year)s' and company='%(company)s' %(condition)s
@@ -392,14 +394,14 @@ def get_stock_rbnb_difference(posting_date, company):
from `tabStock Ledger Entry` where company=%s""", company)
pr_valuation_amount = frappe.db.sql("""
select sum(ifnull(pr_item.valuation_rate, 0) * ifnull(pr_item.qty, 0) * ifnull(pr_item.conversion_factor, 0))
select sum(pr_item.valuation_rate * pr_item.qty * pr_item.conversion_factor)
from `tabPurchase Receipt Item` pr_item, `tabPurchase Receipt` pr
where pr.name = pr_item.parent and pr.docstatus=1 and pr.company=%s
and pr.posting_date <= %s and pr_item.item_code in (%s)""" %
('%s', '%s', ', '.join(['%s']*len(stock_items))), tuple([company, posting_date] + stock_items))[0][0]
pi_valuation_amount = frappe.db.sql("""
select sum(ifnull(pi_item.valuation_rate, 0) * ifnull(pi_item.qty, 0) * ifnull(pi_item.conversion_factor, 0))
select sum(pi_item.valuation_rate * pi_item.qty * pi_item.conversion_factor)
from `tabPurchase Invoice Item` pi_item, `tabPurchase Invoice` pi
where pi.name = pi_item.parent and pi.docstatus=1 and pi.company=%s
and pi.posting_date <= %s and pi_item.item_code in (%s)""" %
@@ -415,47 +417,63 @@ def get_stock_rbnb_difference(posting_date, company):
# Amount should be credited
return flt(stock_rbnb) + flt(sys_bal)
def get_outstanding_invoices(amount_query, account, party_type, party):
all_outstanding_vouchers = []
outstanding_voucher_list = frappe.db.sql("""
select
voucher_no, voucher_type, posting_date,
ifnull(sum({amount_query}), 0) as invoice_amount
def get_outstanding_invoices(party_type, party, account, condition=None):
outstanding_invoices = []
precision = frappe.get_precision("Sales Invoice", "outstanding_amount")
if party_type=="Customer":
dr_or_cr = "debit_in_account_currency - credit_in_account_currency"
payment_dr_or_cr = "payment_gl_entry.credit_in_account_currency - payment_gl_entry.debit_in_account_currency"
else:
dr_or_cr = "credit_in_account_currency - debit_in_account_currency"
payment_dr_or_cr = "payment_gl_entry.debit_in_account_currency - payment_gl_entry.credit_in_account_currency"
invoice_list = frappe.db.sql("""select
voucher_no, voucher_type, posting_date,
ifnull(sum({dr_or_cr}), 0) as invoice_amount,
(
select
ifnull(sum({payment_dr_or_cr}), 0)
from `tabGL Entry` payment_gl_entry
where
payment_gl_entry.against_voucher_type = invoice_gl_entry.voucher_type
and payment_gl_entry.against_voucher = invoice_gl_entry.voucher_no
and payment_gl_entry.party_type = invoice_gl_entry.party_type
and payment_gl_entry.party = invoice_gl_entry.party
and payment_gl_entry.account = invoice_gl_entry.account
and {payment_dr_or_cr} > 0
) as payment_amount
from
`tabGL Entry`
`tabGL Entry` invoice_gl_entry
where
account = %s and party_type=%s and party=%s and {amount_query} > 0
and (CASE
WHEN voucher_type = 'Journal Entry'
THEN ifnull(against_voucher, '') = ''
ELSE 1=1
END)
party_type = %(party_type)s
and party = %(party)s
and account = %(account)s
and {dr_or_cr} > 0
{condition}
and ((voucher_type = 'Journal Entry'
and (against_voucher = ''
or against_voucher is null))
or (voucher_type != 'Journal Entry'))
group by voucher_type, voucher_no
""".format(amount_query = amount_query), (account, party_type, party), as_dict = True)
having (invoice_amount - payment_amount) > 0.005""".format(
dr_or_cr = dr_or_cr,
payment_dr_or_cr = payment_dr_or_cr,
condition = condition or ""
), {
"party_type": party_type,
"party": party,
"account": account,
}, as_dict=True)
for d in outstanding_voucher_list:
payment_amount = frappe.db.sql("""
select ifnull(sum({amount_query}), 0)
from
`tabGL Entry`
where
account = %s and party_type=%s and party=%s and {amount_query} < 0
and against_voucher_type = %s and ifnull(against_voucher, '') = %s
""".format(**{
"amount_query": amount_query
}), (account, party_type, party, d.voucher_type, d.voucher_no))
for d in invoice_list:
outstanding_invoices.append({
'voucher_no': d.voucher_no,
'voucher_type': d.voucher_type,
'posting_date': d.posting_date,
'invoice_amount': flt(d.invoice_amount),
'payment_amount': flt(d.payment_amount),
'outstanding_amount': flt(d.invoice_amount - d.payment_amount, precision)
})
payment_amount = -1*payment_amount[0][0] if payment_amount else 0
precision = frappe.get_precision("Sales Invoice", "outstanding_amount")
if d.invoice_amount > payment_amount:
all_outstanding_vouchers.append({
'voucher_no': d.voucher_no,
'voucher_type': d.voucher_type,
'posting_date': d.posting_date,
'invoice_amount': flt(d.invoice_amount, precision),
'outstanding_amount': flt(d.invoice_amount - payment_amount, precision)
})
return all_outstanding_vouchers
return outstanding_invoices

View File

@@ -58,6 +58,11 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
refresh: function(doc) {
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") {
this.set_from_product_bundle();
}
this._super();
},
@@ -157,6 +162,13 @@ erpnext.buying.BuyingController = erpnext.TransactionController.extend({
},
add_deduct_tax: function(doc, cdt, cdn) {
this.calculate_taxes_and_totals();
},
set_from_product_bundle: function() {
var me = this;
this.frm.add_custom_button(__("From Product Bundle"), function() {
erpnext.buying.get_items_from_product_bundle(me.frm);
});
}
});
@@ -180,3 +192,78 @@ erpnext.buying.get_default_bom = function(frm) {
}
});
}
erpnext.buying.get_items_from_product_bundle = function(frm) {
var dialog = new frappe.ui.Dialog({
title: __("Get Items from Product Bundle"),
fields: [
{
"fieldtype": "Link",
"label": __("Product Bundle"),
"fieldname": "product_bundle",
"options":"Product Bundle",
"reqd": 1
},
{
"fieldtype": "Currency",
"label": __("Quantity"),
"fieldname": "quantity",
"reqd": 1,
"default": 1
},
{
"fieldtype": "Button",
"label": __("Get Items"),
"fieldname": "get_items",
"cssClass": "btn-primary"
}
]
});
dialog.fields_dict.get_items.$input.click(function() {
args = dialog.get_values();
if(!args) return;
dialog.hide();
return frappe.call({
type: "GET",
method: "erpnext.stock.doctype.packed_item.packed_item.get_items_from_product_bundle",
args: {
args: {
item_code: args.product_bundle,
quantity: args.quantity,
parenttype: frm.doc.doctype,
parent: frm.doc.name,
supplier: frm.doc.supplier,
currency: frm.doc.currency,
conversion_rate: frm.doc.conversion_rate,
price_list: frm.doc.buying_price_list,
price_list_currency: frm.doc.price_list_currency,
plc_conversion_rate: frm.doc.plc_conversion_rate,
company: frm.doc.company,
is_subcontracted: frm.doc.is_subcontracted,
transaction_date: frm.doc.transaction_date || frm.doc.posting_date,
ignore_pricing_rule: frm.doc.ignore_pricing_rule
}
},
freeze: true,
callback: function(r) {
if(!r.exc && r.message) {
for ( var i=0; i< r.message.length; i++ ) {
var d = frm.add_child("items");
var item = r.message[i];
for ( var key in item) {
if ( !is_null(item[key]) ) {
d[key] = item[key];
}
}
if(frappe.meta.get_docfield(d.doctype, "price_list_rate", d.name)) {
frm.script_manager.trigger("price_list_rate", d.doctype, d.name);
}
}
frm.refresh_field("items");
}
}
})
});
dialog.show();
}

View File

@@ -42,6 +42,8 @@ class PurchaseCommon(BuyingController):
items = []
for d in obj.get("items"):
if not d.qty:
if obj.doctype == "Purchase Receipt" and d.rejected_qty:
continue
frappe.throw(_("Please enter quantity for Item {0}").format(d.item_code))
# udpate with latest quantities
@@ -56,11 +58,11 @@ class PurchaseCommon(BuyingController):
d.set(x, f_lst[x])
item = frappe.db.sql("""select is_stock_item, is_purchase_item,
is_sub_contracted_item, end_of_life from `tabItem` where name=%s""",
is_sub_contracted_item, end_of_life, disabled from `tabItem` where name=%s""",
d.item_code, as_dict=1)[0]
from erpnext.stock.doctype.item.item import validate_end_of_life
validate_end_of_life(d.item_code, item.end_of_life)
validate_end_of_life(d.item_code, item.end_of_life, item.disabled)
# validate stock item
if item.is_stock_item==1 and d.qty and not d.warehouse:
@@ -72,17 +74,18 @@ class PurchaseCommon(BuyingController):
frappe.throw(_("{0} must be a Purchased or Sub-Contracted Item in row {1}").format(d.item_code, d.idx))
items.append(cstr(d.item_code))
if items and len(items) != len(set(items)) and \
not cint(frappe.db.get_single_value("Buying Settings", "allow_multiple_items") or 0):
frappe.msgprint(_("Warning: Same item has been entered multiple times."))
def check_for_stopped_status(self, doctype, docname):
stopped = frappe.db.sql("""select name from `tab%s` where name = %s and
status = 'Stopped'""" % (doctype, '%s'), docname)
if stopped:
frappe.throw(_("{0} {1} status is 'Stopped'").format(doctype, docname), frappe.InvalidStatusError)
def check_for_stopped_or_closed_status(self, doctype, docname):
status = frappe.db.get_value(doctype, docname, "status")
if status in ("Stopped", "Closed"):
frappe.throw(_("{0} {1} status is {2}").format(doctype, docname, status), frappe.InvalidStatusError)
def check_docstatus(self, check, doctype, docname, detail_doctype = ''):
if check == 'Next':
submitted = frappe.db.sql("""select t1.name from `tab%s` t1,`tab%s` t2

View File

@@ -18,17 +18,49 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
var me = this;
this._super();
// this.frm.dashboard.reset();
var allow_receipt = false;
var is_drop_ship = false;
if(doc.docstatus == 1 && doc.status != 'Stopped') {
for (var i in cur_frm.doc.items) {
var item = cur_frm.doc.items[i];
if(item.delivered_by_supplier !== 1) {
allow_receipt = true;
}
if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100)
cur_frm.add_custom_button(__('Stop'), cur_frm.cscript['Stop Purchase Order']);
else {
is_drop_ship = true
}
if(is_drop_ship && allow_receipt) {
break;
}
}
cur_frm.set_df_property("drop_ship", "hidden", !is_drop_ship);
if(doc.docstatus == 1 && !in_list(["Stopped", "Closed", "Delivered"], doc.status)) {
if (this.frm.has_perm("submit")) {
if(flt(doc.per_billed, 2) < 100 || doc.per_received < 100) {
cur_frm.add_custom_button(__('Stop'), this.stop_purchase_order);
}
cur_frm.add_custom_button(__('Close'), this.close_purchase_order);
}
if(flt(doc.per_billed)==0) {
cur_frm.add_custom_button(__('Payment'), cur_frm.cscript.make_bank_entry);
}
if(flt(doc.per_received, 2) < 100) {
if(is_drop_ship && doc.status!="Delivered"){
cur_frm.add_custom_button(__('Mark as Delivered'),
this.delivered_by_supplier).addClass("btn-primary");
}
} else if(doc.docstatus===0) {
cur_frm.cscript.add_from_mappers();
}
if(doc.docstatus == 1 && !in_list(["Stopped", "Closed"], doc.status)) {
if(flt(doc.per_received, 2) < 100 && allow_receipt) {
cur_frm.add_custom_button(__('Receive'), this.make_purchase_receipt).addClass("btn-primary");
if(doc.is_subcontracted==="Yes") {
@@ -38,15 +70,15 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
}
if(flt(doc.per_billed, 2) < 100)
cur_frm.add_custom_button(__('Invoice'), this.make_purchase_invoice);
} else if(doc.docstatus===0) {
cur_frm.cscript.add_from_mappers();
cur_frm.add_custom_button(__('Invoice'),
this.make_purchase_invoice).addClass("btn-primary");
}
if(doc.docstatus == 1 && doc.status == 'Stopped')
cur_frm.add_custom_button(__('Unstop'), cur_frm.cscript['Unstop Purchase Order']);
if(doc.docstatus == 1 && in_list(["Stopped", "Closed", "Delivered"], doc.status)) {
if (this.frm.has_perm("submit")) {
cur_frm.add_custom_button(__('Re-open'), this.unstop_purchase_order).addClass("btn-primary");
}
}
},
make_stock_entry: function() {
@@ -146,15 +178,32 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
make_bank_entry: function() {
return frappe.call({
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_from_purchase_order",
method: "erpnext.accounts.doctype.journal_entry.journal_entry.get_payment_entry_against_order",
args: {
"purchase_order": cur_frm.doc.name
"dt": "Purchase Order",
"dn": cur_frm.doc.name
},
callback: function(r) {
var doclist = frappe.model.sync(r.message);
frappe.set_route("Form", doclist[0].doctype, doclist[0].name);
}
});
},
stop_purchase_order: function(){
cur_frm.cscript.update_status('Stop', 'Stopped')
},
unstop_purchase_order: function(){
cur_frm.cscript.update_status('Re-open', 'Submitted')
},
close_purchase_order: function(){
cur_frm.cscript.update_status('Close', 'Closed')
},
delivered_by_supplier: function(){
cur_frm.cscript.update_status('Deliver', 'Delivered')
}
});
@@ -162,6 +211,17 @@ erpnext.buying.PurchaseOrderController = erpnext.buying.BuyingController.extend(
// for backward compatibility: combine new and previous states
$.extend(cur_frm.cscript, new erpnext.buying.PurchaseOrderController({frm: cur_frm}));
cur_frm.cscript.update_status= function(label, status){
frappe.call({
method: "erpnext.buying.doctype.purchase_order.purchase_order.update_status",
args: {status: status, name: cur_frm.doc.name},
callback: function(r) {
cur_frm.set_value("status", status);
cur_frm.reload_doc();
}
})
}
cur_frm.fields_dict['supplier_address'].get_query = function(doc, cdt, cdn) {
return {
filters: {'supplier': doc.supplier}
@@ -193,36 +253,6 @@ cur_frm.fields_dict['items'].grid.get_field('bom').get_query = function(doc, cdt
}
}
cur_frm.cscript.get_last_purchase_rate = function(doc, cdt, cdn){
return $c_obj(doc, 'get_last_purchase_rate', '', function(r, rt) {
refresh_field("items");
var doc = locals[cdt][cdn];
cur_frm.cscript.calc_amount( doc, 2);
});
}
cur_frm.cscript['Stop Purchase Order'] = function() {
var doc = cur_frm.doc;
var check = confirm(__("Do you really want to STOP ") + doc.name);
if (check) {
return $c('runserverobj', args={'method':'update_status', 'arg': 'Stopped', 'docs':doc}, function(r,rt) {
cur_frm.refresh();
});
}
}
cur_frm.cscript['Unstop Purchase Order'] = function() {
var doc = cur_frm.doc;
var check = confirm(__("Do you really want to UNSTOP ") + doc.name);
if (check) {
return $c('runserverobj', args={'method':'update_status', 'arg': 'Submitted', 'docs':doc}, function(r,rt) {
cur_frm.refresh();
});
}
}
cur_frm.pformat.indent_no = function(doc, cdt, cdn){
//function to make row of table

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,6 @@ from frappe.utils import cstr, flt
from frappe import msgprint, _, throw
from frappe.model.mapper import get_mapped_doc
from erpnext.controllers.buying_controller import BuyingController
from erpnext.stock.doctype.item.item import get_last_purchase_details
from erpnext.stock.stock_balance import update_bin_qty, get_ordered_qty
from frappe.desk.notifications import clear_doctype_notifications
@@ -39,7 +38,7 @@ class PurchaseOrder(BuyingController):
self.set_status()
pc_obj = frappe.get_doc('Purchase Common')
pc_obj.validate_for_items(self)
self.check_for_stopped_status(pc_obj)
self.check_for_stopped_or_closed_status(pc_obj)
self.validate_uom_is_integer("uom", "qty")
self.validate_uom_is_integer("stock_uom", ["qty", "required_qty"])
@@ -48,6 +47,7 @@ class PurchaseOrder(BuyingController):
self.validate_for_subcontracting()
self.validate_minimum_order_qty()
self.create_raw_materials_supplied("supplied_items")
self.set_received_qty_for_drop_ship_items()
def validate_with_previous_doc(self):
super(PurchaseOrder, self).validate_with_previous_doc({
@@ -84,36 +84,13 @@ class PurchaseOrder(BuyingController):
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"):
if d.item_code:
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'] * (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)
d.price_list_rate = d.base_price_list_rate / conversion_rate
d.rate = d.base_rate / conversion_rate
else:
# if no last purchase found, reset all values to 0
d.base_price_list_rate = d.base_rate = d.price_list_rate = d.rate = d.discount_percentage = 0
item_last_purchase_rate = frappe.db.get_value("Item", d.item_code, "last_purchase_rate")
if item_last_purchase_rate:
d.base_price_list_rate = d.base_rate = d.price_list_rate \
= d.rate = item_last_purchase_rate
# Check for Stopped status
def check_for_stopped_status(self, pc_obj):
def check_for_stopped_or_closed_status(self, pc_obj):
check_list =[]
for d in self.get('items'):
if d.meta.get_field('prevdoc_docname') and d.prevdoc_docname and d.prevdoc_docname not in check_list:
check_list.append(d.prevdoc_docname)
pc_obj.check_for_stopped_status( d.prevdoc_doctype, d.prevdoc_docname)
pc_obj.check_for_stopped_or_closed_status( d.prevdoc_doctype, d.prevdoc_docname)
def update_requested_qty(self):
material_request_map = {}
@@ -134,9 +111,11 @@ class PurchaseOrder(BuyingController):
"""update requested qty (before ordered_qty is updated)"""
item_wh_list = []
for d in self.get("items"):
if (not po_item_rows or d.name in po_item_rows) and [d.item_code, d.warehouse] not in item_wh_list \
and frappe.db.get_value("Item", d.item_code, "is_stock_item") and d.warehouse:
item_wh_list.append([d.item_code, d.warehouse])
if (not po_item_rows or d.name in po_item_rows) \
and [d.item_code, d.warehouse] not in item_wh_list \
and frappe.db.get_value("Item", d.item_code, "is_stock_item") \
and d.warehouse and not d.delivered_by_supplier:
item_wh_list.append([d.item_code, d.warehouse])
for item_code, warehouse in item_wh_list:
update_bin_qty(item_code, warehouse, {
@@ -154,14 +133,16 @@ class PurchaseOrder(BuyingController):
def update_status(self, status):
self.check_modified_date()
self.db_set('status', status)
self.set_status(update=True)
self.set_status(update=True, status=status)
self.update_requested_qty()
self.update_ordered_qty()
self.notify_update()
clear_doctype_notifications(self)
def on_submit(self):
if self.has_drop_ship_item():
self.update_status_updater()
super(PurchaseOrder, self).on_submit()
purchase_controller = frappe.get_doc("Purchase Common")
@@ -176,8 +157,12 @@ class PurchaseOrder(BuyingController):
purchase_controller.update_last_purchase_rate(self, is_submit = 1)
def on_cancel(self):
if self.has_drop_ship_item():
self.update_status_updater()
self.update_delivered_qty_in_sales_order()
pc_obj = frappe.get_doc('Purchase Common')
self.check_for_stopped_status(pc_obj)
self.check_for_stopped_or_closed_status(pc_obj)
# Check if Purchase Receipt has been submitted against current Purchase Order
pc_obj.check_docstatus(check = 'Next', doctype = 'Purchase Receipt', docname = self.name, detail_doctype = 'Purchase Receipt Item')
@@ -214,6 +199,42 @@ class PurchaseOrder(BuyingController):
"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",
"target_dt": "Sales Order Item",
'target_field': 'ordered_qty',
"target_parent_field": ''
})
def update_delivered_qty_in_sales_order(self):
"""Update delivered qty in Sales Order for drop ship"""
sales_orders_to_update = []
for item in self.items:
if item.prevdoc_doctype == "Sales Order" and item.delivered_by_supplier == 1:
if item.prevdoc_docname not in sales_orders_to_update:
sales_orders_to_update.append(item.prevdoc_docname)
for so_name in sales_orders_to_update:
so = frappe.get_doc("Sales Order", so_name)
so.update_delivery_status()
so.set_status(update=True)
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
def set_received_qty_for_drop_ship_items(self):
for item in self.items:
if item.delivered_by_supplier == 1:
item.received_qty = item.qty
@frappe.whitelist()
def stop_or_unstop_purchase_orders(names, status):
if not frappe.has_permission("Purchase Order", "write"):
@@ -223,16 +244,15 @@ def stop_or_unstop_purchase_orders(names, status):
for name in names:
po = frappe.get_doc("Purchase Order", name)
if po.docstatus == 1:
if status=="Stopped":
if po.status not in ("Stopped", "Cancelled") and (po.per_received < 100 or po.per_billed < 100):
po.update_status("Stopped")
if status in ("Stopped", "Closed"):
if po.status not in ("Stopped", "Cancelled", "Closed") and (po.per_received < 100 or po.per_billed < 100):
po.update_status(status)
else:
if po.status == "Stopped":
if po.status in ("Stopped", "Closed"):
po.update_status("Draft")
frappe.local.message_log = []
def set_missing_values(source, target):
target.ignore_pricing_rule = 1
target.run_method("set_missing_values")
@@ -262,7 +282,7 @@ def make_purchase_receipt(source_name, target_doc=None):
"parenttype": "prevdoc_doctype",
},
"postprocess": update_item,
"condition": lambda doc: doc.received_qty < doc.qty
"condition": lambda doc: abs(doc.received_qty) < abs(doc.qty) and doc.delivered_by_supplier!=1
},
"Purchase Taxes and Charges": {
"doctype": "Purchase Taxes and Charges",
@@ -298,7 +318,7 @@ def make_purchase_invoice(source_name, target_doc=None):
"parent": "purchase_order",
},
"postprocess": update_item,
"condition": lambda doc: doc.base_amount==0 or doc.billed_amt < doc.amount
"condition": lambda doc: (doc.base_amount==0 or abs(doc.billed_amt) < abs(doc.amount))
},
"Purchase Taxes and Charges": {
"doctype": "Purchase Taxes and Charges",
@@ -325,3 +345,10 @@ def make_stock_entry(purchase_order, item_code):
stock_entry.bom_no = po_item.bom
stock_entry.get_items()
return stock_entry.as_dict()
@frappe.whitelist()
def update_status(status, name):
po = frappe.get_doc("Purchase Order", name)
po.update_status(status)
po.update_delivered_qty_in_sales_order()

View File

@@ -4,7 +4,11 @@ frappe.listview_settings['Purchase Order'] = {
get_indicator: function(doc) {
if(doc.status==="Stopped") {
return [__("Stopped"), "darkgrey", "status,=,Stopped"];
} else if(flt(doc.per_received, 2) < 100 && doc.status!=="Stopped") {
} else if(doc.status==="Closed"){
return [__("Closed"), "green", "status,=,Closed"];
} else if (doc.status==="Delivered") {
return [__("Delivered"), "green", "status,=,Closed"];
}else if(flt(doc.per_received, 2) < 100 && doc.status!=="Stopped") {
if(flt(doc.per_billed, 2) < 100) {
return [__("To Receive and Bill"), "orange",
"per_received,<,100|per_billed,<,100|status,!=,Stopped"];
@@ -21,13 +25,16 @@ frappe.listview_settings['Purchase Order'] = {
onload: function(listview) {
var method = "erpnext.buying.doctype.purchase_order.purchase_order.stop_or_unstop_purchase_orders";
listview.page.add_menu_item(__("Set as Stopped"), function() {
listview.page.add_menu_item(__("Close"), function() {
listview.call_for_selected_items(method, {"status": "Closed"});
});
listview.page.add_menu_item(__("Stop"), function() {
listview.call_for_selected_items(method, {"status": "Stopped"});
});
listview.page.add_menu_item(__("Set as Unstopped"), function() {
listview.page.add_menu_item(__("Re-open"), function() {
listview.call_for_selected_items(method, {"status": "Submitted"});
});
}
};

View File

@@ -70,6 +70,20 @@ 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"])
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):
po = frappe.new_doc("Purchase Order")

View File

@@ -19,6 +19,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Item Code",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_code",
"oldfieldtype": "Link",
@@ -44,6 +45,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Supplier Part Number",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 1,
@@ -65,6 +67,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Item Name",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_name",
"oldfieldtype": "Data",
@@ -87,6 +90,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -109,6 +113,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Reqd By Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "schedule_date",
"oldfieldtype": "Date",
@@ -132,6 +137,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -154,6 +160,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"oldfieldname": "description",
"oldfieldtype": "Small Text",
@@ -178,6 +185,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -199,6 +207,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Image",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -221,6 +230,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Image View",
"length": 0,
"no_copy": 0,
"options": "image",
"permlevel": 0,
@@ -244,6 +254,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Quantity and Rate",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -265,6 +276,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Quantity",
"length": 0,
"no_copy": 0,
"oldfieldname": "qty",
"oldfieldtype": "Currency",
@@ -290,6 +302,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Stock UOM",
"length": 0,
"no_copy": 0,
"oldfieldname": "stock_uom",
"oldfieldtype": "Data",
@@ -315,6 +328,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -336,6 +350,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "UOM",
"length": 0,
"no_copy": 0,
"oldfieldname": "uom",
"oldfieldtype": "Link",
@@ -362,6 +377,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "UOM Conversion Factor",
"length": 0,
"no_copy": 0,
"oldfieldname": "conversion_factor",
"oldfieldtype": "Currency",
@@ -386,6 +402,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -407,6 +424,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Price List Rate",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -430,6 +448,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Discount on Price List Rate (%)",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -450,6 +469,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -471,6 +491,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Price List Rate (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -492,6 +513,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -513,6 +535,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Rate ",
"length": 0,
"no_copy": 0,
"oldfieldname": "import_rate",
"oldfieldtype": "Currency",
@@ -537,6 +560,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Amount",
"length": 0,
"no_copy": 0,
"oldfieldname": "import_amount",
"oldfieldtype": "Currency",
@@ -560,6 +584,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -581,6 +606,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Rate (Company Currency)",
"length": 0,
"no_copy": 0,
"oldfieldname": "purchase_rate",
"oldfieldtype": "Currency",
@@ -607,6 +633,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Amount (Company Currency)",
"length": 0,
"no_copy": 0,
"oldfieldname": "amount",
"oldfieldtype": "Currency",
@@ -631,6 +658,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Pricing Rule",
"length": 0,
"no_copy": 0,
"options": "Pricing Rule",
"permlevel": 0,
@@ -652,6 +680,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -674,6 +703,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Net Rate",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -697,6 +727,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Net Amount",
"length": 0,
"no_copy": 0,
"options": "currency",
"permlevel": 0,
@@ -719,6 +750,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -741,6 +773,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Net Rate (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -764,6 +797,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Net Amount (Company Currency)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -787,6 +821,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Warehouse and Reference",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -808,6 +843,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Warehouse",
"length": 0,
"no_copy": 0,
"oldfieldname": "warehouse",
"oldfieldtype": "Link",
@@ -832,6 +868,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Project Name",
"length": 0,
"no_copy": 0,
"options": "Project",
"permlevel": 0,
@@ -848,15 +885,17 @@
"bold": 0,
"collapsible": 0,
"fieldname": "prevdoc_doctype",
"fieldtype": "Data",
"fieldtype": "Link",
"hidden": 1,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Prevdoc DocType",
"label": "Reference Document Type",
"length": 0,
"no_copy": 1,
"oldfieldname": "prevdoc_doctype",
"oldfieldtype": "Data",
"options": "DocType",
"permlevel": 0,
"print_hide": 1,
"read_only": 1,
@@ -871,16 +910,17 @@
"bold": 0,
"collapsible": 0,
"fieldname": "prevdoc_docname",
"fieldtype": "Link",
"fieldtype": "Dynamic Link",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Material Request No",
"label": "Reference Name",
"length": 0,
"no_copy": 1,
"oldfieldname": "prevdoc_docname",
"oldfieldtype": "Link",
"options": "Material Request",
"options": "prevdoc_doctype",
"permlevel": 0,
"print_hide": 1,
"print_width": "120px",
@@ -903,6 +943,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Material Request Detail No",
"length": 0,
"no_copy": 1,
"oldfieldname": "prevdoc_detail_docname",
"oldfieldtype": "Data",
@@ -926,6 +967,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Supplier Quotation",
"length": 0,
"no_copy": 1,
"options": "Supplier Quotation",
"permlevel": 0,
@@ -948,6 +990,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Supplier Quotation Item",
"length": 0,
"no_copy": 1,
"options": "Supplier Quotation Item",
"permlevel": 0,
@@ -959,6 +1002,29 @@
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "delivered_by_supplier",
"fieldtype": "Check",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "To be delivered to customer",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
"print_hide": 1,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
@@ -969,6 +1035,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -991,6 +1058,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Item Group",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_group",
"oldfieldtype": "Link",
@@ -1015,6 +1083,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Brand",
"length": 0,
"no_copy": 0,
"oldfieldname": "brand",
"oldfieldtype": "Link",
@@ -1039,6 +1108,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "BOM",
"length": 0,
"no_copy": 1,
"options": "BOM",
"permlevel": 0,
@@ -1062,6 +1132,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Qty as per Stock UOM",
"length": 0,
"no_copy": 1,
"oldfieldname": "stock_qty",
"oldfieldtype": "Currency",
@@ -1087,6 +1158,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Received Qty",
"length": 0,
"no_copy": 1,
"oldfieldname": "received_qty",
"oldfieldtype": "Currency",
@@ -1111,6 +1183,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Returned Qty",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
@@ -1133,6 +1206,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Billed Amt",
"length": 0,
"no_copy": 1,
"options": "currency",
"permlevel": 0,
@@ -1156,6 +1230,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Item Tax Rate",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_tax_rate",
"oldfieldtype": "Small Text",
@@ -1179,6 +1254,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Page Break",
"length": 0,
"no_copy": 1,
"oldfieldname": "page_break",
"oldfieldtype": "Check",
@@ -1200,7 +1276,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-19 03:04:51.773011",
"max_attachments": 0,
"modified": "2015-11-19 02:53:19.301428",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order Item",

View File

@@ -18,6 +18,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Item Code",
"length": 0,
"no_copy": 0,
"oldfieldname": "main_item_code",
"oldfieldtype": "Data",
@@ -41,6 +42,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Raw Material Item Code",
"length": 0,
"no_copy": 0,
"oldfieldname": "rm_item_code",
"oldfieldtype": "Data",
@@ -64,6 +66,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Supplied Qty",
"length": 0,
"no_copy": 0,
"oldfieldname": "required_qty",
"oldfieldtype": "Currency",
@@ -87,6 +90,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Rate",
"length": 0,
"no_copy": 0,
"oldfieldname": "rate",
"oldfieldtype": "Currency",
@@ -111,6 +115,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
"oldfieldname": "amount",
"oldfieldtype": "Currency",
@@ -135,6 +140,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "BOM Detail No",
"length": 0,
"no_copy": 0,
"oldfieldname": "bom_detail_no",
"oldfieldtype": "Data",
@@ -158,6 +164,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Reference Name",
"length": 0,
"no_copy": 0,
"oldfieldname": "reference_name",
"oldfieldtype": "Data",
@@ -181,6 +188,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Conversion Factor",
"length": 0,
"no_copy": 0,
"oldfieldname": "conversion_factor",
"oldfieldtype": "Currency",
@@ -204,6 +212,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Stock Uom",
"length": 0,
"no_copy": 0,
"oldfieldname": "stock_uom",
"oldfieldtype": "Data",
@@ -226,7 +235,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:39:05.021801",
"max_attachments": 0,
"modified": "2015-11-16 06:29:54.025077",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Order Item Supplied",

View File

@@ -18,6 +18,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Item Code",
"length": 0,
"no_copy": 0,
"oldfieldname": "main_item_code",
"oldfieldtype": "Data",
@@ -41,6 +42,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Raw Material Item Code",
"length": 0,
"no_copy": 0,
"oldfieldname": "rm_item_code",
"oldfieldtype": "Data",
@@ -64,6 +66,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Description",
"length": 0,
"no_copy": 0,
"oldfieldname": "description",
"oldfieldtype": "Data",
@@ -89,6 +92,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Batch No",
"length": 0,
"no_copy": 1,
"options": "Batch",
"permlevel": 0,
@@ -111,6 +115,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Serial No",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
@@ -131,6 +136,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -152,6 +158,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Required Qty",
"length": 0,
"no_copy": 0,
"oldfieldname": "required_qty",
"oldfieldtype": "Currency",
@@ -175,6 +182,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Consumed Qty",
"length": 0,
"no_copy": 0,
"oldfieldname": "consumed_qty",
"oldfieldtype": "Currency",
@@ -198,6 +206,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Stock Uom",
"length": 0,
"no_copy": 0,
"oldfieldname": "stock_uom",
"oldfieldtype": "Data",
@@ -222,6 +231,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Rate",
"length": 0,
"no_copy": 0,
"oldfieldname": "rate",
"oldfieldtype": "Currency",
@@ -246,6 +256,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Amount",
"length": 0,
"no_copy": 0,
"oldfieldname": "amount",
"oldfieldtype": "Currency",
@@ -270,6 +281,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Conversion Factor",
"length": 0,
"no_copy": 0,
"oldfieldname": "conversion_factor",
"oldfieldtype": "Currency",
@@ -293,6 +305,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Current Stock",
"length": 0,
"no_copy": 0,
"oldfieldname": "current_stock",
"oldfieldtype": "Currency",
@@ -316,6 +329,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Reference Name",
"length": 0,
"no_copy": 0,
"oldfieldname": "reference_name",
"oldfieldtype": "Data",
@@ -339,6 +353,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "BOM Detail No",
"length": 0,
"no_copy": 0,
"oldfieldname": "bom_detail_no",
"oldfieldtype": "Data",
@@ -360,7 +375,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:39:06.224300",
"max_attachments": 0,
"modified": "2015-11-16 06:29:54.573531",
"modified_by": "Administrator",
"module": "Buying",
"name": "Purchase Receipt Item Supplied",

View File

@@ -18,7 +18,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Series",
"label": "Series",
"length": 0,
"no_copy": 1,
"options": "QI-",
"permlevel": 0,
@@ -42,6 +43,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Report Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "report_date",
"oldfieldtype": "Date",
@@ -64,6 +66,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -85,7 +88,8 @@
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Inspection Type",
"label": "Inspection Type",
"length": 0,
"no_copy": 0,
"oldfieldname": "inspection_type",
"oldfieldtype": "Select",
@@ -110,6 +114,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Purchase Receipt No",
"length": 0,
"no_copy": 0,
"oldfieldname": "purchase_receipt_no",
"oldfieldtype": "Link",
@@ -134,6 +139,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Delivery Note No",
"length": 0,
"no_copy": 0,
"oldfieldname": "delivery_note_no",
"oldfieldtype": "Link",
@@ -157,6 +163,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -179,6 +186,7 @@
"in_filter": 1,
"in_list_view": 1,
"label": "Item Code",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_code",
"oldfieldtype": "Link",
@@ -203,6 +211,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Item Serial No",
"length": 0,
"no_copy": 0,
"oldfieldname": "item_serial_no",
"oldfieldtype": "Link",
@@ -227,6 +236,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Batch No",
"length": 0,
"no_copy": 0,
"oldfieldname": "batch_no",
"oldfieldtype": "Link",
@@ -251,6 +261,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Sample Size",
"length": 0,
"no_copy": 0,
"oldfieldname": "sample_size",
"oldfieldtype": "Currency",
@@ -273,6 +284,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
@@ -296,6 +308,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Item Name",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -318,6 +331,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"oldfieldname": "description",
"oldfieldtype": "Small Text",
@@ -341,6 +355,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -364,6 +379,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Inspected By",
"length": 0,
"no_copy": 0,
"oldfieldname": "inspected_by",
"oldfieldtype": "Data",
@@ -388,6 +404,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Verified By",
"length": 0,
"no_copy": 0,
"oldfieldname": "verified_by",
"oldfieldtype": "Data",
@@ -410,6 +427,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -432,6 +450,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Remarks",
"length": 0,
"no_copy": 1,
"oldfieldname": "remarks",
"oldfieldtype": "Text",
@@ -455,6 +474,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"oldfieldname": "amended_from",
"oldfieldtype": "Data",
@@ -479,6 +499,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"options": "Simple",
@@ -502,6 +523,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Get Specification Details",
"length": 0,
"no_copy": 0,
"options": "get_item_specification_details",
"permlevel": 0,
@@ -524,6 +546,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Readings",
"length": 0,
"no_copy": 0,
"oldfieldname": "qa_specification_details",
"oldfieldtype": "Table",
@@ -547,7 +570,8 @@
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:39:06.674821",
"max_attachments": 0,
"modified": "2015-11-16 06:29:54.786379",
"modified_by": "Administrator",
"module": "Buying",
"name": "Quality Inspection",

View File

@@ -19,6 +19,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Parameter",
"length": 0,
"no_copy": 0,
"oldfieldname": "specification",
"oldfieldtype": "Data",
@@ -42,6 +43,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Acceptance Criteria",
"length": 0,
"no_copy": 0,
"oldfieldname": "value",
"oldfieldtype": "Data",
@@ -65,6 +67,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Reading 1",
"length": 0,
"no_copy": 0,
"oldfieldname": "reading_1",
"oldfieldtype": "Data",
@@ -88,6 +91,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Reading 2",
"length": 0,
"no_copy": 0,
"oldfieldname": "reading_2",
"oldfieldtype": "Data",
@@ -111,6 +115,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Reading 3",
"length": 0,
"no_copy": 0,
"oldfieldname": "reading_3",
"oldfieldtype": "Data",
@@ -134,6 +139,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Reading 4",
"length": 0,
"no_copy": 0,
"oldfieldname": "reading_4",
"oldfieldtype": "Data",
@@ -157,6 +163,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Reading 5",
"length": 0,
"no_copy": 0,
"oldfieldname": "reading_5",
"oldfieldtype": "Data",
@@ -180,6 +187,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Reading 6",
"length": 0,
"no_copy": 0,
"oldfieldname": "reading_6",
"oldfieldtype": "Data",
@@ -203,6 +211,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Reading 7",
"length": 0,
"no_copy": 0,
"oldfieldname": "reading_7",
"oldfieldtype": "Data",
@@ -226,6 +235,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Reading 8",
"length": 0,
"no_copy": 0,
"oldfieldname": "reading_8",
"oldfieldtype": "Data",
@@ -249,6 +259,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Reading 9",
"length": 0,
"no_copy": 0,
"oldfieldname": "reading_9",
"oldfieldtype": "Data",
@@ -272,6 +283,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Reading 10",
"length": 0,
"no_copy": 0,
"oldfieldname": "reading_10",
"oldfieldtype": "Data",
@@ -295,7 +307,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Status",
"label": "Status",
"length": 0,
"no_copy": 0,
"oldfieldname": "status",
"oldfieldtype": "Select",
@@ -318,7 +331,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:39:06.876419",
"max_attachments": 0,
"modified": "2015-11-16 06:29:54.873250",
"modified_by": "Administrator",
"module": "Buying",
"name": "Quality Inspection Reading",

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