Merge branch 'develop'
diff --git a/accounts/Print Format/POS Invoice/POS Invoice.txt b/accounts/Print Format/POS Invoice/POS Invoice.txt
index aab8e18..7f1bba4 100644
--- a/accounts/Print Format/POS Invoice/POS Invoice.txt
+++ b/accounts/Print Format/POS Invoice/POS Invoice.txt
@@ -2,14 +2,14 @@
{
"creation": "2011-12-21 11:08:55",
"docstatus": 0,
- "modified": "2013-09-13 17:17:47",
+ "modified": "2014-01-08 19:32:16",
"modified_by": "Administrator",
"owner": "Administrator"
},
{
"doc_type": "Sales Invoice",
"doctype": "Print Format",
- "html": "<html>\n<head>\n<!--Item Table, Totals and Other Charges-->\n<script>\nfunction get_print_format() {\n var oc = getchildren('Sales Invoice Item', doc.name, 'entries');\n\tvar rows = '<table width=\"100%\" cellpadding=\"0\" class=\"cart\">\\\n <tr>\\\n <td colspan=\"3\"><hr></td>\\\n </tr>\\\n <tr>\\\n <td width=\"60%\" align=\"left\">ITEM NAME.</td>\\\n <td width=\"10%\" align=\"right\">QTY</td>\\\n <td width=\"30%\" align=\"right\">AMOUNT</td>\\\n </tr>\\\n <tr>\\\n <td colspan=\"3\"><hr></td>\\\n </tr>';\n\tfor (var x=0; x<oc.length; x++) {\n console.log(oc[x].item_code!=oc[x].item_name);\n\t\trows += '<tr>\\\n <td align=\"left\">' + oc[x].item_code + \n (oc[x].item_code!=oc[x].item_name ? ('<br>' + oc[x].item_name) : '') + '</td>\\\n <td align=\"right\" style=\"vertical-align:top;\">' + oc[x].qty + '</td>\\\n <td align=\"right\" valign=\"top\">' + format_currency(oc[x].export_amount, doc.currency) + '</td>\\\n </tr>';\n\t}\n rows += '<tr>\\\n <td colspan=\"3\"><hr></td>\\\n </tr>\\\n <tr>\\\n <td colspan=\"2\" align=\"right\">Net Total</td>\\\n <td align=\"right\">' + format_currency(doc.net_total_export, doc.currency) + '</td>\\\n </tr>';\n if (doc.other_charges_total_export != 0) {\n var taxes = wn.model.get_children(\"Sales Taxes and Charges\", doc.name, \"other_charges\", \"Sales Invoice\");\n\t\t$.each(taxes, function(i, d) {\n\t\t\trows += '<tr>\\\n \t\t\t\t<td colspan=\"2\" align=\"right\">' + d.description + '</td>\\\n \t\t\t\t<td style=\"text-align: right;\">' + format_currency(d.tax_amount / doc.conversion_rate, doc.currency) + '</td>\\\n \t\t\t<tr>';\n\t\t});\n }\n rows += '<tr>\\\n <td colspan=\"2\" align=\"right\" style=\"vertical-align:middle;\">Grand Total</td>\\\n <td align=\"right\"><hr width=\"90%\" align=\"right\">' + format_currency(doc.grand_total_export, doc.currency) + '<br>\\\n <hr width=\"90%\" align=\"right\"></td>\\\n </tr>\\\n <tr>\\\n <td align=\"center\" colspan=\"3\">Thank You. Please visit again.</td>\\\n </tr>\\\n </table>';\n\treturn rows;\n}\n</script>\n<style>\n table, tr, td, div, p {\n font-family: Monospace;\n line-height: 200%;\n }\n h1, h2, h3, h4, h5, h6 {\n text-align: center;\n }\n\t@media screen {\n\t\tbody {\n\t\t\twidth: 4in;\n\t\t}\n\t}\n</style>\n</head>\n\n<body>\n<table width=\"100%\" cellpadding=\"4\">\n <tr>\n <td align=\"left\">RECEIPT NO: <script>doc.name</script></td>\n <td align=\"right\">DATE: <script>date.str_to_user(doc.posting_date)</script></td>\n </tr>\n <tr>\n <td>M/s <script>doc.customer</script></td>\n </tr>\n</table>\n<!--Item Table & Totals-->\n<div><script>get_print_format();</script></div>\n</body>\n</html>\n",
+ "html": "<html>\n\t<head>\n\n\t\t<!-- Style Settings -->\n\t\t<style>\n\t\t\ttable, tr, td, div, p {\n\t\t\t\tfont-family: Monospace;\n\t\t\t\tline-height: 200%;\n\t\t\t\tvertical-align: middle;\n\t\t\t}\n\t\t\t@media screen {\n\t\t\t\tbody {\n\t\t\t\t\twidth: 4in;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\n\t\t<!-- Javascript -->\n\t\t<script>\n\t\t\tfunction print_header() {\n\t\t\t\tvar header = '<table width=\"100%\" cellpadding=\"4\">';\n\n\t\t\t\theader += '<tr>\\\n\t\t\t\t\t<td colspan=\"2\" align=\"center\"><h3>' + (doc.select_print_heading || \"Invoice\") + '</h3></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\theader += '<tr>\\\n\t\t\t\t\t<td align=\"left\"><b>RECEIPT NO:</b> ' + doc.name + '</td>\\\n\t\t\t\t\t<td align=\"right\"><b>DATE:</b> ' + date.str_to_user(doc.posting_date) + '</td>\\\n\t\t\t\t</tr>\\\n\t\t\t\t<tr>\\\n\t\t\t\t\t<td colspan=\"2\"><b>M/s.</b> ' + doc.customer + '</td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn header + '</table>';\n\t\t\t}\n\n\t\t\tfunction print_items() {\n\t\t\t\tvar rows = '<table width=\"100%\" cellpadding=\"0\" class=\"cart\">';\n\n\t\t\t\trows += '<tr>\\\n\t\t\t\t\t<td colspan=\"3\"><hr></td>\\\n\t\t\t\t</tr>\\\n\t\t\t\t<tr>\\\n\t\t\t\t\t<td width=\"60%\" align=\"left\"><b>ITEM CODE / DESC.</b></td>\\\n\t\t\t\t\t<td width=\"10%\" align=\"right\"><b>QTY</b></td>\\\n\t\t\t\t\t<td width=\"30%\" align=\"right\"><b>RATE</b></td>\\\n\t\t\t\t</tr>\\\n\t\t\t\t<tr>\\\n\t\t\t\t\t<td colspan=\"3\"><hr></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\t// print items\n\t\t\t\tvar oc = getchildren('Sales Invoice Item', doc.name, 'entries');\n\t\t\t\tfor (var x=0; x<oc.length; x++) {\n\t\t\t\t\trows += '<tr>\\\n\t\t\t\t\t\t<td align=\"left\">' + oc[x].item_code + '<br>' + oc[x].item_name + '</td>\\\n\t\t\t\t\t\t<td align=\"right\" style=\"vertical-align:top;\">' + oc[x].qty + '</td>\\\n\t\t\t\t\t\t<td align=\"right\" style=\"vertical-align:top;\">' + format_currency(oc[x].export_amount) + '</td>\\\n\t\t\t\t\t</tr>';\n\t\t\t\t}\n\n\t\t\t\trows += '<tr>\\\n\t\t\t\t\t<td colspan=\"3\"><hr></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn rows + '</table>';\n\t\t\t}\n\n\t\t\tfunction print_other_charges_and_totals() {\n\t\t\t\tvar totals = '<table width=\"100%\">';\n\t\t\t\t// print net total\n\t\t\t\ttotals +='<tr>\\\n\t\t\t\t\t<td align=\"right\" width=\"70%\">Net Total</td>\\\n\t\t\t\t\t<td align=\"right\">' + format_currency(doc.net_total_export) + '</td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\t// print exclusive taxes\n\t\t\t\tvar taxes = wn.model.get_children(\"Sales Taxes and Charges\", doc.name, \"other_charges\", \"Sales Invoice\");\n\t\t\t\tif (taxes) {\n\t\t\t\t\t$.each(taxes, function(i, d) {\n\t\t\t\t\t\tif (!d.included_in_print_rate && d.tax_amount) {\n\t\t\t\t\t\t\ttotals += '<tr>\\\n\t\t\t\t\t\t\t\t<td align=\"right\">' + d.description + '</td>\\\n\t\t\t\t\t\t\t\t<td align=\"right\">' + format_currency(d.tax_amount) + '</td>\\\n\t\t\t\t\t\t\t<tr>';\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\t// print grand total\n\t\t\t\ttotals += '<tr>\\\n\t\t\t\t\t<td align=\"right\">Grand Total</td>\\\n\t\t\t\t\t<td align=\"right\"><hr width=\"90%\" align=\"right\">' + format_currency(doc.grand_total_export) + '<br>\\\n\t\t\t\t\t<hr width=\"90%\" align=\"right\"></td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn totals + '</table>';\n\t\t\t}\n\n\t\t\tfunction print_inclusive_taxes() {\n\t\t\t\tvar inc_tax = '';\n\t\t\t\tvar taxes = wn.model.get_children(\"Sales Taxes and Charges\", doc.name, \"other_charges\", \"Sales Invoice\");\n\t\t\t\tif (taxes) {\n\t\t\t\t\t$.each(taxes, function(i, d) {\n\t\t\t\t\t\tif (d.included_in_print_rate && d.tax_amount) {\n\t\t\t\t\t\t\tif (i == 0) {\n\t\t\t\t\t\t\t\tinc_tax = '<table width=\"100%\">\\\n\t\t\t\t\t\t\t\t\t<tr>\\\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\"><b>Inclusive Taxes</b></td>\\\n\t\t\t\t\t\t\t\t\t</tr>';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tinc_tax += '<tr>\\\n\t\t\t\t\t\t\t\t<td width=\"60%\">' + d.description + '</td>\\\n\t\t\t\t\t\t\t\t<td>' + format_currency(d.tax_amount) + '</td>\\\n\t\t\t\t\t\t\t<tr>';\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (inc_tax) {\n\t\t\t\t\tinc_tax += '<tr>\\\n\t\t\t\t\t\t<td colspan=\"2\"><hr></td>\\\n\t\t\t\t\t</tr></table>';\n\t\t\t\t}\n\n\t\t\t\treturn inc_tax;\n\t\t\t}\n\n\t\t\tfunction print_footer() {\n\t\t\t\tvar footer = '<table width=\"100%\">';\n\n\t\t\t\t// print terms\n\t\t\t\tif (doc.terms) {\n\t\t\t\t\tfooter += '<tr>\\\n\t\t\t\t\t\t<td align=\"center\">' + doc.terms + '</td>\\\n\t\t\t\t\t</tr>';\n\t\t\t\t}\n\n\t\t\t\tfooter +='<tr>\\\n\t\t\t\t\t<td align=\"center\">Thank You. Please visit again.</td>\\\n\t\t\t\t</tr>';\n\n\t\t\t\treturn footer + '</table>';\n\t\t\t}\n\t\t</script>\n\t</head>\n\n\t<body>\n\t\t<!--Headers, Item Table, Totals & Footer-->\n\t\t<div><script>print_header();</script></div>\n\t\t<div><script>print_items();</script></div>\n\t\t<div><script>print_inclusive_taxes();</script></div>\n\t\t<div><script>print_other_charges_and_totals();</script></div>\n\t\t<div><script>print_footer();</script></div>\n\t</body>\n</html>",
"module": "Accounts",
"name": "__common__",
"print_format_type": "Client",
diff --git a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py
index dea5fb5..fc58418 100644
--- a/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py
+++ b/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.py
@@ -140,13 +140,13 @@
and ifnull(gle.%(account_type)s, 0) > 0
and (select ifnull(abs(sum(ifnull(debit, 0)) - sum(ifnull(credit, 0))), 0)
from `tabGL Entry`
- where against_voucher_type = '%(dt)s'
+ where account = '%(acc)s'
+ and against_voucher_type = '%(dt)s'
and against_voucher = gle.voucher_no
and voucher_no != gle.voucher_no)
- != abs(ifnull(gle.debit, 0) - ifnull(gle.credit, 0)
- )
- and if(gle.voucher_type='Sales Invoice', (select is_pos from `tabSales Invoice`
- where name=gle.voucher_no), 0)=0
+ != abs(ifnull(gle.debit, 0) - ifnull(gle.credit, 0))
+ and if(gle.voucher_type='Sales Invoice', ifnull((select is_pos from `tabSales Invoice`
+ where name=gle.voucher_no), 0), 0)=0
%(mcond)s
ORDER BY gle.posting_date desc, gle.voucher_no desc
limit %(start)s, %(page_len)s""" % {
diff --git a/accounts/doctype/pos_setting/pos_setting.js b/accounts/doctype/pos_setting/pos_setting.js
index 8c5f254..dc13bb5 100755
--- a/accounts/doctype/pos_setting/pos_setting.js
+++ b/accounts/doctype/pos_setting/pos_setting.js
@@ -7,7 +7,7 @@
});
cur_frm.set_query("selling_price_list", function() {
- return { filters: { buying_or_selling: "Selling" } };
+ return { filters: { selling: 1 } };
});
}
diff --git a/accounts/report/accounts_receivable/accounts_receivable.py b/accounts/report/accounts_receivable/accounts_receivable.py
index 781db2a..35c1f74 100644
--- a/accounts/report/accounts_receivable/accounts_receivable.py
+++ b/accounts/report/accounts_receivable/accounts_receivable.py
@@ -78,15 +78,23 @@
if getdate(e.posting_date) <= report_date)
def is_receivable(self, gle, future_vouchers):
- return ((not gle.against_voucher) or (gle.against_voucher==gle.voucher_no) or
- ((gle.against_voucher_type, gle.against_voucher) in future_vouchers))
+ return (
+ # advance
+ (not gle.against_voucher) or
+
+ # sales invoice
+ (gle.against_voucher==gle.voucher_no and gle.debit > 0) or
+
+ # entries adjusted with future vouchers
+ ((gle.against_voucher_type, gle.against_voucher) in future_vouchers)
+ )
def get_outstanding_amount(self, gle, report_date):
payment_received = 0.0
for e in self.get_gl_entries_for(gle.account, gle.voucher_type, gle.voucher_no):
if getdate(e.posting_date) <= report_date and e.name!=gle.name:
payment_received += (flt(e.credit) - flt(e.debit))
-
+
return flt(gle.debit) - flt(gle.credit) - payment_received
def get_customer(self, account):
@@ -180,4 +188,4 @@
if index is None: index = 3
outstanding_range[index] = outstanding_amount
- return [age] + outstanding_range
\ No newline at end of file
+ return [age] + outstanding_range
diff --git a/accounts/report/general_ledger/general_ledger.py b/accounts/report/general_ledger/general_ledger.py
index 855b7d1..2f5716e 100644
--- a/accounts/report/general_ledger/general_ledger.py
+++ b/accounts/report/general_ledger/general_ledger.py
@@ -72,6 +72,11 @@
if filters.get("voucher_no"):
conditions.append("voucher_no=%(voucher_no)s")
+
+
+ from webnotes.widgets.reportview import build_match_conditions
+ match_conditions = build_match_conditions("GL Entry")
+ if match_conditions: conditions.append(match_conditions)
return "and {}".format(" and ".join(conditions)) if conditions else ""
diff --git a/buying/doctype/purchase_common/purchase_common.js b/buying/doctype/purchase_common/purchase_common.js
index 9661f6e..14b8279 100644
--- a/buying/doctype/purchase_common/purchase_common.js
+++ b/buying/doctype/purchase_common/purchase_common.js
@@ -22,7 +22,7 @@
if(this.frm.fields_dict.buying_price_list) {
this.frm.set_query("buying_price_list", function() {
return{
- filters: { 'buying_or_selling': "Buying" }
+ filters: { 'buying': 1 }
}
});
}
diff --git a/buying/doctype/supplier/supplier.js b/buying/doctype/supplier/supplier.js
index 0618616..ec4d3e6 100644
--- a/buying/doctype/supplier/supplier.js
+++ b/buying/doctype/supplier/supplier.js
@@ -95,6 +95,6 @@
cur_frm.fields_dict['default_price_list'].get_query = function(doc,cdt,cdn) {
return{
- filters:{'buying_or_selling': "Buying"}
+ filters:{'buying': 1}
}
}
\ No newline at end of file
diff --git a/buying/utils.py b/buying/utils.py
index 0d9c8fa..35d89c5 100644
--- a/buying/utils.py
+++ b/buying/utils.py
@@ -3,7 +3,7 @@
from __future__ import unicode_literals
import webnotes
-from webnotes import msgprint, _
+from webnotes import msgprint, _, throw
from webnotes.utils import getdate, flt, add_days, cstr
import json
@@ -90,7 +90,7 @@
# try fetching from price list
if args.buying_price_list and args.price_list_currency:
price_list_rate = webnotes.conn.sql("""select ref_rate from `tabItem Price`
- where price_list=%s and item_code=%s and buying_or_selling='Buying'""",
+ where price_list=%s and item_code=%s and buying=1""",
(args.buying_price_list, args.item_code), as_dict=1)
if price_list_rate:
@@ -122,14 +122,12 @@
# validate if purchase item or subcontracted item
if item.is_purchase_item != "Yes":
- msgprint(_("Item") + (" %s: " % item.name) + _("not a purchase item"),
- raise_exception=True)
+ throw(_("Item") + (" %s: " % item.name) + _("not a purchase item"))
if args.is_subcontracted == "Yes" and item.is_sub_contracted_item != "Yes":
- msgprint(_("Item") + (" %s: " % item.name) +
+ throw(_("Item") + (" %s: " % item.name) +
_("not a sub-contracted item.") +
- _("Please select a sub-contracted item or do not sub-contract the transaction."),
- raise_exception=True)
+ _("Please select a sub-contracted item or do not sub-contract the transaction."))
def get_last_purchase_details(item_code, doc_name=None, conversion_rate=1.0):
"""returns last purchase details in stock uom"""
diff --git a/config.json b/config.json
index d88d224..65fa55c 100644
--- a/config.json
+++ b/config.json
@@ -1,6 +1,6 @@
{
"app_name": "ERPNext",
- "app_version": "3.4.9",
+ "app_version": "3.5.0",
"base_template": "app/portal/templates/base.html",
"modules": {
"Accounts": {
@@ -74,5 +74,5 @@
"type": "module"
}
},
- "requires_framework_version": "==3.4.4"
+ "requires_framework_version": "==3.5.0"
}
\ No newline at end of file
diff --git a/controllers/accounts_controller.py b/controllers/accounts_controller.py
index 839dce0..a65bf26 100644
--- a/controllers/accounts_controller.py
+++ b/controllers/accounts_controller.py
@@ -3,7 +3,7 @@
from __future__ import unicode_literals
import webnotes
-from webnotes import _, msgprint
+from webnotes import _, msgprint, throw
from webnotes.utils import flt, cint, today, cstr
from webnotes.model.code import get_obj
from setup.utils import get_company_currency
@@ -50,8 +50,8 @@
if accounts:
if not filter(lambda x: cstr(x.freeze_account) in ["", "No"], accounts):
- msgprint(_("Account for this ") + fieldname + _(" has been freezed. ") +
- self.doc.doctype + _(" can not be made."), raise_exception=1)
+ throw(_("Account for this ") + fieldname + _(" has been freezed. ") +
+ self.doc.doctype + _(" can not be made."))
def set_price_list_currency(self, buying_or_selling):
if self.meta.get_field("currency"):
@@ -179,17 +179,17 @@
"""
if tax.charge_type in ["On Previous Row Amount", "On Previous Row Total"] and \
(not tax.row_id or cint(tax.row_id) >= tax.idx):
- msgprint((_("Row") + " # %(idx)s [%(taxes_doctype)s]: " + \
+ throw((_("Row") + " # %(idx)s [%(taxes_doctype)s]: " + \
_("Please specify a valid") + " %(row_id_label)s") % {
"idx": tax.idx,
"taxes_doctype": tax.doctype,
"row_id_label": self.meta.get_label("row_id",
parentfield=self.other_fname)
- }, raise_exception=True)
+ })
def validate_inclusive_tax(self, tax):
def _on_previous_row_error(row_range):
- msgprint((_("Row") + " # %(idx)s [%(doctype)s]: " +
+ throw((_("Row") + " # %(idx)s [%(doctype)s]: " +
_("to be included in Item's rate, it is required that: ") +
" [" + _("Row") + " # %(row_range)s] " + _("also be included in Item's rate")) % {
"idx": tax.idx,
@@ -200,12 +200,12 @@
parentfield=self.other_fname),
"charge_type": tax.charge_type,
"row_range": row_range
- }, raise_exception=True)
+ })
if cint(tax.included_in_print_rate):
if tax.charge_type == "Actual":
# inclusive tax cannot be of type Actual
- msgprint((_("Row")
+ throw((_("Row")
+ " # %(idx)s [%(doctype)s]: %(charge_type_label)s = \"%(charge_type)s\" "
+ "cannot be included in Item's rate") % {
"idx": tax.idx,
@@ -213,7 +213,7 @@
"charge_type_label": self.meta.get_label("charge_type",
parentfield=self.other_fname),
"charge_type": tax.charge_type,
- }, raise_exception=True)
+ })
elif tax.charge_type == "On Previous Row Amount" and \
not cint(self.tax_doclist[tax.row_id - 1].included_in_print_rate):
# referred row should also be inclusive
diff --git a/patches/1401/__init__.py b/patches/1401/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/patches/1401/__init__.py
diff --git a/patches/1401/p01_make_buying_selling_as_check_box_in_price_list.py b/patches/1401/p01_make_buying_selling_as_check_box_in_price_list.py
new file mode 100644
index 0000000..b764a7f
--- /dev/null
+++ b/patches/1401/p01_make_buying_selling_as_check_box_in_price_list.py
@@ -0,0 +1,29 @@
+# Copyright (c) 2014, Web Notes Technologies Pvt. Ltd. and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import webnotes
+
+def execute():
+ webnotes.reload_doc("stock", "doctype", "price_list")
+ webnotes.reload_doc("stock", "doctype", "item_price")
+
+ if "buying_or_selling" in webnotes.conn.get_table_columns("Price List"):
+ webnotes.conn.sql("""update `tabPrice List` set
+ selling =
+ case
+ when buying_or_selling='Selling'
+ then 1
+ end,
+ buying =
+ case
+ when buying_or_selling='Buying'
+ then 1
+ end
+ """)
+ webnotes.conn.sql("""update `tabItem Price` ip, `tabPrice List` pl
+ set ip.buying=pl.buying, ip.selling=pl.selling
+ where ip.price_list=pl.name""")
+
+ webnotes.conn.sql("""update `tabItem Price` set selling=1 where ifnull(selling, 0)=0 and
+ ifnull(buying, 0)=0""")
\ No newline at end of file
diff --git a/patches/june_2013/p03_buying_selling_for_price_list.py b/patches/june_2013/p03_buying_selling_for_price_list.py
index 2f92fe6..15da085 100644
--- a/patches/june_2013/p03_buying_selling_for_price_list.py
+++ b/patches/june_2013/p03_buying_selling_for_price_list.py
@@ -8,20 +8,7 @@
def execute():
webnotes.reload_doc("stock", "doctype", "price_list")
webnotes.reload_doc("stock", "doctype", "item_price")
-
- try:
- for price_list in webnotes.conn.sql_list("""select name from `tabPrice List`"""):
- buying, selling = False, False
- for b, s in webnotes.conn.sql("""select distinct buying, selling
- from `tabItem Price` where price_list_name=%s""", price_list):
- buying = buying or cint(b)
- selling = selling or cint(s)
-
- buying_or_selling = "Selling" if selling else "Buying"
- webnotes.conn.set_value("Price List", price_list, "buying_or_selling", buying_or_selling)
- except webnotes.SQLError, e:
- if e.args[0] == 1054:
- webnotes.conn.sql("""update `tabPrice List` set buying_or_selling='Selling'
- where ifnull(buying_or_selling, '')='' """)
- else:
- raise
\ No newline at end of file
+
+ webnotes.conn.sql("""update `tabPrice List` pl, `tabItem Price` ip
+ set pl.selling=ip.selling, pl.buying=ip.buying
+ where pl.name=ip.price_list_name""")
\ No newline at end of file
diff --git a/patches/october_2013/p02_update_price_list_and_item_details_in_item_price.py b/patches/october_2013/p02_update_price_list_and_item_details_in_item_price.py
index 3b4ca83..b92f7d0 100644
--- a/patches/october_2013/p02_update_price_list_and_item_details_in_item_price.py
+++ b/patches/october_2013/p02_update_price_list_and_item_details_in_item_price.py
@@ -12,9 +12,7 @@
where ip.item_code=i.name""")
webnotes.conn.sql("""update `tabItem Price` ip, `tabPrice List` pl
- set ip.price_list=pl.name, ip.currency=pl.currency,
- ip.buying_or_selling=pl.buying_or_selling
- where ip.parent=pl.name""")
+ set ip.price_list=pl.name, ip.currency=pl.currency where ip.parent=pl.name""")
webnotes.conn.sql("""update `tabItem Price`
set parent=null, parenttype=null, parentfield=null, idx=null""")
\ No newline at end of file
diff --git a/patches/patch_list.py b/patches/patch_list.py
index 608ba77..d291d76 100644
--- a/patches/patch_list.py
+++ b/patches/patch_list.py
@@ -263,4 +263,5 @@
"patches.1311.p08_email_digest_recipients",
"execute:webnotes.delete_doc('DocType', 'Warehouse Type')",
"patches.1312.p02_update_item_details_in_item_price",
+ "patches.1401.p01_make_buying_selling_as_check_box_in_price_list",
]
\ No newline at end of file
diff --git a/public/js/transaction.js b/public/js/transaction.js
index 4c4a810..0fe0535 100644
--- a/public/js/transaction.js
+++ b/public/js/transaction.js
@@ -330,8 +330,7 @@
doctype: tax.doctype,
row_id_label: wn.meta.get_label(tax.doctype, "row_id", tax.name)
});
- msgprint(msg);
- throw msg;
+ wn.throw(msg);
}
},
@@ -347,8 +346,7 @@
charge_type_label: wn.meta.get_label(tax.doctype, "charge_type", tax.name),
charge_type: tax.charge_type
});
- msgprint(msg);
- throw msg;
+ wn.throw(msg);
};
var on_previous_row_error = function(row_range) {
@@ -363,8 +361,7 @@
row_range: row_range,
});
- msgprint(msg);
- throw msg;
+ wn.throw(msg);
};
if(cint(tax.included_in_print_rate)) {
diff --git a/selling/doctype/customer/customer.js b/selling/doctype/customer/customer.js
index 5e0ccc9..5d04690 100644
--- a/selling/doctype/customer/customer.js
+++ b/selling/doctype/customer/customer.js
@@ -122,6 +122,6 @@
cur_frm.fields_dict['default_price_list'].get_query = function(doc,cdt,cdn) {
return{
- filters:{'buying_or_selling': "Selling"}
+ filters:{'selling': 1}
}
}
diff --git a/selling/sales_common.js b/selling/sales_common.js
index dddc2b5..f4f6430 100644
--- a/selling/sales_common.js
+++ b/selling/sales_common.js
@@ -48,7 +48,7 @@
if(this.frm.fields_dict.selling_price_list) {
this.frm.set_query("selling_price_list", function() {
- return { filters: { buying_or_selling: "Selling" } };
+ return { filters: { selling: 1 } };
});
}
diff --git a/selling/utils/__init__.py b/selling/utils/__init__.py
index 5974da7..85c20e8 100644
--- a/selling/utils/__init__.py
+++ b/selling/utils/__init__.py
@@ -3,7 +3,7 @@
from __future__ import unicode_literals
import webnotes
-from webnotes import msgprint, _
+from webnotes import msgprint, _, throw
from webnotes.utils import flt, cint, comma_and
import json
@@ -100,7 +100,7 @@
where name=%s""", serial_no)
if not item_code:
- msgprint(_("No Item found with ") + input_type + ": %s" % (barcode or serial_no), raise_exception=True)
+ throw(_("No Item found with ") + input_type + ": %s" % (barcode or serial_no))
return item_code[0]
@@ -111,14 +111,12 @@
# validate if sales item or service item
if args.order_type == "Maintenance":
if item.is_service_item != "Yes":
- msgprint(_("Item") + (" %s: " % item.name) +
+ throw(_("Item") + (" %s: " % item.name) +
_("not a service item.") +
- _("Please select a service item or change the order type to Sales."),
- raise_exception=True)
+ _("Please select a service item or change the order type to Sales."))
elif item.is_sales_item != "Yes":
- msgprint(_("Item") + (" %s: " % item.name) + _("not a sales item"),
- raise_exception=True)
+ throw(_("Item") + (" %s: " % item.name) + _("not a sales item"))
def _get_basic_details(args, item_bean, warehouse_fieldname):
item = item_bean.doc
@@ -147,7 +145,7 @@
def _get_price_list_rate(args, item_bean, meta):
ref_rate = webnotes.conn.sql("""select ref_rate from `tabItem Price`
- where price_list=%s and item_code=%s and buying_or_selling='Selling'""",
+ where price_list=%s and item_code=%s and selling=1""",
(args.selling_price_list, args.item_code), as_dict=1)
if not ref_rate:
diff --git a/setup/page/setup_wizard/setup_wizard.py b/setup/page/setup_wizard/setup_wizard.py
index c1d3571..ededd47 100644
--- a/setup/page/setup_wizard/setup_wizard.py
+++ b/setup/page/setup_wizard/setup_wizard.py
@@ -98,7 +98,8 @@
{
"doctype": "Price List",
"price_list_name": "Standard " + pl_type,
- "buying_or_selling": pl_type,
+ "buying": 1 if pl_type == "Buying" else 0,
+ "selling": 1 if pl_type == "Selling" else 0,
"currency": args["currency"]
},
{
diff --git a/startup/schedule_handlers.py b/startup/schedule_handlers.py
index 252a091..0cf0602 100644
--- a/startup/schedule_handlers.py
+++ b/startup/schedule_handlers.py
@@ -53,6 +53,10 @@
# email digest
from setup.doctype.email_digest.email_digest import send
run_fn(send)
+
+ # auto close support tickets
+ from support.doctype.support_ticket.support_ticket import auto_close_tickets
+ run_fn(auto_close_tickets)
def execute_weekly():
from setup.doctype.backup_manager.backup_manager import take_backups_weekly
diff --git a/stock/doctype/item_price/item_price.js b/stock/doctype/item_price/item_price.js
index bece26c..9f38fdb 100644
--- a/stock/doctype/item_price/item_price.js
+++ b/stock/doctype/item_price/item_price.js
@@ -2,11 +2,10 @@
// License: GNU General Public License v3. See license.txt
$.extend(cur_frm.cscript, {
-
onload: function () {
-
// Fetch price list details
- cur_frm.add_fetch("price_list", "buying_or_selling", "buying_or_selling");
+ cur_frm.add_fetch("price_list", "buying", "buying");
+ cur_frm.add_fetch("price_list", "selling", "selling");
cur_frm.add_fetch("price_list", "currency", "currency");
// Fetch item details
diff --git a/stock/doctype/item_price/item_price.py b/stock/doctype/item_price/item_price.py
index 072d700..e2c9f2f 100644
--- a/stock/doctype/item_price/item_price.py
+++ b/stock/doctype/item_price/item_price.py
@@ -1,7 +1,5 @@
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
-# MIT License. See license.txt
-
-# For license information, please see license.txt
+# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
@@ -19,8 +17,8 @@
self.update_item_details()
def update_price_list_details(self):
- self.doc.buying_or_selling, self.doc.currency = webnotes.conn.get_value("Price List",
- self.doc.price_list, ["buying_or_selling", "currency"])
+ self.doc.buying, self.doc.selling, self.doc.currency = webnotes.conn.get_value("Price List",
+ self.doc.price_list, ["buying", "selling", "currency"])
def update_item_details(self):
self.doc.item_name, self.doc.item_description = webnotes.conn.get_value("Item",
diff --git a/stock/doctype/item_price/item_price.txt b/stock/doctype/item_price/item_price.txt
index fc411eb..f329a5f 100644
--- a/stock/doctype/item_price/item_price.txt
+++ b/stock/doctype/item_price/item_price.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-05-02 16:29:48",
"docstatus": 0,
- "modified": "2013-10-31 12:59:02",
+ "modified": "2014-01-07 19:16:49",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -45,6 +45,13 @@
},
{
"doctype": "DocField",
+ "fieldname": "price_list_details",
+ "fieldtype": "Section Break",
+ "label": "Price List",
+ "options": "icon-tags"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "price_list",
"fieldtype": "Link",
"in_filter": 1,
@@ -54,6 +61,29 @@
},
{
"doctype": "DocField",
+ "fieldname": "buying",
+ "fieldtype": "Check",
+ "in_list_view": 1,
+ "label": "Buying",
+ "read_only": 1
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "selling",
+ "fieldtype": "Check",
+ "in_list_view": 1,
+ "label": "Selling",
+ "read_only": 1
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "item_details",
+ "fieldtype": "Section Break",
+ "label": "Item",
+ "options": "icon-tag"
+ },
+ {
+ "doctype": "DocField",
"fieldname": "item_code",
"fieldtype": "Link",
"in_filter": 1,
@@ -85,16 +115,6 @@
},
{
"doctype": "DocField",
- "fieldname": "buying_or_selling",
- "fieldtype": "Select",
- "in_filter": 1,
- "in_list_view": 1,
- "label": "Valid for Buying or Selling?",
- "options": "Selling\nBuying",
- "reqd": 0
- },
- {
- "doctype": "DocField",
"fieldname": "item_name",
"fieldtype": "Data",
"label": "Item Name",
diff --git a/stock/doctype/price_list/price_list.css b/stock/doctype/price_list/price_list.css
deleted file mode 100644
index 61b0694..0000000
--- a/stock/doctype/price_list/price_list.css
+++ /dev/null
@@ -1,7 +0,0 @@
-.table-grid tbody tr {
- cursor: pointer;
-}
-
-.table-grid thead tr {
- height: 50px;
-}
\ No newline at end of file
diff --git a/stock/doctype/price_list/price_list.py b/stock/doctype/price_list/price_list.py
index d0e5d2b..40841cf 100644
--- a/stock/doctype/price_list/price_list.py
+++ b/stock/doctype/price_list/price_list.py
@@ -3,16 +3,15 @@
from __future__ import unicode_literals
import webnotes
-from webnotes import msgprint, _
-from webnotes.utils import comma_or, cint
+from webnotes import msgprint, _, throw
+from webnotes.utils import cint
from webnotes.model.controller import DocListController
import webnotes.defaults
class DocType(DocListController):
def validate(self):
- if self.doc.buying_or_selling not in ["Buying", "Selling"]:
- msgprint(_(self.meta.get_label("buying_or_selling")) + " " + _("must be one of") + " " +
- comma_or(["Buying", "Selling"]), raise_exception=True)
+ if not cint(self.doc.buying) and not cint(self.doc.selling):
+ throw(_("Price List must be applicable for Buying or Selling"))
if not self.doclist.get({"parentfield": "valid_for_territories"}):
# if no territory, set default territory
@@ -25,24 +24,24 @@
else:
# at least one territory
self.validate_table_has_rows("valid_for_territories")
-
+
def on_update(self):
self.set_default_if_missing()
self.update_item_price()
cart_settings = webnotes.get_obj("Shopping Cart Settings")
if cint(cart_settings.doc.enabled):
cart_settings.validate_price_lists()
-
+
def set_default_if_missing(self):
- if self.doc.buying_or_selling=="Selling":
+ if cint(self.doc.selling):
if not webnotes.conn.get_value("Selling Settings", None, "selling_price_list"):
webnotes.set_value("Selling Settings", "Selling Settings", "selling_price_list", self.doc.name)
- elif self.doc.buying_or_selling=="Buying":
+ elif cint(self.doc.buying):
if not webnotes.conn.get_value("Buying Settings", None, "buying_price_list"):
webnotes.set_value("Buying Settings", "Buying Settings", "buying_price_list", self.doc.name)
def update_item_price(self):
webnotes.conn.sql("""update `tabItem Price` set currency=%s,
- buying_or_selling=%s, modified=NOW() where price_list=%s""",
- (self.doc.currency, self.doc.buying_or_selling, self.doc.name))
\ No newline at end of file
+ buying=%s, selling=%s, modified=NOW() where price_list=%s""",
+ (self.doc.currency, cint(self.doc.buying), cint(self.doc.selling), self.doc.name))
\ No newline at end of file
diff --git a/stock/doctype/price_list/price_list.txt b/stock/doctype/price_list/price_list.txt
index d43076b..69c3ecb 100644
--- a/stock/doctype/price_list/price_list.txt
+++ b/stock/doctype/price_list/price_list.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-25 11:35:09",
"docstatus": 0,
- "modified": "2013-10-31 19:24:33",
+ "modified": "2014-01-06 18:28:23",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -61,14 +61,19 @@
"reqd": 1
},
{
- "default": "Selling",
"doctype": "DocField",
- "fieldname": "buying_or_selling",
- "fieldtype": "Select",
+ "fieldname": "buying",
+ "fieldtype": "Check",
"in_list_view": 1,
- "label": "Valid for Buying or Selling?",
- "options": "Buying\nSelling",
- "reqd": 1
+ "label": "Buying"
+ },
+ {
+ "doctype": "DocField",
+ "fieldname": "selling",
+ "fieldtype": "Check",
+ "in_list_view": 1,
+ "label": "Selling",
+ "reqd": 0
},
{
"doctype": "DocField",
diff --git a/stock/doctype/price_list/test_price_list.py b/stock/doctype/price_list/test_price_list.py
index 86dcd1a..bdcacc3 100644
--- a/stock/doctype/price_list/test_price_list.py
+++ b/stock/doctype/price_list/test_price_list.py
@@ -12,7 +12,7 @@
"doctype": "Price List",
"price_list_name": "_Test Price List",
"currency": "INR",
- "buying_or_selling": "Selling"
+ "selling": 1
},
{
"doctype": "Applicable Territory",
@@ -25,7 +25,7 @@
"doctype": "Price List",
"price_list_name": "_Test Price List 2",
"currency": "INR",
- "buying_or_selling": "Selling"
+ "selling": 1
},
{
"doctype": "Applicable Territory",
@@ -38,7 +38,7 @@
"doctype": "Price List",
"price_list_name": "_Test Price List India",
"currency": "INR",
- "buying_or_selling": "Selling"
+ "selling": 1
},
{
"doctype": "Applicable Territory",
@@ -51,7 +51,7 @@
"doctype": "Price List",
"price_list_name": "_Test Price List Rest of the World",
"currency": "USD",
- "buying_or_selling": "Selling"
+ "selling": 1
},
{
"doctype": "Applicable Territory",
diff --git a/stock/report/item_prices/item_prices.py b/stock/report/item_prices/item_prices.py
index da8b500..e744cc7 100644
--- a/stock/report/item_prices/item_prices.py
+++ b/stock/report/item_prices/item_prices.py
@@ -65,13 +65,13 @@
rate = {}
- price_list = webnotes.conn.sql("""select item_code, buying_or_selling,
+ price_list = webnotes.conn.sql("""select item_code, buying, selling,
concat(price_list, " - ", currency, " ", ref_rate) as price
from `tabItem Price`""", as_dict=1)
for j in price_list:
if j.price:
- rate.setdefault(j.item_code, {}).setdefault(j.buying_or_selling, []).append(j.price)
+ rate.setdefault(j.item_code, {}).setdefault("Buying" if j.buying else "Selling", []).append(j.price)
item_rate_map = {}
for item in rate:
diff --git a/stock/report/item_wise_price_list_rate/__init__.py b/stock/report/item_wise_price_list_rate/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/stock/report/item_wise_price_list_rate/__init__.py
diff --git a/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.txt b/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.txt
new file mode 100644
index 0000000..f4d1d67
--- /dev/null
+++ b/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.txt
@@ -0,0 +1,22 @@
+[
+ {
+ "creation": "2013-09-25 10:21:15",
+ "docstatus": 0,
+ "modified": "2014-01-07 18:35:22",
+ "modified_by": "Administrator",
+ "owner": "Administrator"
+ },
+ {
+ "doctype": "Report",
+ "is_standard": "Yes",
+ "json": "{\"filters\":[[\"Item Price\",\"price_list\",\"like\",\"%\"],[\"Item Price\",\"item_code\",\"like\",\"%\"]],\"columns\":[[\"name\",\"Item Price\"],[\"price_list\",\"Item Price\"],[\"item_code\",\"Item Price\"],[\"item_name\",\"Item Price\"],[\"item_description\",\"Item Price\"],[\"ref_rate\",\"Item Price\"],[\"buying\",\"Item Price\"],[\"selling\",\"Item Price\"],[\"currency\",\"Item Price\"]],\"sort_by\":\"Item Price.modified\",\"sort_order\":\"desc\",\"sort_by_next\":\"\",\"sort_order_next\":\"desc\"}",
+ "name": "__common__",
+ "ref_doctype": "Price List",
+ "report_name": "Item-wise Price List Rate",
+ "report_type": "Report Builder"
+ },
+ {
+ "doctype": "Report",
+ "name": "Item-wise Price List Rate"
+ }
+]
\ No newline at end of file
diff --git a/support/doctype/support_ticket/get_support_mails.py b/support/doctype/support_ticket/get_support_mails.py
index 33cb023..67ed9f6 100644
--- a/support/doctype/support_ticket/get_support_mails.py
+++ b/support/doctype/support_ticket/get_support_mails.py
@@ -52,11 +52,6 @@
subject = '['+cstr(d.name)+'] ' + cstr(d.subject), \
msg = cstr(response))
- def auto_close_tickets(self):
- webnotes.conn.sql("""update `tabSupport Ticket` set status = 'Closed'
- where status = 'Replied'
- and date_sub(curdate(),interval 15 Day) > modified""")
-
def get_support_mails():
if cint(webnotes.conn.get_value('Email Settings', None, 'sync_support_mails')):
SupportMailbox()
diff --git a/support/doctype/support_ticket/support_ticket.py b/support/doctype/support_ticket/support_ticket.py
index fd79583..3030a14 100644
--- a/support/doctype/support_ticket/support_ticket.py
+++ b/support/doctype/support_ticket/support_ticket.py
@@ -66,4 +66,9 @@
def set_status(name, status):
st = webnotes.bean("Support Ticket", name)
st.doc.status = status
- st.save()
\ No newline at end of file
+ st.save()
+
+def auto_close_tickets():
+ webnotes.conn.sql("""update `tabSupport Ticket` set status = 'Closed'
+ where status = 'Replied'
+ and date_sub(curdate(),interval 15 Day) > modified""")
\ No newline at end of file
diff --git a/utilities/demo/demo_docs/Item_Price.csv b/utilities/demo/demo_docs/Item_Price.csv
index d70b7b3..cd7a139 100644
--- a/utilities/demo/demo_docs/Item_Price.csv
+++ b/utilities/demo/demo_docs/Item_Price.csv
@@ -1,49 +1,49 @@
-Data Import Template,,,,,,,
-Table:,Item Price,,,,,,
-,,,,,,,
-,,,,,,,
-Notes:,,,,,,,
-Please do not change the template headings.,,,,,,,
-First data column must be blank.,,,,,,,
-"If you are uploading new records, leave the ""name"""" (ID) column blank.""",,,,,,,
-"If you are uploading new records, ""Naming Series"""" becomes mandatory"," if present.""",,,,,,
-Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,
-"For updating, you can update only selective columns.",,,,,,,
-You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,
-,,,,,,,
-DocType:,Item Price,,,,,,
-Column Labels:,ID,Price List,Item Code,Rate,Valid for Buying or Selling?,Item Name,Item Description
-Column Name:,name,price_list,item_code,ref_rate,buying_or_selling,item_name,item_description
-Mandatory:,Yes,Yes,Yes,Yes,No,No,No
-Type:,Data (text),Link,Link,Currency,Select,Data,Text
-Info:,,Valid Price List,Valid Item,,"One of: Selling, Buying",,
-Start entering data below this line,,,,,,,
-,,Standard Buying,Base Bearing Plate,15,Buying,,
-,,Standard Buying,Base Plate,20,Buying,,
-,,Standard Buying,Bearing Block,10,Buying,,
-,,Standard Buying,Bearing Collar,20,Buying,,
-,,Standard Buying,Bearing Pipe,15,Buying,,
-,,Standard Buying,Blade Rib,10,Buying,,
-,,Standard Buying,Disc Collars,74,Buying,,
-,,Standard Buying,External Disc,45,Buying,,
-,,Standard Buying,Internal Disc,33,Buying,,
-,,Standard Buying,Shaft,30,Buying,,
-,,Standard Buying,Stand,40,Buying,,
-,,Standard Buying,Upper Bearing Plate,50,Buying,,
-,,Standard Buying,Wing Sheet,22,Buying,,
-,,Standard Selling,Wind Turbine,21,Selling,,
-,,Standard Selling,Wind Mill A Series,28,Selling,,
-,,Standard Selling,Wind MIll C Series,14,Selling,,
-,,Standard Selling,Base Bearing Plate,28,Selling,,
-,,Standard Selling,Base Plate,21,Selling,,
-,,Standard Selling,Bearing Block,14,Selling,,
-,,Standard Selling,Bearing Collar,103.6,Selling,,
-,,Standard Selling,Bearing Pipe,63,Selling,,
-,,Standard Selling,Blade Rib,46.2,Selling,,
-,,Standard Selling,Disc Collars,42,Selling,,
-,,Standard Selling,External Disc,56,Selling,,
-,,Standard Selling,Internal Disc,70,Selling,,
-,,Standard Selling,Shaft,340,Selling,,
-,,Standard Selling,Stand,400,Selling,,
-,,Standard Selling,Upper Bearing Plate,300,Selling,,
-,,Standard Selling,Wing Sheet,30.8,Selling,,
\ No newline at end of file
+Data Import Template,,,,,,,,
+Table:,Item Price,,,,,,,
+,,,,,,,,
+,,,,,,,,
+Notes:,,,,,,,,
+Please do not change the template headings.,,,,,,,,
+First data column must be blank.,,,,,,,,
+"If you are uploading new records, leave the ""name"" (ID) column blank.",,,,,,,,
+"If you are uploading new records, ""Naming Series"" becomes mandatory, if present.",,,,,,,,
+Only mandatory fields are necessary for new records. You can delete non-mandatory columns if you wish.,,,,,,,,
+"For updating, you can update only selective columns.",,,,,,,,
+You can only upload upto 5000 records in one go. (may be less in some cases),,,,,,,,
+,,,,,,,,
+DocType:,Item Price,,,,,,,
+Column Labels:,ID,Price List,Item Code,Rate,Buying,Selling,Item Name,Item Description
+Column Name:,name,price_list,item_code,ref_rate,buying,selling,item_name,item_description
+Mandatory:,Yes,Yes,Yes,Yes,No,No,No,No
+Type:,Data (text),Link,Link,Currency,Check,Check,Data,Text
+Info:,,Valid Price List,Valid Item,,0 or 1,0 or 1,,
+Start entering data below this line,,,,,,,,
+,,Standard Buying,Base Bearing Plate,15,1,,,
+,,Standard Buying,Base Plate,20,1,,,
+,,Standard Buying,Bearing Block,10,1,,,
+,,Standard Buying,Bearing Collar,20,1,,,
+,,Standard Buying,Bearing Pipe,15,1,,,
+,,Standard Buying,Blade Rib,10,1,,,
+,,Standard Buying,Disc Collars,74,1,,,
+,,Standard Buying,External Disc,45,1,,,
+,,Standard Buying,Internal Disc,33,1,,,
+,,Standard Buying,Shaft,30,1,,,
+,,Standard Buying,Stand,40,1,,,
+,,Standard Buying,Upper Bearing Plate,50,1,,,
+,,Standard Buying,Wing Sheet,22,1,,,
+,,Standard Selling,Wind Turbine,21,,1,,
+,,Standard Selling,Wind Mill A Series,28,,1,,
+,,Standard Selling,Wind MIll C Series,14,,1,,
+,,Standard Selling,Base Bearing Plate,28,,1,,
+,,Standard Selling,Base Plate,21,,1,,
+,,Standard Selling,Bearing Block,14,,1,,
+,,Standard Selling,Bearing Collar,103.6,,1,,
+,,Standard Selling,Bearing Pipe,63,,1,,
+,,Standard Selling,Blade Rib,46.2,,1,,
+,,Standard Selling,Disc Collars,42,,1,,
+,,Standard Selling,External Disc,56,,1,,
+,,Standard Selling,Internal Disc,70,,1,,
+,,Standard Selling,Shaft,340,,1,,
+,,Standard Selling,Stand,400,,1,,
+,,Standard Selling,Upper Bearing Plate,300,,1,,
+,,Standard Selling,Wing Sheet,30.8,,1,,