Merge branch 'develop' into sla_fix

This commit is contained in:
Himanshu 2019-06-26 16:36:51 +05:30 committed by GitHub
commit b134709aaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 22 deletions

View File

@ -49,7 +49,7 @@ The ERPNext code is licensed as GNU General Public License (v3) and the Document
## Contributing
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. [Translations](https://translate.erpnext.com)
1. [Chart of Accounts](https://charts.erpnext.com)

View File

@ -485,7 +485,7 @@ class SalesInvoice(SellingController):
"""Set against account for debit to account"""
against_acc = []
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)
self.against_income_account = ','.join(against_acc)

View File

@ -40,17 +40,6 @@ def get_data():
"description": _("Tree of financial accounts."),
"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",
"description": _("Payment Request"),
},
{
"type": "doctype",
"name": "Payment Entry",
"description": _("Bank/Cash transactions against party or for internal transfer")
},
{
"type": "doctype",
"name": "Payment Term",
@ -179,6 +163,26 @@ def get_data():
"name": "Accounting Dimension",
"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.")
},
]
},
{

View File

@ -22,7 +22,16 @@ def verify_request():
frappe.set_user(woocommerce_settings.creation_user)
@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")
if frappe.flags.woocomm_test_order_data:
fd = frappe.flags.woocomm_test_order_data

View File

@ -2,8 +2,8 @@
// For license information, please see license.txt
frappe.views.calendar["Attendance"] = {
field_map: {
"start": "date",
"end": "date",
"start": "attendance_date",
"end": "attendance_date",
"id": "name",
"docstatus": 1
},

View File

@ -448,7 +448,12 @@ def make_sales_invoice(source_name, target_doc=None):
def get_pending_qty(item_row):
pending_qty = item_row.qty - invoiced_qty_map.get(item_row.name, 0)
returned_qty = flt(returned_qty_map.get(item_row.item_code, 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_map[item_row.item_code] -= pending_qty
if returned_qty:
if returned_qty >= pending_qty:
pending_qty = 0
@ -456,6 +461,7 @@ def make_sales_invoice(source_name, target_doc=None):
else:
pending_qty -= returned_qty
returned_qty = 0
return pending_qty, returned_qty
doc = get_mapped_doc("Delivery Note", source_name, {