Merge branch 'develop' into sla_fix
This commit is contained in:
commit
b134709aaf
@ -49,7 +49,7 @@ The ERPNext code is licensed as GNU General Public License (v3) and the Document
|
|||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
1. [Issue Guidelines](https://github.com/frappe/erpnext/wiki/Issue-Guidelines)
|
1. [Issue Guidelines](https://github.com/frappe/erpnext/wiki/Issue-Guidelines)
|
||||||
1. [Report Security Vulnerabilities](https://erpnext.com/report)
|
1. [Report Security Vulnerabilities](https://erpnext.com/security)
|
||||||
1. [Pull Request Requirements](https://github.com/frappe/erpnext/wiki/Contribution-Guidelines)
|
1. [Pull Request Requirements](https://github.com/frappe/erpnext/wiki/Contribution-Guidelines)
|
||||||
1. [Translations](https://translate.erpnext.com)
|
1. [Translations](https://translate.erpnext.com)
|
||||||
1. [Chart of Accounts](https://charts.erpnext.com)
|
1. [Chart of Accounts](https://charts.erpnext.com)
|
||||||
|
@ -485,7 +485,7 @@ class SalesInvoice(SellingController):
|
|||||||
"""Set against account for debit to account"""
|
"""Set against account for debit to account"""
|
||||||
against_acc = []
|
against_acc = []
|
||||||
for d in self.get('items'):
|
for d in self.get('items'):
|
||||||
if d.income_account not in against_acc:
|
if d.income_account and d.income_account not in against_acc:
|
||||||
against_acc.append(d.income_account)
|
against_acc.append(d.income_account)
|
||||||
self.against_income_account = ','.join(against_acc)
|
self.against_income_account = ','.join(against_acc)
|
||||||
|
|
||||||
|
@ -40,17 +40,6 @@ def get_data():
|
|||||||
"description": _("Tree of financial accounts."),
|
"description": _("Tree of financial accounts."),
|
||||||
"onboard": 1,
|
"onboard": 1,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Journal Entry",
|
|
||||||
"description": _("Accounting journal entries."),
|
|
||||||
"onboard": 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Opening Invoice Creation Tool",
|
|
||||||
"description": _("Create Opening Sales and Purchase Invoices")
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -73,11 +62,6 @@ def get_data():
|
|||||||
"name": "Payment Request",
|
"name": "Payment Request",
|
||||||
"description": _("Payment Request"),
|
"description": _("Payment Request"),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"type": "doctype",
|
|
||||||
"name": "Payment Entry",
|
|
||||||
"description": _("Bank/Cash transactions against party or for internal transfer")
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"type": "doctype",
|
"type": "doctype",
|
||||||
"name": "Payment Term",
|
"name": "Payment Term",
|
||||||
@ -179,6 +163,26 @@ def get_data():
|
|||||||
"name": "Accounting Dimension",
|
"name": "Accounting Dimension",
|
||||||
"description": _("Setup custom dimensions for accounting")
|
"description": _("Setup custom dimensions for accounting")
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Opening Invoice Creation Tool",
|
||||||
|
"description": _("Create Opening Sales and Purchase Invoices")
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": _("Accounting Entries"),
|
||||||
|
"items": [
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Payment Entry",
|
||||||
|
"description": _("Bank/Cash transactions against party or for internal transfer")
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "doctype",
|
||||||
|
"name": "Journal Entry",
|
||||||
|
"description": _("Accounting journal entries.")
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,16 @@ def verify_request():
|
|||||||
frappe.set_user(woocommerce_settings.creation_user)
|
frappe.set_user(woocommerce_settings.creation_user)
|
||||||
|
|
||||||
@frappe.whitelist(allow_guest=True)
|
@frappe.whitelist(allow_guest=True)
|
||||||
def order():
|
def order(*args, **kwargs):
|
||||||
|
try:
|
||||||
|
_order(*args, **kwargs)
|
||||||
|
except Exception:
|
||||||
|
error_message = frappe.get_traceback()+"\n\n Request Data: \n"+json.loads(frappe.request.data).__str__()
|
||||||
|
frappe.log_error(error_message, "WooCommerce Error")
|
||||||
|
raise
|
||||||
|
|
||||||
|
|
||||||
|
def _order(*args, **kwargs):
|
||||||
woocommerce_settings = frappe.get_doc("Woocommerce Settings")
|
woocommerce_settings = frappe.get_doc("Woocommerce Settings")
|
||||||
if frappe.flags.woocomm_test_order_data:
|
if frappe.flags.woocomm_test_order_data:
|
||||||
fd = frappe.flags.woocomm_test_order_data
|
fd = frappe.flags.woocomm_test_order_data
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
frappe.views.calendar["Attendance"] = {
|
frappe.views.calendar["Attendance"] = {
|
||||||
field_map: {
|
field_map: {
|
||||||
"start": "date",
|
"start": "attendance_date",
|
||||||
"end": "date",
|
"end": "attendance_date",
|
||||||
"id": "name",
|
"id": "name",
|
||||||
"docstatus": 1
|
"docstatus": 1
|
||||||
},
|
},
|
||||||
|
@ -448,7 +448,12 @@ def make_sales_invoice(source_name, target_doc=None):
|
|||||||
|
|
||||||
def get_pending_qty(item_row):
|
def get_pending_qty(item_row):
|
||||||
pending_qty = item_row.qty - invoiced_qty_map.get(item_row.name, 0)
|
pending_qty = item_row.qty - invoiced_qty_map.get(item_row.name, 0)
|
||||||
|
|
||||||
|
returned_qty = 0
|
||||||
|
if returned_qty_map.get(item_row.item_code) > 0:
|
||||||
returned_qty = flt(returned_qty_map.get(item_row.item_code, 0))
|
returned_qty = flt(returned_qty_map.get(item_row.item_code, 0))
|
||||||
|
returned_qty_map[item_row.item_code] -= pending_qty
|
||||||
|
|
||||||
if returned_qty:
|
if returned_qty:
|
||||||
if returned_qty >= pending_qty:
|
if returned_qty >= pending_qty:
|
||||||
pending_qty = 0
|
pending_qty = 0
|
||||||
@ -456,6 +461,7 @@ def make_sales_invoice(source_name, target_doc=None):
|
|||||||
else:
|
else:
|
||||||
pending_qty -= returned_qty
|
pending_qty -= returned_qty
|
||||||
returned_qty = 0
|
returned_qty = 0
|
||||||
|
|
||||||
return pending_qty, returned_qty
|
return pending_qty, returned_qty
|
||||||
|
|
||||||
doc = get_mapped_doc("Delivery Note", source_name, {
|
doc = get_mapped_doc("Delivery Note", source_name, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user