mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-09 00:01:18 +00:00
Merge branch 'hotfix' into wrong_Casual_Leave_opening
This commit is contained in:
@@ -5,7 +5,7 @@ import frappe
|
||||
from erpnext.hooks import regional_overrides
|
||||
from frappe.utils import getdate
|
||||
|
||||
__version__ = '11.1.39'
|
||||
__version__ = '11.1.41'
|
||||
|
||||
def get_default_company(user=None):
|
||||
'''Get default company for user'''
|
||||
|
||||
@@ -487,7 +487,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)
|
||||
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
@@ -7,8 +7,9 @@ import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
if frappe.get_all("Item Barcode", limit=1): return
|
||||
frappe.reload_doc("stock", "doctype", "item_barcode")
|
||||
if frappe.get_all("Item Barcode", limit=1): return
|
||||
if "barcode" not in frappe.db.get_table_columns("Item"): return
|
||||
|
||||
items_barcode = frappe.db.sql("select name, barcode from tabItem where barcode is not null", as_dict=True)
|
||||
frappe.reload_doc("stock", "doctype", "item")
|
||||
|
||||
@@ -443,7 +443,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
|
||||
@@ -451,6 +456,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, {
|
||||
|
||||
Reference in New Issue
Block a user