Merge branch 'hotfix'
This commit is contained in:
commit
b7ef28d23d
@ -2,7 +2,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
__version__ = '8.0.47'
|
__version__ = '8.0.48'
|
||||||
|
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
|
@ -21,11 +21,13 @@
|
|||||||
<th style="width: 40%">{%= __("Party") %}</th>
|
<th style="width: 40%">{%= __("Party") %}</th>
|
||||||
<th style="width: 15%">{%= __("Invoiced Amount") %}</th>
|
<th style="width: 15%">{%= __("Invoiced Amount") %}</th>
|
||||||
<th style="width: 15%">{%= __("Paid Amount") %}</th>
|
<th style="width: 15%">{%= __("Paid Amount") %}</th>
|
||||||
|
<th style="width: 15%">{%= report.report_name === "Accounts Receivable" ? __('Credit Note') : __('Debit Note') %}</th>
|
||||||
<th style="width: 15%">{%= __("Outstanding Amount") %}</th>
|
<th style="width: 15%">{%= __("Outstanding Amount") %}</th>
|
||||||
{% } else { %}
|
{% } else { %}
|
||||||
<th style="width: 40%">{%= __("Party") %}</th>
|
<th style="width: 40%">{%= __("Party") %}</th>
|
||||||
<th style="width: 15%">{%= __("Total Invoiced Amount") %}</th>
|
<th style="width: 15%">{%= __("Total Invoiced Amount") %}</th>
|
||||||
<th style="width: 15%">{%= __("Total Paid Amount") %}</th>
|
<th style="width: 15%">{%= __("Total Paid Amount") %}</th>
|
||||||
|
<th style="width: 15%">{%= report.report_name === "Accounts Receivable Summary" ? __('Credit Note Amount') : __('Debit Note Amount') %}</th>
|
||||||
<th style="width: 15%">{%= __("Total Outstanding Amount") %}</th>
|
<th style="width: 15%">{%= __("Total Outstanding Amount") %}</th>
|
||||||
{% } %}
|
{% } %}
|
||||||
</tr>
|
</tr>
|
||||||
@ -44,6 +46,8 @@
|
|||||||
{%= format_currency(data[i]["Invoiced Amount"], data[i]["currency"]) %}</td>
|
{%= format_currency(data[i]["Invoiced Amount"], data[i]["currency"]) %}</td>
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{%= format_currency(data[i]["Paid Amount"], data[i]["currency"]) %}</td>
|
{%= format_currency(data[i]["Paid Amount"], data[i]["currency"]) %}</td>
|
||||||
|
<td style="text-align: right">
|
||||||
|
{%= report.report_name === "Accounts Receivable" ? format_currency(data[i]["Credit Note"], data[i]["currency"]) : format_currency(data[i]["Debit Note"], data[i]["currency"]) %}</td>
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{%= format_currency(data[i]["Outstanding Amount"], data[i]["currency"]) %}</td>
|
{%= format_currency(data[i]["Outstanding Amount"], data[i]["currency"]) %}</td>
|
||||||
{% } else { %}
|
{% } else { %}
|
||||||
@ -54,6 +58,7 @@
|
|||||||
{%= format_currency(data[i]["Invoiced Amount"]) %}</td>
|
{%= format_currency(data[i]["Invoiced Amount"]) %}</td>
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{%= format_currency(data[i]["Paid Amount"]) %}</td>
|
{%= format_currency(data[i]["Paid Amount"]) %}</td>
|
||||||
|
<td style="text-align: right">{% report.report_name === "Accounts Receivable" ? format_currency(data[i][__("Credit Note Amt")]) : format_currency(data[i][__("Debit Note Amt")]) %} </td>
|
||||||
<td style="text-align: right">
|
<td style="text-align: right">
|
||||||
{%= format_currency(data[i]["Outstanding Amount"]) %}</td>
|
{%= format_currency(data[i]["Outstanding Amount"]) %}</td>
|
||||||
{% } %}
|
{% } %}
|
||||||
@ -67,6 +72,7 @@
|
|||||||
{% } %}
|
{% } %}
|
||||||
<td style="text-align: right">{%= format_currency(data[i][__("Total Invoiced Amt")]) %}</td>
|
<td style="text-align: right">{%= format_currency(data[i][__("Total Invoiced Amt")]) %}</td>
|
||||||
<td style="text-align: right">{%= format_currency(data[i][__("Total Paid Amt")]) %}</td>
|
<td style="text-align: right">{%= format_currency(data[i][__("Total Paid Amt")]) %}</td>
|
||||||
|
<td style="text-align: right">{%= report.report_name === "Accounts Receivable Summary" ? format_currency(data[i][__("Credit Note Amt")]) : format_currency(data[i][__("Debit Note Amt")]) %}</td>
|
||||||
<td style="text-align: right">{%= format_currency(data[i][__("Total Outstanding Amt")]) %}</td>
|
<td style="text-align: right">{%= format_currency(data[i][__("Total Outstanding Amt")]) %}</td>
|
||||||
{% } %}
|
{% } %}
|
||||||
{% } %}
|
{% } %}
|
||||||
|
@ -399,3 +399,4 @@ erpnext.patches.v8_0.make_payments_table_blank_for_non_pos_invoice
|
|||||||
erpnext.patches.v8_0.delete_schools_depricated_doctypes
|
erpnext.patches.v8_0.delete_schools_depricated_doctypes
|
||||||
erpnext.patches.v8_0.update_customer_pos_id
|
erpnext.patches.v8_0.update_customer_pos_id
|
||||||
erpnext.patches.v8_0.rename_items_in_status_field_of_material_request
|
erpnext.patches.v8_0.rename_items_in_status_field_of_material_request
|
||||||
|
erpnext.patches.v8_0.delete_bin_indexes
|
||||||
|
16
erpnext/patches/v8_0/delete_bin_indexes.py
Normal file
16
erpnext/patches/v8_0/delete_bin_indexes.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# Copyright (c) 2017, Frappe and Contributors
|
||||||
|
# License: GNU General Public License v3. See license.txt
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
|
||||||
|
def execute():
|
||||||
|
# delete bin indexes
|
||||||
|
unwanted_indexes = ["item_code", "warehouse"]
|
||||||
|
|
||||||
|
for k in unwanted_indexes:
|
||||||
|
try:
|
||||||
|
frappe.db.sql("drop index {0} on `tabBin`".format(k))
|
||||||
|
except:
|
||||||
|
pass
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 0,
|
"allow_import": 0,
|
||||||
"allow_rename": 0,
|
"allow_rename": 0,
|
||||||
"autoname": "BIN/.#######",
|
"autoname": "BIN/.#######",
|
||||||
@ -12,6 +13,7 @@
|
|||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -22,6 +24,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 1,
|
"in_standard_filter": 1,
|
||||||
"label": "Warehouse",
|
"label": "Warehouse",
|
||||||
@ -37,11 +40,12 @@
|
|||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 1,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -52,6 +56,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 1,
|
"in_standard_filter": 1,
|
||||||
"label": "Item Code",
|
"label": "Item Code",
|
||||||
@ -67,11 +72,12 @@
|
|||||||
"remember_last_selected_value": 0,
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 1,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -83,6 +89,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Reserved Quantity",
|
"label": "Reserved Quantity",
|
||||||
@ -102,6 +109,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -113,6 +121,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Actual Quantity",
|
"label": "Actual Quantity",
|
||||||
@ -132,6 +141,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -143,6 +153,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Ordered Quantity",
|
"label": "Ordered Quantity",
|
||||||
@ -162,6 +173,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -173,6 +185,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Requested Quantity",
|
"label": "Requested Quantity",
|
||||||
@ -192,6 +205,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -202,6 +216,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Planned Qty",
|
"label": "Planned Qty",
|
||||||
@ -221,6 +236,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -231,6 +247,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Projected Qty",
|
"label": "Projected Qty",
|
||||||
@ -250,6 +267,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -260,6 +278,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Reserved Qty for Production",
|
"label": "Reserved Qty for Production",
|
||||||
@ -278,6 +297,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -288,6 +308,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Moving Average Rate",
|
"label": "Moving Average Rate",
|
||||||
@ -307,6 +328,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -317,6 +339,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 1,
|
"in_filter": 1,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "UOM",
|
"label": "UOM",
|
||||||
@ -337,6 +360,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -347,6 +371,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "FCFS Rate",
|
"label": "FCFS Rate",
|
||||||
@ -366,6 +391,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -376,6 +402,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Valuation Rate",
|
"label": "Valuation Rate",
|
||||||
@ -395,6 +422,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@ -405,6 +433,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Stock Value",
|
"label": "Stock Value",
|
||||||
@ -424,17 +453,17 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 1,
|
"hide_toolbar": 1,
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 1,
|
"in_create": 1,
|
||||||
"in_dialog": 0,
|
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-12-15 14:51:43.312590",
|
"modified": "2017-06-13 13:06:32.601505",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Bin",
|
"name": "Bin",
|
||||||
@ -450,7 +479,6 @@
|
|||||||
"export": 0,
|
"export": 0,
|
||||||
"if_owner": 0,
|
"if_owner": 0,
|
||||||
"import": 0,
|
"import": 0,
|
||||||
"is_custom": 0,
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
@ -471,7 +499,6 @@
|
|||||||
"export": 0,
|
"export": 0,
|
||||||
"if_owner": 0,
|
"if_owner": 0,
|
||||||
"import": 0,
|
"import": 0,
|
||||||
"is_custom": 0,
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
@ -492,7 +519,6 @@
|
|||||||
"export": 0,
|
"export": 0,
|
||||||
"if_owner": 0,
|
"if_owner": 0,
|
||||||
"import": 0,
|
"import": 0,
|
||||||
"is_custom": 0,
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
@ -508,6 +534,8 @@
|
|||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
"search_fields": "item_code,warehouse",
|
"search_fields": "item_code,warehouse",
|
||||||
|
"show_name_in_global_search": 0,
|
||||||
"sort_order": "ASC",
|
"sort_order": "ASC",
|
||||||
|
"track_changes": 0,
|
||||||
"track_seen": 0
|
"track_seen": 0
|
||||||
}
|
}
|
@ -31,6 +31,7 @@ class Bin(Document):
|
|||||||
is_group_warehouse(self.warehouse)
|
is_group_warehouse(self.warehouse)
|
||||||
|
|
||||||
def update_stock(self, args, allow_negative_stock=False, via_landed_cost_voucher=False):
|
def update_stock(self, args, allow_negative_stock=False, via_landed_cost_voucher=False):
|
||||||
|
'''Called from erpnext.stock.utils.update_bin'''
|
||||||
self.update_qty(args)
|
self.update_qty(args)
|
||||||
|
|
||||||
if args.get("actual_qty") or args.get("voucher_type") == "Stock Reconciliation":
|
if args.get("actual_qty") or args.get("voucher_type") == "Stock Reconciliation":
|
||||||
@ -55,15 +56,6 @@ class Bin(Document):
|
|||||||
if args.get("voucher_type")=="Stock Reconciliation":
|
if args.get("voucher_type")=="Stock Reconciliation":
|
||||||
if args.get('is_cancelled') == 'No':
|
if args.get('is_cancelled') == 'No':
|
||||||
self.actual_qty = args.get("qty_after_transaction")
|
self.actual_qty = args.get("qty_after_transaction")
|
||||||
else:
|
|
||||||
qty_after_transaction = frappe.db.get_value("""select qty_after_transaction
|
|
||||||
from `tabStock Ledger Entry`
|
|
||||||
where item_code=%s and warehouse=%s
|
|
||||||
and not (voucher_type='Stock Reconciliation' and voucher_no=%s)
|
|
||||||
order by posting_date desc limit 1""",
|
|
||||||
(self.item_code, self.warehouse, args.get('voucher_no')))
|
|
||||||
|
|
||||||
self.actual_qty = flt(qty_after_transaction[0][0]) if qty_after_transaction else 0.0
|
|
||||||
else:
|
else:
|
||||||
self.actual_qty = flt(self.actual_qty) + flt(args.get("actual_qty"))
|
self.actual_qty = flt(self.actual_qty) + flt(args.get("actual_qty"))
|
||||||
|
|
||||||
@ -72,7 +64,8 @@ class Bin(Document):
|
|||||||
self.indented_qty = flt(self.indented_qty) + flt(args.get("indented_qty"))
|
self.indented_qty = flt(self.indented_qty) + flt(args.get("indented_qty"))
|
||||||
self.planned_qty = flt(self.planned_qty) + flt(args.get("planned_qty"))
|
self.planned_qty = flt(self.planned_qty) + flt(args.get("planned_qty"))
|
||||||
|
|
||||||
self.save()
|
self.set_projected_qty()
|
||||||
|
self.db_update()
|
||||||
|
|
||||||
def set_projected_qty(self):
|
def set_projected_qty(self):
|
||||||
self.projected_qty = (flt(self.actual_qty) + flt(self.ordered_qty)
|
self.projected_qty = (flt(self.actual_qty) + flt(self.ordered_qty)
|
||||||
@ -111,3 +104,6 @@ def update_item_projected_qty(item_code):
|
|||||||
frappe.db.sql('''update tabItem set
|
frappe.db.sql('''update tabItem set
|
||||||
total_projected_qty = ifnull((select sum(projected_qty) from tabBin where item_code=%s), 0)
|
total_projected_qty = ifnull((select sum(projected_qty) from tabBin where item_code=%s), 0)
|
||||||
where name=%s''', (item_code, item_code))
|
where name=%s''', (item_code, item_code))
|
||||||
|
|
||||||
|
def on_doctype_update():
|
||||||
|
frappe.db.add_index("Bin", ["item_code", "warehouse"])
|
||||||
|
@ -694,7 +694,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-12-15 14:45:07.733480",
|
"modified": "2017-06-09 14:45:07.888888",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Stock",
|
"module": "Stock",
|
||||||
"name": "Stock Ledger Entry",
|
"name": "Stock Ledger Entry",
|
||||||
|
@ -129,3 +129,5 @@ def on_doctype_update():
|
|||||||
frappe.db.commit()
|
frappe.db.commit()
|
||||||
frappe.db.sql("""alter table `tabStock Ledger Entry`
|
frappe.db.sql("""alter table `tabStock Ledger Entry`
|
||||||
add index posting_sort_index(posting_date, posting_time, name)""")
|
add index posting_sort_index(posting_date, posting_time, name)""")
|
||||||
|
|
||||||
|
frappe.db.add_index("Stock Ledger Entry", ["voucher_no", "voucher_type"])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user