mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 19:19:17 +00:00
[serial no] Allow creation only of Warehouse is not set, [translation] Italian
This commit is contained in:
@@ -69,24 +69,19 @@ def get_item_details(args):
|
||||
|
||||
if cint(args.is_pos):
|
||||
pos_settings = get_pos_settings(args.company)
|
||||
<<<<<<< HEAD
|
||||
out.update(apply_pos_settings(pos_settings, out))
|
||||
if pos_settings:
|
||||
out.update(apply_pos_settings(pos_settings, out))
|
||||
|
||||
if args.doctype in ("Sales Invoice", "Delivery Note"):
|
||||
if item_bean.doc.has_serial_no and not args.serial_no:
|
||||
out.serial_no = _get_serial_nos_by_fifo(args, item_bean)
|
||||
|
||||
=======
|
||||
if pos_settings:
|
||||
out.update(apply_pos_settings(pos_settings, out))
|
||||
|
||||
>>>>>>> 3d1ecf5254c5887a48c04003c7dce8a218136ddd
|
||||
return out
|
||||
|
||||
def _get_serial_nos_by_fifo(args, item_bean):
|
||||
return "\n".join(webnotes.conn.sql_list("""select name from `tabSerial No`
|
||||
where item_code=%(item_code)s and warehouse=%(warehouse)s and status='Available'
|
||||
order by datetime(purchase_date, purchase_time) asc limit %(qty)s""" % {
|
||||
order by timestamp(purchase_date, purchase_time) asc limit %(qty)s""", {
|
||||
"item_code": args.item_code,
|
||||
"warehouse": args.warehouse,
|
||||
"qty": cint(args.qty)
|
||||
|
||||
Reference in New Issue
Block a user