Merge branch 'develop'
This commit is contained in:
commit
aa99fe2c4e
@ -1,2 +1,2 @@
|
||||
from __future__ import unicode_literals
|
||||
__version__ = '6.12.4'
|
||||
__version__ = '6.12.5'
|
||||
|
@ -52,4 +52,5 @@ def get_items(price_list, sales_or_purchase, item=None):
|
||||
{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)
|
||||
|
@ -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>
|
||||
{% } %}
|
||||
{% } %}
|
||||
|
@ -159,6 +159,7 @@ class PurchaseOrder(BuyingController):
|
||||
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_or_closed_status(pc_obj)
|
||||
@ -216,7 +217,7 @@ class PurchaseOrder(BuyingController):
|
||||
|
||||
for so_name in sales_orders_to_update:
|
||||
so = frappe.get_doc("Sales Order", so_name)
|
||||
so.update_delivery_status(self.name)
|
||||
so.update_delivery_status()
|
||||
so.set_status(update=True)
|
||||
so.notify_update()
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
"options": "icon-user",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -52,6 +53,7 @@
|
||||
"options": "SUPP-",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -76,6 +78,7 @@
|
||||
"oldfieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -97,6 +100,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -123,6 +127,7 @@
|
||||
"options": "Supplier Type",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -146,6 +151,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -168,6 +174,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -191,6 +198,7 @@
|
||||
"options": "Currency",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -214,51 +222,7 @@
|
||||
"options": "Price List",
|
||||
"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": "column_break_10",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"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": "default_taxes_and_charges",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Taxes and Charges",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Purchase Taxes and Charges Template",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -281,6 +245,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -306,6 +271,7 @@
|
||||
"options": "icon-map-marker",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -328,6 +294,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -349,6 +316,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -372,6 +340,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -395,6 +364,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -420,6 +390,7 @@
|
||||
"options": "Party Account",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -443,6 +414,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -468,6 +440,7 @@
|
||||
"oldfieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -493,6 +466,7 @@
|
||||
"oldfieldtype": "Code",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -516,6 +490,7 @@
|
||||
"options": "Communication",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -534,7 +509,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2015-11-16 06:29:58.500467",
|
||||
"modified": "2015-12-08 12:52:56.827461",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Buying",
|
||||
"name": "Supplier",
|
||||
|
@ -76,10 +76,10 @@ class StatusUpdater(Document):
|
||||
self.update_qty()
|
||||
self.validate_qty()
|
||||
|
||||
def set_status(self, update=False, status=None):
|
||||
def set_status(self, update=False, status=None, update_modified=True):
|
||||
if self.is_new():
|
||||
return
|
||||
|
||||
|
||||
if self.doctype in status_map:
|
||||
_status = self.status
|
||||
|
||||
@ -102,9 +102,10 @@ class StatusUpdater(Document):
|
||||
|
||||
if self.status != _status and self.status not in ("Submitted", "Cancelled"):
|
||||
self.add_comment("Label", _(self.status))
|
||||
|
||||
|
||||
if update:
|
||||
frappe.db.set_value(self.doctype, self.name, "status", self.status)
|
||||
frappe.db.set_value(self.doctype, self.name, "status", self.status,
|
||||
update_modified=update_modified)
|
||||
|
||||
def validate_qty(self):
|
||||
"""Validates qty at row level"""
|
||||
|
@ -1 +0,0 @@
|
||||
erpnext.buying.print_format.drop_shipping
|
@ -1,10 +1,10 @@
|
||||
<!-- title: erpnext.buying.print_format.drop_shipping --><div class="dev-header">
|
||||
<!-- title: erpnext.buying.print_format.drop_shipping_format --><div class="dev-header">
|
||||
|
||||
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
|
||||
Version 6.x.x</a>
|
||||
|
||||
|
||||
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/blob/develop/erpnext/buying/print_format/drop_shipping.py"
|
||||
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/blob/develop/erpnext/buying/print_format/drop_shipping_format.py"
|
||||
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
|
||||
|
||||
</div>
|
@ -1,4 +1,4 @@
|
||||
<!-- title: drop_shipping -->
|
||||
<!-- title: drop_shipping_format -->
|
||||
|
||||
|
||||
<div class="dev-header">
|
||||
@ -7,7 +7,7 @@
|
||||
Version 6.x.x</a>
|
||||
|
||||
|
||||
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/tree/develop/drop_shipping"
|
||||
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/tree/develop/drop_shipping_format"
|
||||
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
|
||||
|
||||
</div>
|
@ -0,0 +1 @@
|
||||
erpnext.buying.print_format.drop_shipping_format
|
@ -79,7 +79,9 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<p><span class="label label-info">Public API</span>
|
||||
<br><code>/api/method/erpnext.stock.utils.get_incoming_rate</code>
|
||||
</p>
|
||||
<p class="docs-attr-name">
|
||||
<a name="erpnext.stock.utils.get_incoming_rate" href="#erpnext.stock.utils.get_incoming_rate" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
|
@ -2475,6 +2475,20 @@ Yearly</pre>
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="validate_dropship_item" href="#validate_dropship_item" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
<b>validate_dropship_item</b>
|
||||
<i class="text-muted">(self)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="docs-attr-name">
|
||||
<a name="validate_fixed_asset_account" href="#validate_fixed_asset_account" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
|
@ -1,19 +0,0 @@
|
||||
<!-- title: Module home -->
|
||||
|
||||
|
||||
<div class="dev-header">
|
||||
|
||||
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
|
||||
Version 6.x.x</a>
|
||||
|
||||
|
||||
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/tree/develop/erpnext/home"
|
||||
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
|
||||
|
||||
</div>
|
||||
|
||||
<h3>DocTypes for home</h3>
|
||||
|
||||
{index}
|
||||
|
||||
<!-- autodoc -->
|
@ -867,7 +867,7 @@ Rejected</pre>
|
||||
<a name="erpnext.hr.doctype.leave_application.leave_application.get_leave_balance_on" href="#erpnext.hr.doctype.leave_application.leave_application.get_leave_balance_on" class="text-muted small">
|
||||
<i class="icon-link small" style="color: #ccc;"></i></a>
|
||||
erpnext.hr.doctype.leave_application.leave_application.<b>get_leave_balance_on</b>
|
||||
<i class="text-muted">(employee, leave_type, date, allocation_records=None)</i>
|
||||
<i class="text-muted">(employee, leave_type, date, allocation_records=None, consider_all_leaves_in_the_allocation_period=False)</i>
|
||||
</p>
|
||||
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
||||
</div>
|
||||
|
@ -9,8 +9,8 @@ make-field-visible-in-print-format
|
||||
making-custom-reports-in-erpnext
|
||||
managing-dynamic-link-fields
|
||||
module-visibility
|
||||
perm-level-error-in-permission-manager-1
|
||||
perm-level-error-in-permission-manager
|
||||
search-record-by-specific-field
|
||||
set-language
|
||||
set-precision-for-float-currency-and-percent-fields
|
||||
user-restriction
|
||||
user-restriction
|
||||
|
@ -7,7 +7,7 @@ app_publisher = "Frappe Technologies Pvt. Ltd."
|
||||
app_description = """ERP made simple"""
|
||||
app_icon = "icon-th"
|
||||
app_color = "#e74c3c"
|
||||
app_version = "6.12.4"
|
||||
app_version = "6.12.5"
|
||||
app_email = "info@erpnext.com"
|
||||
app_license = "GNU General Public License (v3)"
|
||||
source_link = "https://github.com/frappe/erpnext"
|
||||
@ -111,6 +111,9 @@ doc_events = {
|
||||
"Price List": {
|
||||
"on_update": "erpnext.shopping_cart.doctype.shopping_cart_settings.shopping_cart_settings.validate_cart_settings"
|
||||
},
|
||||
"Address": {
|
||||
"validate": "erpnext.shopping_cart.cart.set_customer_in_address"
|
||||
}
|
||||
}
|
||||
|
||||
scheduler_events = {
|
||||
|
@ -209,7 +209,6 @@ erpnext.patches.v6_0.fix_planned_qty
|
||||
erpnext.patches.v6_0.multi_currency
|
||||
erpnext.patches.v6_2.remove_newsletter_duplicates
|
||||
erpnext.patches.v6_2.fix_missing_default_taxes_and_lead
|
||||
erpnext.patches.v5_8.tax_rule
|
||||
erpnext.patches.v6_3.convert_applicable_territory
|
||||
erpnext.patches.v6_4.round_status_updater_percentages
|
||||
erpnext.patches.v6_4.repost_gle_for_journal_entries_where_reference_name_missing
|
||||
@ -237,4 +236,6 @@ erpnext.patches.v6_8.move_drop_ship_to_po_items
|
||||
erpnext.patches.v6_10.fix_ordered_received_billed
|
||||
erpnext.patches.v6_10.fix_jv_total_amount #2015-11-30
|
||||
erpnext.patches.v6_10.email_digest_default_quote
|
||||
erpnext.patches.v6_10.fix_billed_amount_in_drop_ship_po
|
||||
erpnext.patches.v6_10.fix_billed_amount_in_drop_ship_po
|
||||
erpnext.patches.v6_10.fix_delivery_status_of_drop_ship_item
|
||||
erpnext.patches.v5_8.tax_rule #2015-12-08
|
||||
|
@ -11,19 +11,21 @@ def execute():
|
||||
ifnull(default_taxes_and_charges, '') != '' """, as_dict=1)
|
||||
|
||||
for d in customers:
|
||||
tr = frappe.new_doc("Tax Rule")
|
||||
tr.tax_type = "Sales"
|
||||
tr.customer = d.name
|
||||
tr.sales_tax_template = d.default_taxes_and_charges
|
||||
tr.save()
|
||||
if not frappe.db.exists({"doctype": "Tax Rule", "customer": d.name}):
|
||||
tr = frappe.new_doc("Tax Rule")
|
||||
tr.tax_type = "Sales"
|
||||
tr.customer = d.name
|
||||
tr.sales_tax_template = d.default_taxes_and_charges
|
||||
tr.save()
|
||||
|
||||
|
||||
suppliers = frappe.db.sql("""select name, default_taxes_and_charges from tabSupplier where
|
||||
ifnull(default_taxes_and_charges, '') != '' """, as_dict=1)
|
||||
|
||||
for d in suppliers:
|
||||
tr = frappe.new_doc("Tax Rule")
|
||||
tr.tax_type = "Purchase"
|
||||
tr.supplier = d.name
|
||||
tr.purchase_tax_template = d.default_taxes_and_charges
|
||||
tr.save()
|
||||
if not frappe.db.exists({"doctype": "Tax Rule", "supplier": d.name}):
|
||||
tr = frappe.new_doc("Tax Rule")
|
||||
tr.tax_type = "Purchase"
|
||||
tr.supplier = d.name
|
||||
tr.purchase_tax_template = d.default_taxes_and_charges
|
||||
tr.save()
|
@ -0,0 +1,17 @@
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
sales_orders_to_update = []
|
||||
|
||||
for item in frappe.get_all("Purchase Order Item", filters={"delivered_by_supplier": 1},
|
||||
fields=["prevdoc_doctype", "prevdoc_docname"]):
|
||||
|
||||
if item.prevdoc_doctype == "Sales Order":
|
||||
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, update_modified=False)
|
@ -27,6 +27,7 @@
|
||||
"options": "icon-user",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -50,6 +51,7 @@
|
||||
"options": "CUST-",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -74,6 +76,7 @@
|
||||
"oldfieldtype": "Data",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -99,6 +102,7 @@
|
||||
"options": "\nCompany\nIndividual",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -124,6 +128,7 @@
|
||||
"options": "Lead",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 1,
|
||||
"reqd": 0,
|
||||
@ -145,6 +150,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -172,6 +178,7 @@
|
||||
"options": "Customer Group",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -198,6 +205,7 @@
|
||||
"options": "Territory",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 1,
|
||||
@ -221,6 +229,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -244,6 +253,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -267,6 +277,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -290,6 +301,7 @@
|
||||
"options": "Currency",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -313,51 +325,7 @@
|
||||
"options": "Price List",
|
||||
"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": "column_break_14",
|
||||
"fieldtype": "Column Break",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"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": "default_taxes_and_charges",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 0,
|
||||
"ignore_user_permissions": 1,
|
||||
"in_filter": 0,
|
||||
"in_list_view": 0,
|
||||
"label": "Default Taxes and Charges",
|
||||
"length": 0,
|
||||
"no_copy": 0,
|
||||
"options": "Sales Taxes and Charges Template",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -382,6 +350,7 @@
|
||||
"options": "icon-map-marker",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -404,6 +373,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -425,6 +395,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -449,6 +420,7 @@
|
||||
"oldfieldtype": "HTML",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 1,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -472,6 +444,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -497,6 +470,7 @@
|
||||
"options": "Party Account",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -520,6 +494,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -545,6 +520,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -570,6 +546,7 @@
|
||||
"oldfieldtype": "Int",
|
||||
"permlevel": 1,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -595,6 +572,7 @@
|
||||
"options": "",
|
||||
"permlevel": 1,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -620,6 +598,7 @@
|
||||
"options": "icon-file-text",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -645,6 +624,7 @@
|
||||
"oldfieldtype": "Code",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -667,6 +647,7 @@
|
||||
"no_copy": 0,
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -692,6 +673,7 @@
|
||||
"options": "icon-group",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -717,6 +699,7 @@
|
||||
"options": "Sales Partner",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -741,6 +724,7 @@
|
||||
"oldfieldtype": "Currency",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -765,6 +749,7 @@
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -790,6 +775,7 @@
|
||||
"options": "Sales Team",
|
||||
"permlevel": 0,
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -813,6 +799,7 @@
|
||||
"options": "Communication",
|
||||
"permlevel": 0,
|
||||
"print_hide": 1,
|
||||
"print_hide_if_no_value": 0,
|
||||
"read_only": 0,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
@ -831,7 +818,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2015-11-16 06:29:44.236132",
|
||||
"modified": "2015-12-08 12:50:05.106006",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Selling",
|
||||
"name": "Customer",
|
||||
|
@ -265,27 +265,29 @@ class SalesOrder(SellingController):
|
||||
if exc_list:
|
||||
frappe.throw('\n'.join(exc_list))
|
||||
|
||||
def update_delivery_status(self, po_name):
|
||||
def update_delivery_status(self):
|
||||
"""Update delivery status from Purchase Order for drop shipping"""
|
||||
tot_qty, delivered_qty = 0.0, 0.0
|
||||
|
||||
for item in self.items:
|
||||
if item.delivered_by_supplier:
|
||||
item_delivered_qty = frappe.db.sql("""select qty
|
||||
item_delivered_qty = frappe.db.sql("""select sum(qty)
|
||||
from `tabPurchase Order Item` poi, `tabPurchase Order` po
|
||||
where poi.prevdoc_docname = %s
|
||||
where poi.prevdoc_detail_docname = %s
|
||||
and poi.prevdoc_doctype = 'Sales Order'
|
||||
and poi.item_code = %s
|
||||
and poi.parent = po.name
|
||||
and po.status = 'Delivered'""", (self.name, item.item_code))
|
||||
and po.docstatus = 1
|
||||
and po.status = 'Delivered'""", (item.name, item.item_code))
|
||||
|
||||
item_delivered_qty = item_delivered_qty[0][0] if item_delivered_qty else 0
|
||||
item.db_set("delivered_qty", item_delivered_qty)
|
||||
item.db_set("delivered_qty", flt(item_delivered_qty), update_modified=False)
|
||||
|
||||
delivered_qty += item.delivered_qty
|
||||
tot_qty += item.qty
|
||||
|
||||
frappe.db.set_value("Sales Order", self.name, "per_delivered", flt(delivered_qty/tot_qty) * 100)
|
||||
|
||||
frappe.db.set_value("Sales Order", self.name, "per_delivered", flt(delivered_qty/tot_qty) * 100,
|
||||
update_modified=False)
|
||||
|
||||
def get_list_context(context=None):
|
||||
from erpnext.controllers.website_list_for_contact import get_list_context
|
||||
|
@ -280,6 +280,7 @@ def get_customer(user=None):
|
||||
user = frappe.session.user
|
||||
|
||||
customer = frappe.db.get_value("Contact", {"email_id": user}, "customer")
|
||||
|
||||
if customer:
|
||||
return frappe.get_doc("Customer", customer)
|
||||
|
||||
@ -320,6 +321,17 @@ def get_address_docs(doctype=None, txt=None, filters=None, limit_start=0, limit_
|
||||
|
||||
return address_docs
|
||||
|
||||
def set_customer_in_address(doc, method=None):
|
||||
if doc.flags.linked:
|
||||
return
|
||||
|
||||
doc.check_if_linked()
|
||||
|
||||
if not doc.flags.linked and (frappe.db.get_value("User", frappe.session.user, "user_type") == "Website User"):
|
||||
# creates a customer if one does not exist
|
||||
get_customer()
|
||||
doc.link_address()
|
||||
|
||||
@frappe.whitelist()
|
||||
def apply_shipping_rule(shipping_rule):
|
||||
quotation = _get_cart_quotation()
|
||||
|
@ -92,6 +92,9 @@ def update_bin(args, allow_negative_stock=False, via_landed_cost_voucher=False):
|
||||
def get_incoming_rate(args):
|
||||
"""Get Incoming Rate based on valuation method"""
|
||||
from erpnext.stock.stock_ledger import get_previous_sle
|
||||
|
||||
if isinstance(args, basestring):
|
||||
args = json.loads(args)
|
||||
|
||||
in_rate = 0
|
||||
if (args.get("serial_no") or "").strip():
|
||||
|
@ -3,7 +3,6 @@
|
||||
<h4 class="strong">{{ doc.address_title }}</h4>
|
||||
<p class="text-muted small">
|
||||
{{ frappe.get_doc(doc).get_display() }}
|
||||
</div>
|
||||
</div>
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
|
@ -10,6 +10,9 @@ from frappe.utils import cstr
|
||||
from frappe.model.document import Document
|
||||
|
||||
class Address(Document):
|
||||
def __setup__(self):
|
||||
self.flags.linked = False
|
||||
|
||||
def autoname(self):
|
||||
if not self.address_title:
|
||||
self.address_title = self.customer \
|
||||
@ -42,13 +45,10 @@ class Address(Document):
|
||||
|
||||
def link_address(self):
|
||||
"""Link address based on owner"""
|
||||
linked = False
|
||||
for fieldname in self.link_fields:
|
||||
if self.get(fieldname):
|
||||
linked = True
|
||||
break
|
||||
if not self.flags.linked:
|
||||
self.check_if_linked()
|
||||
|
||||
if not linked:
|
||||
if not self.flags.linked:
|
||||
contact = frappe.db.get_value("Contact", {"email_id": self.owner},
|
||||
("name", "customer", "supplier"), as_dict = True)
|
||||
if contact:
|
||||
@ -57,6 +57,11 @@ class Address(Document):
|
||||
|
||||
self.lead = frappe.db.get_value("Lead", {"email_id": self.owner})
|
||||
|
||||
def check_if_linked(self):
|
||||
for fieldname in self.link_fields:
|
||||
if self.get(fieldname):
|
||||
self.flags.linked = True
|
||||
break
|
||||
|
||||
def validate_shipping_address(self):
|
||||
"""Validate that there can only be one shipping address for particular customer, supplier"""
|
||||
|
Loading…
Reference in New Issue
Block a user