Merge branch 'master' into edge

This commit is contained in:
Anand Doshi 2013-03-07 11:38:17 +05:30
commit d92f2a5688
88 changed files with 666 additions and 398 deletions

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:05",
"creation": "2013-02-22 01:27:37",
"docstatus": 0,
"modified": "2013-01-29 16:27:50",
"modified": "2013-03-07 07:03:18",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:05",
"creation": "2013-02-22 01:27:37",
"docstatus": 0,
"modified": "2013-01-29 16:28:16",
"modified": "2013-03-07 07:03:19",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:05",
"creation": "2013-02-22 01:27:38",
"docstatus": 0,
"modified": "2013-01-22 14:41:34",
"modified": "2013-03-07 07:03:19",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:06",
"creation": "2013-02-22 01:27:38",
"docstatus": 0,
"modified": "2013-01-29 16:27:50",
"modified": "2013-03-07 07:03:19",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -30,6 +30,7 @@
"fieldtype": "Link",
"label": "Invoice No",
"options": "Sales Invoice",
"print_width": "160px",
"width": "160px"
},
{
@ -37,6 +38,7 @@
"fieldname": "invoice_date",
"fieldtype": "Date",
"label": "Invoice Date",
"print_width": "120px",
"read_only": 1,
"width": "120px"
},
@ -46,6 +48,7 @@
"fieldtype": "Link",
"label": "Territory",
"options": "Territory",
"print_width": "120px",
"read_only": 1,
"width": "120px"
},
@ -55,6 +58,7 @@
"fieldtype": "Currency",
"label": "Net Total",
"options": "Company:company:default_currency",
"print_width": "120px",
"read_only": 1,
"width": "120px"
},
@ -64,6 +68,7 @@
"fieldtype": "Currency",
"label": "Grand Total",
"options": "Company:company:default_currency",
"print_width": "120px",
"read_only": 1,
"width": "120px"
}

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:06",
"creation": "2013-02-22 01:27:39",
"docstatus": 0,
"modified": "2013-01-29 16:27:50",
"modified": "2013-03-07 07:03:23",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -34,6 +34,7 @@
"oldfieldname": "account",
"oldfieldtype": "Link",
"options": "Account",
"print_width": "250px",
"reqd": 1,
"search_index": 1,
"width": "250px"
@ -65,6 +66,7 @@
"oldfieldname": "cost_center",
"oldfieldtype": "Link",
"options": "Cost Center",
"print_width": "180px",
"search_index": 0,
"width": "180px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:35:44",
"creation": "2013-02-22 01:27:39",
"docstatus": 0,
"modified": "2012-03-27 14:35:44",
"modified": "2013-03-07 07:03:26",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -10,10 +10,7 @@
"doctype": "DocType",
"istable": 1,
"module": "Accounts",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 3
"name": "__common__"
},
{
"doctype": "DocField",
@ -26,6 +23,7 @@
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"print_width": "300px",
"reqd": 1,
"width": "300px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:07",
"creation": "2013-02-22 01:27:39",
"docstatus": 0,
"modified": "2013-01-29 16:27:50",
"modified": "2013-03-07 07:03:26",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:08",
"creation": "2013-02-22 01:27:40",
"docstatus": 0,
"modified": "2013-01-29 16:27:50",
"modified": "2013-03-07 07:03:26",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -33,6 +33,7 @@
"oldfieldname": "journal_voucher",
"oldfieldtype": "Link",
"options": "Journal Voucher",
"print_width": "180px",
"read_only": 1,
"width": "180px"
},
@ -45,6 +46,7 @@
"oldfieldname": "jv_detail_no",
"oldfieldtype": "Date",
"print_hide": 1,
"print_width": "80px",
"read_only": 1,
"width": "80px"
},
@ -56,6 +58,7 @@
"oldfieldname": "advance_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_width": "100px",
"read_only": 1,
"width": "100px"
},
@ -67,6 +70,7 @@
"oldfieldname": "allocated_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_width": "100px",
"width": "100px"
},
{
@ -76,6 +80,7 @@
"label": "Remarks",
"oldfieldname": "remarks",
"oldfieldtype": "Small Text",
"print_width": "150px",
"read_only": 1,
"width": "150px"
}

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-02-11 10:54:51",
"creation": "2013-02-27 13:45:00",
"docstatus": 0,
"modified": "2013-02-27 18:10:04",
"modified": "2013-03-07 07:03:26",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:08",
"creation": "2013-02-22 01:27:40",
"docstatus": 0,
"modified": "2013-01-29 16:27:50",
"modified": "2013-03-07 07:03:29",
"modified_by": "Administrator",
"owner": "wasim@webnotestech.com"
},
@ -62,6 +62,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"print_width": "300px",
"reqd": 1,
"width": "300px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:09",
"creation": "2013-02-22 01:27:41",
"docstatus": 0,
"modified": "2013-01-29 16:27:51",
"modified": "2013-03-07 07:03:30",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -33,6 +33,7 @@
"oldfieldname": "journal_voucher",
"oldfieldtype": "Link",
"options": "Journal Voucher",
"print_width": "250px",
"read_only": 1,
"width": "250px"
},
@ -45,6 +46,7 @@
"oldfieldname": "jv_detail_no",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "120px",
"read_only": 1,
"width": "120px"
},
@ -56,6 +58,7 @@
"oldfieldname": "advance_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_width": "120px",
"read_only": 1,
"width": "120px"
},
@ -67,6 +70,7 @@
"oldfieldname": "allocated_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_width": "120px",
"width": "120px"
},
{
@ -76,6 +80,7 @@
"label": "Remarks",
"oldfieldname": "remarks",
"oldfieldtype": "Small Text",
"print_width": "150px",
"read_only": 1,
"width": "150px"
}

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-29 19:25:49",
"creation": "2013-03-05 09:11:04",
"docstatus": 0,
"modified": "2013-03-01 13:41:51",
"modified": "2013-03-07 07:03:30",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -73,6 +73,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Text",
"print_width": "200px",
"reqd": 1,
"width": "200px"
},
@ -190,6 +191,7 @@
"oldfieldtype": "Link",
"options": "Account",
"print_hide": 1,
"print_width": "120px",
"reqd": 1,
"width": "120px"
},
@ -203,6 +205,7 @@
"oldfieldtype": "Link",
"options": "Cost Center",
"print_hide": 1,
"print_width": "120px",
"reqd": 0,
"width": "120px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-24 15:56:19",
"creation": "2013-02-22 01:27:41",
"docstatus": 0,
"modified": "2013-01-29 16:28:04",
"modified": "2013-03-07 07:03:31",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -63,6 +63,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"print_width": "300px",
"reqd": 1,
"width": "300px"
},
@ -163,6 +164,7 @@
"label": "Is this Tax included in Basic Rate?",
"no_copy": 0,
"print_hide": 1,
"print_width": "150px",
"report_hide": 1,
"width": "150px"
}

View File

@ -1,15 +1,13 @@
from __future__ import unicode_literals
import webnotes
from webnotes.utils import flt
stock_ledger_entries = None
item_sales_bom = None
from stock.utils import get_buying_amount, get_sales_bom
def execute(filters=None):
if not filters: filters = {}
get_stock_ledger_entries(filters)
get_sales_bom()
stock_ledger_entries = get_stock_ledger_entries(filters)
item_sales_bom = get_sales_bom()
delivery_note_items = webnotes.conn.sql("""select dn.name, dn.posting_date, dn.posting_time,
dn.project_name, item.item_code, item.item_name, item.description, item.warehouse,
@ -26,7 +24,8 @@ def execute(filters=None):
data = []
for row in delivery_note_items:
selling_amount = flt(row.amount)
buying_amount = get_buying_amount(row)
buying_amount = get_buying_amount(row.item_code, row.warehouse,
row.qty, row.name, row.item_row, stock_ledger_entries, item_sales_bom)
if selling_amount:
gross_profit = selling_amount - buying_amount
gross_profit_percent = (gross_profit / selling_amount) * 100.0
@ -38,42 +37,8 @@ def execute(filters=None):
gross_profit, gross_profit_percent, row.project])
return columns, data
def get_buying_amount(row):
if item_sales_bom.get(row.item_code):
# sales bom item
buying_amount = 0.0
for bom_item in item_sales_bom[row.item_code]:
buying_amount += _get_buying_amount(row.name, "[** No Item Row **]",
bom_item.item_code, row.warehouse, bom_item.qty * row.qty)
return buying_amount
else:
# doesn't have sales bom
return _get_buying_amount(row.name, row.item_row, row.item_code, row.warehouse, row.qty)
def _get_buying_amount(voucher_no, item_row, item_code, warehouse, qty):
for i, sle in enumerate(stock_ledger_entries):
if sle.voucher_type == "Delivery Note" and sle.voucher_no == voucher_no:
if (sle.voucher_detail_no == item_row) or \
(sle.item_code == item_code and sle.warehouse == warehouse and \
abs(flt(sle.qty)) == qty):
buying_amount = flt(stock_ledger_entries[i+1].stock_value) - flt(sle.stock_value)
return buying_amount
return 0.0
def get_sales_bom():
global item_sales_bom
item_sales_bom = {}
for r in webnotes.conn.sql("""select parent, item_code, qty from `tabSales BOM Item`""", as_dict=1):
item_sales_bom.setdefault(r.parent, []).append(r)
def get_stock_ledger_entries(filters):
global stock_ledger_entries
def get_stock_ledger_entries(filters):
query = """select item_code, voucher_type, voucher_no,
voucher_detail_no, posting_date, posting_time, stock_value,
warehouse, actual_qty as qty
@ -84,4 +49,4 @@ def get_stock_ledger_entries(filters):
query += " order by item_code desc, warehouse desc, posting_date desc, posting_time desc, name desc"
stock_ledger_entries = webnotes.conn.sql(query, filters, as_dict=True)
return webnotes.conn.sql(query, filters, as_dict=True)

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-02-07 11:00:11",
"creation": "2013-02-22 01:27:42",
"docstatus": 0,
"modified": "2013-02-18 13:39:02",
"modified": "2013-03-07 07:03:27",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:10",
"creation": "2013-02-22 01:27:42",
"docstatus": 0,
"modified": "2013-01-29 16:27:51",
"modified": "2013-03-07 07:03:28",
"modified_by": "Administrator",
"owner": "dhanalekshmi@webnotestech.com"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:10",
"creation": "2013-02-22 01:27:42",
"docstatus": 0,
"modified": "2013-01-29 16:27:51",
"modified": "2013-03-07 07:03:28",
"modified_by": "Administrator",
"owner": "wasim@webnotestech.com"
},
@ -70,6 +70,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Data",
"print_width": "300px",
"read_only": 1,
"width": "300px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:35:52",
"creation": "2013-02-22 01:27:43",
"docstatus": 0,
"modified": "2012-03-27 14:35:52",
"modified": "2013-03-07 07:03:29",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -11,10 +11,7 @@
"doctype": "DocType",
"istable": 1,
"module": "Buying",
"name": "__common__",
"section_style": "Tray",
"show_in_menu": 0,
"version": 2
"name": "__common__"
},
{
"doctype": "DocField",

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-29 19:25:55",
"creation": "2013-02-22 01:27:43",
"docstatus": 0,
"modified": "2013-02-18 13:39:45",
"modified": "2013-03-07 07:03:32",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:13",
"creation": "2013-02-22 01:27:44",
"docstatus": 0,
"modified": "2013-01-22 14:16:18",
"modified": "2013-03-07 07:03:18",
"modified_by": "Administrator",
"owner": "ashwini@webnotestech.com"
},
@ -33,6 +33,7 @@
"label": "Goal",
"oldfieldname": "kra",
"oldfieldtype": "Small Text",
"print_width": "240px",
"reqd": 1,
"width": "240px"
},
@ -43,6 +44,7 @@
"label": "Weightage (%)",
"oldfieldname": "per_weightage",
"oldfieldtype": "Currency",
"print_width": "70px",
"reqd": 1,
"width": "70px"
},
@ -56,6 +58,7 @@
"oldfieldname": "score",
"oldfieldtype": "Select",
"options": "\n0\n1\n2\n3\n4\n5",
"print_width": "70px",
"width": "70px"
},
{
@ -66,6 +69,7 @@
"no_copy": 1,
"oldfieldname": "score_earned",
"oldfieldtype": "Currency",
"print_width": "70px",
"read_only": 1,
"width": "70px"
}

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:13",
"creation": "2013-02-22 01:27:44",
"docstatus": 0,
"modified": "2013-01-22 13:35:58",
"modified": "2013-03-07 07:03:18",
"modified_by": "Administrator",
"owner": "ashwini@webnotestech.com"
},
@ -34,6 +34,7 @@
"label": "KRA",
"oldfieldname": "kra",
"oldfieldtype": "Small Text",
"print_width": "200px",
"width": "200px"
},
{
@ -43,6 +44,7 @@
"label": "Weightage (%)",
"oldfieldname": "per_weightage",
"oldfieldtype": "Currency",
"print_width": "100px",
"width": "100px"
}
]

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:35:54",
"creation": "2013-02-22 01:27:45",
"docstatus": 0,
"modified": "2012-03-27 14:35:54",
"modified": "2013-03-07 07:03:21",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -10,10 +10,7 @@
"doctype": "DocType",
"istable": 1,
"module": "HR",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 5
"name": "__common__"
},
{
"doctype": "DocField",
@ -42,6 +39,7 @@
"label": "Qualification",
"oldfieldname": "qualification",
"oldfieldtype": "Data",
"print_width": "100px",
"width": "100px"
},
{

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:14",
"creation": "2013-02-22 01:27:45",
"docstatus": 0,
"modified": "2013-01-29 16:27:51",
"modified": "2013-03-07 07:03:21",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:35:57",
"creation": "2013-02-22 01:27:45",
"docstatus": 0,
"modified": "2012-03-27 14:35:57",
"modified": "2013-03-07 07:03:21",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -10,10 +10,7 @@
"doctype": "DocType",
"istable": 1,
"module": "HR",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 6
"name": "__common__"
},
{
"doctype": "DocField",

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:35:59",
"creation": "2013-02-22 01:27:45",
"docstatus": 0,
"modified": "2012-03-27 14:35:59",
"modified": "2013-03-07 07:03:21",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -10,10 +10,7 @@
"doctype": "DocType",
"istable": 1,
"module": "HR",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 5
"name": "__common__"
},
{
"doctype": "DocField",

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:14",
"creation": "2013-02-22 01:27:46",
"docstatus": 0,
"modified": "2013-01-29 16:27:51",
"modified": "2013-03-07 07:03:21",
"modified_by": "Administrator",
"owner": "harshada@webnotestech.com"
},
@ -31,6 +31,7 @@
"label": "Expense Date",
"oldfieldname": "expense_date",
"oldfieldtype": "Date",
"print_width": "150px",
"reqd": 0,
"width": "150px"
},
@ -42,6 +43,7 @@
"oldfieldname": "expense_type",
"oldfieldtype": "Link",
"options": "link:Expense Claim Type",
"print_width": "150px",
"reqd": 1,
"width": "150px"
},
@ -52,6 +54,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"print_width": "300px",
"width": "300px"
},
{
@ -62,6 +65,7 @@
"oldfieldname": "claim_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_width": "150px",
"reqd": 1,
"width": "150px"
},
@ -75,6 +79,7 @@
"oldfieldname": "sanctioned_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_width": "150px",
"width": "150px"
}
]

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:35:57",
"creation": "2013-02-22 01:27:46",
"docstatus": 0,
"modified": "2012-03-27 14:35:57",
"modified": "2013-03-07 07:03:21",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -10,10 +10,7 @@
"doctype": "DocType",
"istable": 1,
"module": "HR",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 2
"name": "__common__"
},
{
"doctype": "DocField",
@ -32,6 +29,7 @@
"fieldname": "description",
"fieldtype": "Small Text",
"label": "Description",
"print_width": "300px",
"width": "300px"
},
{

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-02-14 17:37:38",
"creation": "2013-02-22 01:27:47",
"docstatus": 0,
"modified": "2013-02-14 17:41:53",
"modified": "2013-03-07 07:03:23",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -23,6 +23,7 @@
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"print_width": "200px",
"reqd": 1,
"width": "200px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-02-14 17:37:38",
"creation": "2013-02-22 01:27:47",
"docstatus": 0,
"modified": "2013-02-14 17:41:44",
"modified": "2013-03-07 07:03:23",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -19,6 +19,7 @@
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"print_width": "200px",
"reqd": 1,
"width": "200px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:15",
"creation": "2013-02-22 01:27:47",
"docstatus": 0,
"modified": "2013-01-22 14:56:40",
"modified": "2013-03-07 07:03:26",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -44,6 +44,7 @@
"label": "Particulars",
"oldfieldname": "particulars2",
"oldfieldtype": "Small Text",
"print_width": "200px",
"read_only": 1,
"reqd": 1,
"width": "200px"

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:15",
"creation": "2013-02-22 01:27:48",
"docstatus": 0,
"modified": "2013-01-29 16:27:52",
"modified": "2013-03-07 07:03:30",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -46,6 +46,7 @@
"oldfieldname": "d_type",
"oldfieldtype": "Data",
"options": "Deduction Type",
"print_width": "200px",
"width": "200px"
},
{

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:15",
"creation": "2013-02-22 01:27:48",
"docstatus": 0,
"modified": "2013-01-29 16:27:52",
"modified": "2013-03-07 07:03:30",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -46,6 +46,7 @@
"oldfieldname": "e_type",
"oldfieldtype": "Data",
"options": "Earning Type",
"print_width": "200px",
"width": "200px"
},
{

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:16",
"creation": "2013-02-22 01:27:48",
"docstatus": 0,
"modified": "2013-01-29 16:27:52",
"modified": "2013-03-07 07:03:30",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -32,6 +32,7 @@
"oldfieldname": "d_type",
"oldfieldtype": "Select",
"options": "Deduction Type",
"print_width": "200px",
"reqd": 1,
"width": "200px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:16",
"creation": "2013-02-22 01:27:48",
"docstatus": 0,
"modified": "2013-01-29 16:27:52",
"modified": "2013-03-07 07:03:30",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -34,6 +34,7 @@
"oldfieldname": "e_type",
"oldfieldtype": "Data",
"options": "Earning Type",
"print_width": "200px",
"reqd": 1,
"width": "200px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:16",
"creation": "2013-02-22 01:27:48",
"docstatus": 0,
"modified": "2013-01-23 16:43:10",
"modified": "2013-03-07 07:03:18",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -44,6 +44,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Text",
"print_width": "300px",
"width": "300px"
},
{
@ -88,6 +89,7 @@
"oldfieldname": "parent_bom",
"oldfieldtype": "Link",
"options": "BOM",
"print_width": "250px",
"width": "250px"
},
{

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:16",
"creation": "2013-02-22 01:27:49",
"docstatus": 0,
"modified": "2013-01-23 16:43:11",
"modified": "2013-03-07 07:03:18",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -67,6 +67,7 @@
"oldfieldname": "bom_no",
"oldfieldtype": "Link",
"options": "BOM",
"print_width": "150px",
"reqd": 0,
"search_index": 1,
"width": "150px"
@ -103,6 +104,7 @@
"label": "Amount",
"oldfieldname": "amount_as_per_mar",
"oldfieldtype": "Currency",
"print_width": "150px",
"read_only": 1,
"width": "150px"
},
@ -122,6 +124,7 @@
"label": "Item Description",
"oldfieldname": "description",
"oldfieldtype": "Text",
"print_width": "250px",
"reqd": 0,
"width": "250px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:16",
"creation": "2013-02-22 01:27:49",
"docstatus": 0,
"modified": "2013-01-23 16:43:12",
"modified": "2013-03-07 07:03:19",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-19 10:23:34",
"creation": "2013-02-22 01:27:49",
"docstatus": 0,
"modified": "2013-01-22 14:00:34",
"modified": "2013-03-07 07:03:26",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -33,6 +33,7 @@
"oldfieldname": "item_code",
"oldfieldtype": "Link",
"options": "Item",
"print_width": "150px",
"reqd": 1,
"width": "150px"
},
@ -44,6 +45,7 @@
"oldfieldname": "bom_no",
"oldfieldtype": "Link",
"options": "BOM",
"print_width": "100px",
"reqd": 1,
"width": "100px"
},
@ -55,6 +57,7 @@
"label": "Planned Qty",
"oldfieldname": "planned_qty",
"oldfieldtype": "Currency",
"print_width": "100px",
"reqd": 1,
"width": "100px"
},
@ -76,6 +79,7 @@
"label": "SO Pending Qty",
"oldfieldname": "prevdoc_reqd_qty",
"oldfieldtype": "Currency",
"print_width": "100px",
"read_only": 1,
"reqd": 0,
"width": "100px"
@ -87,6 +91,7 @@
"label": "UOM",
"oldfieldname": "stock_uom",
"oldfieldtype": "Data",
"print_width": "80px",
"read_only": 1,
"reqd": 1,
"width": "80px"
@ -98,6 +103,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Text",
"print_width": "200px",
"read_only": 1,
"width": "200px"
}

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:17",
"creation": "2013-02-22 01:27:49",
"docstatus": 0,
"modified": "2013-01-29 16:27:52",
"modified": "2013-03-07 07:03:26",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -46,6 +46,7 @@
"oldfieldname": "prevdoc_docname",
"oldfieldtype": "Data",
"options": "Sales Order",
"print_width": "150px",
"width": "150px"
},
{
@ -55,6 +56,7 @@
"label": "SO Date",
"oldfieldname": "document_date",
"oldfieldtype": "Date",
"print_width": "120px",
"read_only": 1,
"width": "120px"
},
@ -64,6 +66,7 @@
"fieldtype": "Link",
"label": "Customer",
"options": "Customer",
"print_width": "150px",
"read_only": 1,
"width": "150px"
},
@ -73,6 +76,7 @@
"fieldtype": "Currency",
"label": "Grand Total",
"options": "Company:company:default_currency",
"print_width": "120px",
"read_only": 1,
"width": "120px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:36:06",
"creation": "2013-02-22 01:27:50",
"docstatus": 0,
"modified": "2012-03-27 14:36:06",
"modified": "2013-03-07 07:03:26",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -10,9 +10,7 @@
"doctype": "DocType",
"istable": 1,
"module": "Projects",
"name": "__common__",
"section_style": "Simple",
"version": 4
"name": "__common__"
},
{
"doctype": "DocField",
@ -41,6 +39,7 @@
"label": "Milestone",
"oldfieldname": "milestone",
"oldfieldtype": "Text",
"print_width": "300px",
"width": "300px"
},
{

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-02-28 17:56:12",
"creation": "2013-03-05 09:11:06",
"docstatus": 0,
"modified": "2013-03-01 15:20:17",
"modified": "2013-03-07 07:03:34",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -30,6 +30,7 @@
"fieldtype": "Link",
"label": "Time Log",
"options": "Time Log",
"print_width": "200px",
"reqd": 1,
"width": "200px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:18",
"creation": "2013-02-22 01:27:51",
"docstatus": 0,
"modified": "2013-01-22 14:47:00",
"modified": "2013-03-07 07:03:21",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -42,6 +42,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Data",
"print_width": "300px",
"read_only": 1,
"width": "300px"
},
@ -63,6 +64,7 @@
"label": "Serial No",
"oldfieldname": "serial_no",
"oldfieldtype": "Small Text",
"print_width": "180px",
"width": "180px"
},
{
@ -75,6 +77,7 @@
"oldfieldname": "prevdoc_detail_docname",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
"width": "150px"
},
@ -89,6 +92,7 @@
"oldfieldname": "prevdoc_docname",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
"search_index": 1,
"width": "150px"
@ -104,6 +108,7 @@
"oldfieldname": "prevdoc_doctype",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
"search_index": 1,
"width": "150px"

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:19",
"creation": "2013-02-22 01:27:51",
"docstatus": 0,
"modified": "2013-01-29 16:27:53",
"modified": "2013-03-07 07:03:26",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -50,6 +50,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Text",
"print_width": "300px",
"reqd": 1,
"width": "300px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:19",
"creation": "2013-02-22 01:27:52",
"docstatus": 0,
"modified": "2013-01-29 16:27:54",
"modified": "2013-03-07 07:03:29",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -36,6 +36,7 @@
"oldfieldtype": "Link",
"options": "Item",
"print_hide": 0,
"print_width": "150px",
"reqd": 1,
"search_index": 1,
"width": "150px"
@ -58,6 +59,7 @@
"oldfieldname": "item_name",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "150px",
"reqd": 1,
"search_index": 1,
"width": "150px"
@ -70,6 +72,7 @@
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"print_hide": 0,
"print_width": "300px",
"reqd": 1,
"width": "300px"
},
@ -83,6 +86,7 @@
"oldfieldname": "qty",
"oldfieldtype": "Currency",
"print_hide": 0,
"print_width": "100px",
"reqd": 1,
"search_index": 0,
"width": "100px"
@ -95,6 +99,7 @@
"oldfieldname": "stock_uom",
"oldfieldtype": "Data",
"print_hide": 0,
"print_width": "100px",
"read_only": 1,
"reqd": 0,
"width": "100px"
@ -109,6 +114,7 @@
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"print_width": "100px",
"reqd": 0,
"width": "100px"
},
@ -121,6 +127,7 @@
"oldfieldname": "adj_rate",
"oldfieldtype": "Float",
"print_hide": 1,
"print_width": "100px",
"width": "100px"
},
{
@ -134,6 +141,7 @@
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"print_width": "100px",
"reqd": 0,
"search_index": 0,
"width": "100px"
@ -149,6 +157,7 @@
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"print_width": "100px",
"read_only": 1,
"reqd": 0,
"search_index": 0,
@ -163,6 +172,7 @@
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_hide": 1,
"print_width": "100px",
"read_only": 1,
"width": "100px"
},
@ -177,6 +187,7 @@
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_hide": 1,
"print_width": "100px",
"reqd": 0,
"search_index": 0,
"width": "100px"
@ -192,6 +203,7 @@
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_hide": 1,
"print_width": "100px",
"read_only": 1,
"reqd": 0,
"search_index": 0,
@ -222,6 +234,7 @@
"oldfieldtype": "Link",
"options": "Brand",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
"search_index": 1,
"width": "150px"
@ -247,6 +260,7 @@
"oldfieldname": "prevdoc_docname",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
"report_hide": 0,
"width": "150px"
@ -261,6 +275,7 @@
"oldfieldname": "prevdoc_doctype",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
"report_hide": 0,
"width": "150px"

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:20",
"creation": "2013-02-22 01:27:52",
"docstatus": 0,
"modified": "2013-01-29 16:27:54",
"modified": "2013-03-07 07:03:30",
"modified_by": "Administrator",
"owner": "wasim@webnotestech.com"
},
@ -42,6 +42,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Data",
"print_width": "300px",
"read_only": 1,
"width": "300px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:21",
"creation": "2013-02-22 01:27:52",
"docstatus": 0,
"modified": "2013-01-29 16:27:54",
"modified": "2013-03-07 07:03:30",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -34,6 +34,7 @@
"oldfieldname": "item_code",
"oldfieldtype": "Link",
"options": "Item",
"print_width": "150px",
"reqd": 1,
"search_index": 1,
"width": "150px"
@ -55,6 +56,7 @@
"oldfieldname": "item_name",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "150",
"reqd": 1,
"width": "150"
},
@ -66,6 +68,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"print_width": "300px",
"reqd": 1,
"search_index": 1,
"width": "300px"
@ -78,6 +81,7 @@
"label": "Quantity",
"oldfieldname": "qty",
"oldfieldtype": "Currency",
"print_width": "100px",
"reqd": 1,
"width": "100px"
},
@ -89,6 +93,7 @@
"label": "UOM",
"oldfieldname": "stock_uom",
"oldfieldtype": "Data",
"print_width": "70px",
"read_only": 1,
"reqd": 0,
"width": "70px"
@ -103,6 +108,7 @@
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"print_width": "70px",
"reqd": 0,
"width": "70px"
},
@ -115,6 +121,7 @@
"oldfieldname": "adj_rate",
"oldfieldtype": "Float",
"print_hide": 1,
"print_width": "70px",
"width": "70px"
},
{
@ -126,6 +133,7 @@
"oldfieldname": "export_rate",
"oldfieldtype": "Currency",
"options": "currency",
"print_width": "100px",
"reqd": 0,
"width": "100px"
},
@ -139,6 +147,7 @@
"oldfieldname": "export_amount",
"oldfieldtype": "Currency",
"options": "currency",
"print_width": "100px",
"read_only": 1,
"reqd": 0,
"width": "100px"
@ -152,6 +161,7 @@
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_hide": 1,
"print_width": "100px",
"read_only": 1,
"width": "100px"
},
@ -165,6 +175,7 @@
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_hide": 1,
"print_width": "100px",
"reqd": 0,
"width": "100px"
},
@ -179,6 +190,7 @@
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_hide": 1,
"print_width": "100px",
"read_only": 1,
"reqd": 0,
"width": "100px"
@ -193,6 +205,7 @@
"oldfieldtype": "Link",
"options": "Warehouse",
"print_hide": 1,
"print_width": "150px",
"reqd": 0,
"width": "150px"
},
@ -207,6 +220,7 @@
"oldfieldname": "projected_qty",
"oldfieldtype": "Currency",
"print_hide": 1,
"print_width": "70px",
"read_only": 1,
"width": "70px"
},
@ -218,6 +232,7 @@
"label": "Actual Qty",
"no_copy": 1,
"print_hide": 1,
"print_width": "70px",
"read_only": 1,
"width": "70px"
},
@ -233,6 +248,7 @@
"oldfieldname": "delivered_qty",
"oldfieldtype": "Currency",
"print_hide": 1,
"print_width": "100px",
"read_only": 1,
"search_index": 0,
"width": "100px"
@ -258,6 +274,7 @@
"oldfieldname": "planned_qty",
"oldfieldtype": "Currency",
"print_hide": 1,
"print_width": "50px",
"read_only": 1,
"report_hide": 1,
"width": "50px"
@ -272,6 +289,7 @@
"oldfieldname": "produced_qty",
"oldfieldtype": "Currency",
"print_hide": 1,
"print_width": "50px",
"read_only": 1,
"report_hide": 1,
"width": "50px"

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:22",
"creation": "2013-02-22 01:27:53",
"docstatus": 0,
"modified": "2013-01-29 16:27:56",
"modified": "2013-03-07 07:03:31",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -33,6 +33,7 @@
"oldfieldname": "sales_person",
"oldfieldtype": "Link",
"options": "Sales Person",
"print_width": "200px",
"reqd": 1,
"search_index": 1,
"width": "200px"
@ -44,6 +45,7 @@
"label": "Designation",
"oldfieldname": "sales_designation",
"oldfieldtype": "Data",
"print_width": "100px",
"width": "100px"
},
{
@ -54,6 +56,7 @@
"label": "Contact No.",
"oldfieldname": "contact_no",
"oldfieldtype": "Data",
"print_width": "100px",
"width": "100px"
},
{
@ -63,6 +66,7 @@
"label": "Allocated (%)",
"oldfieldname": "allocated_percentage",
"oldfieldtype": "Currency",
"print_width": "100px",
"reqd": 0,
"width": "100px"
},
@ -74,6 +78,7 @@
"oldfieldname": "allocated_amount",
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_width": "120px",
"reqd": 0,
"width": "120px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:36:25",
"creation": "2013-02-22 01:27:57",
"docstatus": 0,
"modified": "2012-03-27 14:36:25",
"modified": "2013-03-07 07:03:32",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -10,10 +10,7 @@
"doctype": "DocType",
"istable": 1,
"module": "Setup",
"name": "__common__",
"section_style": "Tray",
"show_in_menu": 0,
"version": 3
"name": "__common__"
},
{
"doctype": "DocField",
@ -41,7 +38,6 @@
"fieldtype": "Check",
"label": "Remove",
"oldfieldname": "remove",
"oldfieldtype": "Check",
"trigger": "Client"
"oldfieldtype": "Check"
}
]

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:36:25",
"creation": "2013-02-22 01:27:58",
"docstatus": 0,
"modified": "2012-03-27 14:36:25",
"modified": "2013-03-07 07:03:32",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -10,10 +10,7 @@
"doctype": "DocType",
"istable": 1,
"module": "Setup",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 4
"name": "__common__"
},
{
"doctype": "DocField",
@ -23,6 +20,7 @@
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"print_width": "150px",
"reqd": 1,
"width": "150px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:24",
"creation": "2013-02-22 01:27:58",
"docstatus": 0,
"modified": "2013-01-23 16:52:10",
"modified": "2013-03-07 07:03:33",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:36:26",
"creation": "2013-02-22 01:27:59",
"docstatus": 0,
"modified": "2012-03-27 14:36:26",
"modified": "2013-03-07 07:03:34",
"modified_by": "Administrator",
"owner": "swarnalata@webnotestech.com"
},
@ -10,10 +10,7 @@
"doctype": "DocType",
"istable": 1,
"module": "Setup",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 5
"name": "__common__"
},
{
"doctype": "DocField",
@ -22,6 +19,7 @@
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"print_width": "200px",
"width": "200px"
},
{

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:36:26",
"creation": "2013-02-22 01:27:59",
"docstatus": 0,
"modified": "2012-03-27 14:36:26",
"modified": "2013-03-07 07:03:34",
"modified_by": "Administrator",
"owner": "swarnalata@webnotestech.com"
},
@ -10,10 +10,7 @@
"doctype": "DocType",
"istable": 1,
"module": "Setup",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 9
"name": "__common__"
},
{
"doctype": "DocField",
@ -35,6 +32,7 @@
"oldfieldname": "rule_field",
"oldfieldtype": "Select",
"options": "[]",
"print_width": "200px",
"width": "200px"
},
{
@ -53,6 +51,7 @@
"label": "Value",
"oldfieldname": "value",
"oldfieldtype": "Data",
"print_width": "100px",
"width": "100px"
},
{
@ -70,6 +69,7 @@
"label": "Message when Cond. False",
"oldfieldname": "message",
"oldfieldtype": "Data",
"print_width": "200px",
"width": "200px"
},
{

View File

@ -17,7 +17,7 @@
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cstr, flt, getdate
from webnotes.utils import cstr, flt, getdate, cint
from webnotes.model.bean import getlist
from webnotes.model.code import get_obj
from webnotes import msgprint
@ -251,6 +251,8 @@ class DocType(SellingController):
self.update_stock_ledger(update_stock = 1)
self.credit_limit()
self.make_gl_entries()
# set DN status
webnotes.conn.set(self.doc, 'status', 'Submitted')
@ -293,6 +295,8 @@ class DocType(SellingController):
self.update_stock_ledger(update_stock = -1)
webnotes.conn.set(self.doc, 'status', 'Cancelled')
self.cancel_packing_slips()
self.make_gl_entries()
def check_next_docstatus(self):
@ -389,4 +393,71 @@ class DocType(SellingController):
self.doclist = get_obj('Sales Common').make_packing_list(self,'delivery_note_details')
sl = get_obj('Stock Ledger')
sl.scrub_serial_nos(self)
sl.scrub_serial_nos(self, 'packing_details')
sl.scrub_serial_nos(self, 'packing_details')
def make_gl_entries(self):
if not cint(webnotes.defaults.get_global_default("auto_inventory_accounting")):
return
abbr = webnotes.conn.get_value("Company", self.doc.company, "abbr")
stock_delivered_account = "Stock Delivered But Not Billed - %s" % (abbr,)
stock_in_hand_account = self.get_stock_in_hand_account()
total_buying_amount = self.get_total_buying_amount()
if total_buying_amount:
gl_entries = [
# credit stock in hand account
self.get_gl_dict({
"account": stock_in_hand_account,
"against": stock_delivered_account,
"credit": total_buying_amount,
"remarks": self.doc.remarks or "Accounting Entry for Stock",
}, self.doc.docstatus == 2),
# debit stock received but not billed account
self.get_gl_dict({
"account": stock_delivered_account,
"against": stock_in_hand_account,
"debit": total_buying_amount,
"remarks": self.doc.remarks or "Accounting Entry for Stock",
}, self.doc.docstatus == 2),
]
from accounts.general_ledger import make_gl_entries
make_gl_entries(gl_entries, cancel=self.doc.docstatus == 2)
def get_total_buying_amount(self):
from stock.utils import get_buying_amount, get_sales_bom
stock_ledger_entries = self.get_stock_ledger_entries()
item_sales_bom = get_sales_bom()
total_buying_amount = 0
if stock_ledger_entries:
for item in self.doclist.get({"parentfield": "delivery_note_details"}):
buying_amount = get_buying_amount(item.item_code, item.warehouse, item.qty,
self.doc.name, item.name, stock_ledger_entries, item_sales_bom)
total_buying_amount += buying_amount
return total_buying_amount
def get_stock_ledger_entries(self):
item_list, warehouse_list = self.get_distinct_item_warehouse()
if item_list and warehouse_list:
return webnotes.conn.sql("""select item_code, voucher_type, voucher_no,
voucher_detail_no, posting_date, posting_time, stock_value,
warehouse, actual_qty as qty from `tabStock Ledger Entry`
where ifnull(`is_cancelled`, "No") = "No" and company = %s
and item_code in (%s) and warehouse in (%s)
order by item_code desc, warehouse desc, posting_date desc,
posting_time desc, name desc""" %
('%s', ', '.join(['%s']*len(item_list)), ', '.join(['%s']*len(warehouse_list))),
tuple([self.doc.company] + item_list + warehouse_list), as_dict=1)
def get_distinct_item_warehouse(self):
item_list = []
warehouse_list = []
for item in self.doclist.get({"parentfield": "delivery_note_details"}) \
+ self.doclist.get({"parentfield": "packing_details"}):
item_list.append(item.item_code)
warehouse_list.append(item.warehouse)
return list(set(item_list)), list(set(warehouse_list))

View File

@ -1,3 +1,89 @@
# ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals
import unittest
import webnotes
import webnotes.defaults
from webnotes.utils import cint
class TestDeliveryNote(unittest.TestCase):
def _insert_purchase_receipt(self):
from stock.doctype.purchase_receipt.test_purchase_receipt import test_records as pr_test_records
pr = webnotes.bean(copy=pr_test_records[0])
pr.run_method("calculate_taxes_and_totals")
pr.insert()
pr.submit()
def test_delivery_note_no_gl_entry(self):
webnotes.conn.sql("""delete from `tabBin`""")
webnotes.defaults.set_global_default("auto_inventory_accounting", 0)
self.assertEqual(cint(webnotes.defaults.get_global_default("auto_inventory_accounting")), 0)
self._insert_purchase_receipt()
dn = webnotes.bean(copy=test_records[0])
dn.insert()
dn.submit()
gl_entries = webnotes.conn.sql("""select account, debit, credit
from `tabGL Entry` where voucher_type='Delivery Note' and voucher_no=%s
order by account desc""", dn.doc.name, as_dict=1)
self.assertTrue(not gl_entries)
def test_delivery_note_gl_entry(self):
webnotes.conn.sql("""delete from `tabBin`""")
webnotes.defaults.set_global_default("auto_inventory_accounting", 1)
self.assertEqual(cint(webnotes.defaults.get_global_default("auto_inventory_accounting")), 1)
self._insert_purchase_receipt()
dn = webnotes.bean(copy=test_records[0])
stock_in_hand_account = webnotes.conn.get_value("Company", dn.doc.company,
"stock_in_hand_account")
from accounts.utils import get_balance_on
prev_bal = get_balance_on(stock_in_hand_account, dn.doc.posting_date)
dn.insert()
dn.submit()
gl_entries = webnotes.conn.sql("""select account, debit, credit
from `tabGL Entry` where voucher_type='Delivery Note' and voucher_no=%s
order by account asc""", dn.doc.name, as_dict=1)
self.assertTrue(gl_entries)
expected_values = sorted([
[stock_in_hand_account, 0.0, 375.0],
["Stock Delivered But Not Billed - _TC", 375.0, 0.0]
])
for i, gle in enumerate(gl_entries):
self.assertEquals(expected_values[i][0], gle.account)
self.assertEquals(expected_values[i][1], gle.debit)
self.assertEquals(expected_values[i][2], gle.credit)
# check stock in hand balance
bal = get_balance_on(stock_in_hand_account, dn.doc.posting_date)
self.assertEquals(bal, prev_bal - 375.0)
webnotes.defaults.set_global_default("auto_inventory_accounting", 0)
test_records = [
[
{
@ -15,18 +101,19 @@ test_records = [
"price_list_name": "_Test Price List",
"status": "Draft",
"territory": "_Test Territory",
"net_total": 500.0,
"grand_total": 500.0,
"grand_total_export": 500.0,
},
{
"description": "CPU",
"doctype": "Delivery Note Item",
"item_code": "_Test Item Home Desktop 100",
"item_code": "_Test Item",
"item_name": "CPU",
"parentfield": "delivery_note_details",
"qty": 4.0,
"basic_rate": 50.0,
"export_rate": 50.0,
"qty": 5.0,
"basic_rate": 100.0,
"export_rate": 100.0,
"amount": 500.0,
"warehouse": "_Test Warehouse",
"stock_uom": "No."

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:26",
"creation": "2013-02-22 01:28:00",
"docstatus": 0,
"modified": "2013-01-29 16:27:56",
"modified": "2013-03-07 07:03:20",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -41,6 +41,7 @@
"oldfieldname": "item_code",
"oldfieldtype": "Link",
"options": "Item",
"print_width": "150px",
"reqd": 1,
"search_index": 1,
"width": "150px"
@ -62,6 +63,7 @@
"oldfieldname": "item_name",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "150px",
"reqd": 1,
"width": "150px"
},
@ -72,6 +74,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"print_width": "300px",
"reqd": 1,
"width": "300px"
},
@ -83,6 +86,7 @@
"label": "Quantity",
"oldfieldname": "qty",
"oldfieldtype": "Currency",
"print_width": "100px",
"reqd": 1,
"width": "100px"
},
@ -94,6 +98,7 @@
"oldfieldname": "stock_uom",
"oldfieldtype": "Data",
"print_hide": 0,
"print_width": "50px",
"read_only": 1,
"reqd": 1,
"width": "50px"
@ -109,6 +114,7 @@
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 1,
"print_width": "100px",
"reqd": 0,
"width": "100px"
},
@ -121,6 +127,7 @@
"oldfieldname": "adj_rate",
"oldfieldtype": "Float",
"print_hide": 1,
"print_width": "100px",
"width": "100px"
},
{
@ -132,6 +139,7 @@
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"print_width": "150px",
"reqd": 0,
"width": "150px"
},
@ -144,6 +152,7 @@
"oldfieldtype": "Currency",
"options": "currency",
"print_hide": 0,
"print_width": "100px",
"read_only": 1,
"reqd": 0,
"width": "100px"
@ -157,6 +166,7 @@
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_hide": 1,
"print_width": "100px",
"read_only": 1,
"width": "100px"
},
@ -170,6 +180,7 @@
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_hide": 1,
"print_width": "150px",
"reqd": 0,
"width": "150px"
},
@ -182,6 +193,7 @@
"oldfieldtype": "Currency",
"options": "Company:company:default_currency",
"print_hide": 1,
"print_width": "100px",
"read_only": 1,
"reqd": 0,
"width": "100px"
@ -195,6 +207,7 @@
"oldfieldtype": "Link",
"options": "Warehouse",
"print_hide": 1,
"print_width": "100px",
"width": "100px"
},
{
@ -240,6 +253,7 @@
"oldfieldtype": "Link",
"options": "Brand",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
"width": "150px"
},
@ -252,6 +266,7 @@
"oldfieldname": "actual_qty",
"oldfieldtype": "Currency",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
"width": "150px"
},
@ -263,6 +278,7 @@
"no_copy": 1,
"options": "currency",
"print_hide": 1,
"print_width": "100px",
"read_only": 1,
"width": "100px"
},
@ -275,6 +291,7 @@
"oldfieldname": "installed_qty",
"oldfieldtype": "Currency",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
"width": "150px"
},
@ -299,6 +316,7 @@
"oldfieldname": "prevdoc_doctype",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
"search_index": 1,
"width": "150px"
@ -314,6 +332,7 @@
"oldfieldname": "prevdoc_docname",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
"search_index": 1,
"width": "150px"
@ -340,6 +359,7 @@
"oldfieldname": "prevdoc_detail_docname",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
"search_index": 0,
"width": "150px"

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:27",
"creation": "2013-02-22 01:28:00",
"docstatus": 0,
"modified": "2013-01-22 14:46:40",
"modified": "2013-03-07 07:03:20",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -74,6 +74,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Text",
"print_width": "300px",
"read_only": 1,
"width": "300px"
},

View File

@ -1,33 +1,33 @@
[
{
"owner": "Administrator",
"creation": "2013-02-22 01:28:00",
"docstatus": 0,
"creation": "2012-12-07 14:28:33",
"modified": "2013-03-07 07:03:21",
"modified_by": "Administrator",
"modified": "2012-12-07 14:28:33"
"owner": "Administrator"
},
{
"istable": 1,
"description": "Featured Item in Item Group",
"doctype": "DocType",
"istable": 1,
"module": "Stock",
"name": "__common__"
},
{
"parent": "Featured Item",
"doctype": "DocField",
"name": "__common__",
"label": "Item",
"parenttype": "DocType",
"options": "Item",
"fieldname": "item",
"fieldtype": "Link",
"permlevel": 0,
"parentfield": "fields"
"label": "Item",
"name": "__common__",
"options": "Item",
"parent": "Featured Item",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0
},
{
"name": "Featured Item",
"doctype": "DocType"
"doctype": "DocType",
"name": "Featured Item"
},
{
"doctype": "DocField"

View File

@ -2,7 +2,7 @@
{
"creation": "2013-02-21 14:54:43",
"docstatus": 0,
"modified": "2013-02-28 10:43:02",
"modified": "2013-03-06 16:02:47",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -402,18 +402,6 @@
"oldfieldtype": "Link",
"options": "Cost Center"
},
{
"depends_on": "eval:doc.is_purchase_item==\"Yes\"",
"description": "Buying Cost will be updated from Purchase Orders and Purchase Receipts. <br>The buying cost will calculated by moving average method.",
"doctype": "DocField",
"fieldname": "buying_cost",
"fieldtype": "Float",
"label": "Buying Cost",
"no_copy": 1,
"oldfieldname": "buying_cost",
"oldfieldtype": "Currency",
"read_only": 1
},
{
"depends_on": "eval:doc.is_purchase_item==\"Yes\"",
"doctype": "DocField",

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:36:33",
"creation": "2013-02-22 01:28:01",
"docstatus": 0,
"modified": "2012-03-27 14:36:33",
"modified": "2013-03-07 07:03:22",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -14,10 +14,7 @@
"istable": 1,
"module": "Stock",
"name": "__common__",
"read_only": 0,
"section_style": "Tray",
"show_in_menu": 0,
"version": 7
"read_only": 0
},
{
"doctype": "DocField",
@ -42,6 +39,7 @@
"oldfieldname": "price_list_name",
"oldfieldtype": "Select",
"options": "Customer",
"print_width": "180px",
"width": "180px"
},
{
@ -51,6 +49,7 @@
"label": "Ref Code",
"oldfieldname": "ref_rate",
"oldfieldtype": "Currency",
"print_width": "120px",
"width": "120px"
}
]

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-21 18:19:14",
"creation": "2013-02-22 01:28:01",
"docstatus": 0,
"modified": "2013-01-23 16:57:49",
"modified": "2013-03-07 07:03:22",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:36:33",
"creation": "2013-02-22 01:28:01",
"docstatus": 0,
"modified": "2012-03-27 14:36:33",
"modified": "2013-03-07 07:03:22",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -11,10 +11,7 @@
"doctype": "DocType",
"istable": 1,
"module": "Stock",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 1
"name": "__common__"
},
{
"doctype": "DocField",
@ -36,6 +33,7 @@
"in_filter": 0,
"label": "Parameter",
"oldfieldname": "specification",
"print_width": "200px",
"reqd": 1,
"search_index": 0,
"width": "200px"

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-02-18 12:48:07",
"creation": "2013-02-22 01:28:01",
"docstatus": 0,
"modified": "2013-02-18 12:54:46",
"modified": "2013-03-07 07:03:22",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:36:33",
"creation": "2013-02-22 01:28:01",
"docstatus": 0,
"modified": "2012-03-27 14:36:33",
"modified": "2013-03-07 07:03:22",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -10,10 +10,7 @@
"doctype": "DocType",
"istable": 1,
"module": "Stock",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 3
"name": "__common__"
},
{
"doctype": "DocField",
@ -39,6 +36,7 @@
"fieldname": "supplier_part_no",
"fieldtype": "Data",
"label": "Supplier Part Number",
"print_width": "200px",
"width": "200px"
}
]

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:27",
"creation": "2013-02-22 01:28:01",
"docstatus": 0,
"modified": "2013-01-23 16:54:25",
"modified": "2013-03-07 07:03:22",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -1,42 +1,44 @@
[
{
"owner": "Administrator",
"creation": "2013-02-22 01:28:01",
"docstatus": 0,
"creation": "2012-12-07 15:42:25",
"modified": "2013-03-07 07:03:22",
"modified_by": "Administrator",
"modified": "2012-12-17 15:29:37"
"owner": "Administrator"
},
{
"istable": 1,
"description": "Table for Item that will be shown in Web Site",
"doctype": "DocType",
"istable": 1,
"module": "Stock",
"name": "__common__"
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Item Website Specification",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"name": "Item Website Specification",
"doctype": "DocType"
"doctype": "DocType",
"name": "Item Website Specification"
},
{
"doctype": "DocField",
"label": "Label",
"width": "150px",
"fieldname": "label",
"fieldtype": "Data"
"fieldtype": "Data",
"label": "Label",
"print_width": "150px",
"width": "150px"
},
{
"doctype": "DocField",
"label": "Description",
"width": "300px",
"fieldname": "description",
"fieldtype": "Text"
"fieldtype": "Text",
"label": "Description",
"print_width": "300px",
"width": "300px"
}
]

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:27",
"creation": "2013-02-22 01:28:02",
"docstatus": 0,
"modified": "2013-01-23 16:55:26",
"modified": "2013-03-07 07:03:23",
"modified_by": "Administrator",
"owner": "wasim@webnotestech.com"
},
@ -42,6 +42,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Data",
"print_width": "300px",
"width": "300px"
},
{

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:36:34",
"creation": "2013-02-22 01:28:02",
"docstatus": 0,
"modified": "2012-03-27 14:36:34",
"modified": "2013-03-07 07:03:23",
"modified_by": "Administrator",
"owner": "wasim@webnotestech.com"
},
@ -10,10 +10,7 @@
"doctype": "DocType",
"istable": 1,
"module": "Stock",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 5
"name": "__common__"
},
{
"doctype": "DocField",
@ -35,6 +32,7 @@
"oldfieldname": "purchase_receipt_no",
"oldfieldtype": "Link",
"options": "Purchase Receipt",
"print_width": "220px",
"width": "220px"
},
{
@ -44,6 +42,7 @@
"label": "Select PR",
"oldfieldname": "include_in_landed_cost",
"oldfieldtype": "Check",
"print_width": "120px",
"width": "120px"
}
]

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-02-20 13:25:31",
"creation": "2013-02-22 01:28:02",
"docstatus": 0,
"modified": "2013-02-20 14:06:58",
"modified": "2013-03-07 07:03:25",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -35,6 +35,7 @@
"oldfieldname": "schedule_date",
"oldfieldtype": "Date",
"print_hide": 0,
"print_width": "100px",
"reqd": 1,
"width": "100px"
},
@ -47,6 +48,7 @@
"oldfieldname": "item_code",
"oldfieldtype": "Link",
"options": "Item",
"print_width": "100px",
"reqd": 1,
"search_index": 1,
"width": "100px"
@ -58,6 +60,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Text",
"print_width": "250px",
"reqd": 1,
"width": "250px"
},
@ -70,6 +73,7 @@
"oldfieldtype": "Link",
"options": "Warehouse",
"print_hide": 0,
"print_width": "100px",
"reqd": 0,
"width": "100px"
},
@ -82,6 +86,7 @@
"no_copy": 0,
"oldfieldname": "qty",
"oldfieldtype": "Currency",
"print_width": "80px",
"reqd": 1,
"width": "80px"
},
@ -94,6 +99,7 @@
"oldfieldname": "uom",
"oldfieldtype": "Link",
"options": "UOM",
"print_width": "70px",
"read_only": 1,
"reqd": 1,
"width": "70px"
@ -117,6 +123,7 @@
"label": "Item Name",
"oldfieldname": "item_name",
"oldfieldtype": "Data",
"print_width": "100px",
"reqd": 1,
"search_index": 1,
"width": "100px"
@ -145,6 +152,7 @@
"oldfieldtype": "Link",
"options": "Brand",
"print_hide": 1,
"print_width": "100px",
"read_only": 1,
"width": "100px"
},
@ -157,6 +165,7 @@
"oldfieldname": "min_order_qty",
"oldfieldtype": "Currency",
"print_hide": 1,
"print_width": "70px",
"read_only": 1,
"reqd": 0,
"width": "70px"
@ -170,6 +179,7 @@
"oldfieldname": "projected_qty",
"oldfieldtype": "Currency",
"print_hide": 1,
"print_width": "70px",
"read_only": 1,
"width": "70px"
},

View File

@ -0,0 +1,8 @@
# For license information, please see license.txt
from __future__ import unicode_literals
import webnotes
class DocType:
def __init__(self, d, dl):
self.doc, self.doclist = d, dl

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:28",
"creation": "2013-02-22 01:28:02",
"docstatus": 0,
"modified": "2013-01-22 14:47:04",
"modified": "2013-03-07 07:03:26",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -31,6 +31,7 @@
"fieldtype": "Link",
"label": "Item Code",
"options": "Item",
"print_width": "100px",
"reqd": 1,
"width": "100px"
},
@ -39,6 +40,7 @@
"fieldname": "item_name",
"fieldtype": "Data",
"label": "Item Name",
"print_width": "200px",
"read_only": 1,
"width": "200px"
},
@ -47,6 +49,7 @@
"fieldname": "qty",
"fieldtype": "Float",
"label": "Quantity",
"print_width": "100px",
"reqd": 1,
"width": "100px"
},
@ -55,6 +58,7 @@
"fieldname": "stock_uom",
"fieldtype": "Data",
"label": "UOM",
"print_width": "100px",
"read_only": 1,
"width": "100px"
},
@ -63,6 +67,7 @@
"fieldname": "net_weight",
"fieldtype": "Float",
"label": "Net Weight",
"print_width": "100px",
"read_only": 1,
"width": "100px"
},
@ -72,6 +77,7 @@
"fieldtype": "Link",
"label": "Weight UOM",
"options": "UOM",
"print_width": "100px",
"read_only": 1,
"width": "100px"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-02-07 08:28:23",
"creation": "2013-02-22 01:28:03",
"docstatus": 0,
"modified": "2013-02-11 08:13:11",
"modified": "2013-03-07 07:03:28",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:29",
"creation": "2013-02-22 01:28:03",
"docstatus": 0,
"modified": "2013-01-23 16:56:21",
"modified": "2013-03-07 07:03:30",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -50,6 +50,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Text",
"print_width": "300px",
"width": "300px"
},
{

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-29 19:25:45",
"creation": "2013-02-22 01:28:04",
"docstatus": 0,
"modified": "2013-02-20 16:46:26",
"modified": "2013-03-07 07:03:32",
"modified_by": "Administrator",
"owner": "Administrator"
},

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:36:40",
"creation": "2013-02-22 01:28:04",
"docstatus": 0,
"modified": "2012-03-27 14:36:40",
"modified": "2013-03-07 07:03:34",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -11,10 +11,7 @@
"doctype": "DocType",
"istable": 1,
"module": "Stock",
"name": "__common__",
"section_style": "Tray",
"show_in_menu": 0,
"version": 1
"name": "__common__"
},
{
"doctype": "DocField",

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-02-04 11:33:57",
"creation": "2013-02-22 01:28:05",
"docstatus": 0,
"modified": "2013-02-04 11:36:16",
"modified": "2013-03-07 07:03:34",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -24,6 +24,7 @@
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"print_width": "200px",
"width": "200px"
},
{

View File

@ -163,4 +163,37 @@ def get_warehouse_list(doctype, txt, searchfield, start, page_len, filters):
elif webnotes.session.user in warehouse_users:
wlist.append([w])
return wlist
def get_buying_amount(item_code, warehouse, qty, voucher_no, voucher_detail_no,
stock_ledger_entries, item_sales_bom):
if item_sales_bom.get(item_code):
# sales bom item
buying_amount = 0.0
for bom_item in item_sales_bom[item_code]:
buying_amount += _get_buying_amount(voucher_no, "[** No Item Row **]",
item_code, warehouse, bom_item.qty * qty, stock_ledger_entries)
return buying_amount
else:
# doesn't have sales bom
return _get_buying_amount(voucher_no, voucher_detail_no, item_code, warehouse, qty,
stock_ledger_entries)
def _get_buying_amount(voucher_no, item_row, item_code, warehouse, qty, stock_ledger_entries):
for i, sle in enumerate(stock_ledger_entries):
if sle.voucher_type == "Delivery Note" and sle.voucher_no == voucher_no:
if (sle.voucher_detail_no == item_row) or \
(sle.item_code == item_code and sle.warehouse == warehouse and \
abs(flt(sle.qty)) == qty):
buying_amount = flt(stock_ledger_entries[i+1].stock_value) - flt(sle.stock_value)
return buying_amount
return 0.0
def get_sales_bom():
item_sales_bom = {}
for r in webnotes.conn.sql("""select parent, item_code, qty from `tabSales BOM Item`""",
as_dict=1):
item_sales_bom.setdefault(r.parent, []).append(r)
return item_sales_bom

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:31",
"creation": "2013-02-22 01:28:05",
"docstatus": 0,
"modified": "2013-02-04 10:30:18",
"modified": "2013-03-07 07:03:23",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -94,6 +94,7 @@
"no_copy": 0,
"oldfieldname": "serial_no",
"oldfieldtype": "Small Text",
"print_width": "160px",
"read_only": 1,
"search_index": 0,
"width": "160px"

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:31",
"creation": "2013-02-22 01:28:05",
"docstatus": 0,
"modified": "2013-01-22 14:47:03",
"modified": "2013-03-07 07:03:24",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -53,6 +53,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Data",
"print_width": "300px",
"read_only": 1,
"width": "300px"
},
@ -126,6 +127,7 @@
"oldfieldname": "prevdoc_docname",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
"search_index": 1,
"width": "150px"

View File

@ -1,8 +1,8 @@
[
{
"creation": "2013-01-10 16:34:31",
"creation": "2013-02-22 01:28:06",
"docstatus": 0,
"modified": "2013-01-22 14:47:03",
"modified": "2013-03-07 07:03:24",
"modified_by": "Administrator",
"owner": "ashwini@webnotestech.com"
},
@ -32,6 +32,7 @@
"label": "Description",
"oldfieldname": "description",
"oldfieldtype": "Small Text",
"print_width": "300px",
"reqd": 1,
"width": "300px"
},
@ -90,6 +91,7 @@
"oldfieldname": "prevdoc_docname",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "160px",
"read_only": 1,
"report_hide": 1,
"width": "160px"
@ -104,6 +106,7 @@
"oldfieldname": "prevdoc_detail_docname",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "160px",
"read_only": 1,
"report_hide": 1,
"width": "160px"
@ -118,6 +121,7 @@
"oldfieldname": "prevdoc_doctype",
"oldfieldtype": "Data",
"print_hide": 1,
"print_width": "150px",
"read_only": 1,
"report_hide": 1,
"width": "150px"

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:36:46",
"creation": "2013-02-22 01:28:07",
"docstatus": 0,
"modified": "2012-03-27 14:36:46",
"modified": "2013-03-07 07:03:21",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -11,10 +11,7 @@
"doctype": "DocType",
"istable": 1,
"module": "Utilities",
"name": "__common__",
"section_style": "Tray",
"show_in_menu": 0,
"version": 4
"name": "__common__"
},
{
"doctype": "DocField",

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:36:47",
"creation": "2013-02-22 01:28:07",
"docstatus": 0,
"modified": "2012-03-27 14:36:47",
"modified": "2013-03-07 07:03:32",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -10,9 +10,7 @@
"doctype": "DocType",
"istable": 1,
"module": "Utilities",
"name": "__common__",
"section_style": "Tray",
"version": 2
"name": "__common__"
},
{
"doctype": "DocField",
@ -39,6 +37,7 @@
"fieldname": "receiver_name",
"label": "Receiver Name",
"oldfieldname": "receiver_name",
"print_width": "350px",
"width": "350px"
},
{
@ -46,6 +45,7 @@
"fieldname": "mobile_no",
"label": "Mobile No",
"oldfieldname": "mobile_no",
"print_width": "200px",
"reqd": 1,
"width": "200px"
}

View File

@ -1,33 +1,34 @@
[
{
"owner": "Administrator",
"creation": "2013-02-22 01:28:07",
"docstatus": 0,
"creation": "2012-12-27 14:28:45",
"modified": "2013-03-07 07:03:18",
"modified_by": "Administrator",
"modified": "2012-12-27 14:49:44"
"owner": "Administrator"
},
{
"istable": 1,
"name": "__common__",
"doctype": "DocType",
"module": "Website"
"istable": 1,
"module": "Website",
"name": "__common__"
},
{
"parent": "About Us Team Member",
"doctype": "DocField",
"name": "__common__",
"label": "Employee",
"width": "300px",
"parenttype": "DocType",
"options": "Employee",
"fieldname": "employee",
"fieldtype": "Link",
"label": "Employee",
"name": "__common__",
"options": "Employee",
"parent": "About Us Team Member",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"print_width": "300px",
"width": "300px"
},
{
"name": "About Us Team Member",
"doctype": "DocType"
"doctype": "DocType",
"name": "About Us Team Member"
},
{
"doctype": "DocField"

View File

@ -1,40 +1,41 @@
[
{
"owner": "Administrator",
"creation": "2013-02-22 01:28:08",
"docstatus": 0,
"creation": "2012-12-27 14:25:38",
"modified": "2013-03-07 07:03:19",
"modified_by": "Administrator",
"modified": "2012-12-27 14:25:38"
"owner": "Administrator"
},
{
"istable": 1,
"name": "__common__",
"doctype": "DocType",
"module": "Website"
"istable": 1,
"module": "Website",
"name": "__common__"
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Company History",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"name": "Company History",
"doctype": "DocType"
"doctype": "DocType",
"name": "Company History"
},
{
"doctype": "DocField",
"label": "Year",
"fieldname": "year",
"fieldtype": "Data"
"fieldtype": "Data",
"label": "Year"
},
{
"doctype": "DocField",
"label": "Highlight",
"width": "300px",
"fieldname": "highlight",
"fieldtype": "Text"
"fieldtype": "Text",
"label": "Highlight",
"print_width": "300px",
"width": "300px"
}
]

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-03-27 14:36:48",
"creation": "2013-02-22 01:28:08",
"docstatus": 0,
"modified": "2012-03-27 14:36:48",
"modified": "2013-03-07 07:03:30",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -10,10 +10,7 @@
"doctype": "DocType",
"istable": 1,
"module": "Website",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 3
"name": "__common__"
},
{
"doctype": "DocField",

View File

@ -1,8 +1,8 @@
[
{
"creation": "2012-04-02 16:02:43",
"creation": "2013-02-22 01:28:08",
"docstatus": 0,
"modified": "2012-05-07 15:21:00",
"modified": "2013-03-07 07:03:34",
"modified_by": "Administrator",
"owner": "Administrator"
},
@ -10,10 +10,7 @@
"doctype": "DocType",
"istable": 1,
"module": "Website",
"name": "__common__",
"section_style": "Simple",
"show_in_menu": 0,
"version": 1
"name": "__common__"
},
{
"doctype": "DocField",
@ -32,6 +29,7 @@
"fieldname": "label",
"fieldtype": "Data",
"label": "Label",
"print_width": "120px",
"width": "120px"
},
{
@ -39,6 +37,7 @@
"fieldname": "url",
"fieldtype": "Data",
"label": "URL",
"print_width": "200px",
"width": "200px"
},
{

View File

@ -1,34 +1,34 @@
[
{
"owner": "Administrator",
"creation": "2013-02-22 01:28:09",
"docstatus": 0,
"creation": "2012-12-25 13:52:11",
"modified": "2013-03-07 07:03:34",
"modified_by": "Administrator",
"modified": "2012-12-25 13:52:11"
"owner": "Administrator"
},
{
"istable": 1,
"description": "Cross Listing of Item in multiple groups",
"doctype": "DocType",
"module": "Website",
"document_type": "Other",
"istable": 1,
"module": "Website",
"name": "__common__"
},
{
"parent": "Website Item Group",
"doctype": "DocField",
"name": "__common__",
"label": "Item Group",
"parenttype": "DocType",
"options": "Item Group",
"fieldname": "item_group",
"fieldtype": "Link",
"permlevel": 0,
"parentfield": "fields"
"label": "Item Group",
"name": "__common__",
"options": "Item Group",
"parent": "Website Item Group",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0
},
{
"name": "Website Item Group",
"doctype": "DocType"
"doctype": "DocType",
"name": "Website Item Group"
},
{
"doctype": "DocField"

View File

@ -1,43 +1,43 @@
[
{
"owner": "Administrator",
"creation": "2013-02-22 01:28:09",
"docstatus": 0,
"creation": "2012-12-20 14:21:35",
"modified": "2013-03-07 07:03:34",
"modified_by": "Administrator",
"modified": "2012-12-20 15:00:25"
"owner": "Administrator"
},
{
"istable": 1,
"description": "Product Category for website",
"doctype": "DocType",
"module": "Website",
"document_type": "Transaction",
"istable": 1,
"module": "Website",
"name": "__common__"
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Website Product Category",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"name": "Website Product Category",
"doctype": "DocType"
"doctype": "DocType",
"name": "Website Product Category"
},
{
"doctype": "DocField",
"label": "Item Group",
"fieldname": "item_group",
"fieldtype": "Link",
"label": "Item Group",
"options": "Item Group"
},
{
"doctype": "DocField",
"label": "Indent",
"fieldname": "indent",
"fieldtype": "Select",
"label": "Indent",
"options": "0\n1\n2\n3\n4\n5"
}
]

View File

@ -1,59 +1,61 @@
[
{
"owner": "Administrator",
"creation": "2013-02-22 01:28:09",
"docstatus": 0,
"creation": "2012-12-25 16:48:49",
"modified": "2013-03-07 07:03:34",
"modified_by": "Administrator",
"modified": "2012-12-25 16:55:40"
"owner": "Administrator"
},
{
"istable": 1,
"allow_attach": 0,
"doctype": "DocType",
"module": "Website",
"istable": 1,
"max_attachments": 10,
"module": "Website",
"name": "__common__"
},
{
"doctype": "DocField",
"name": "__common__",
"parent": "Website Slideshow Item",
"doctype": "DocField",
"parentfield": "fields",
"parenttype": "DocType",
"permlevel": 0,
"parentfield": "fields"
"permlevel": 0
},
{
"name": "Website Slideshow Item",
"doctype": "DocType"
"doctype": "DocType",
"name": "Website Slideshow Item"
},
{
"doctype": "DocField",
"label": "Image",
"fieldname": "image",
"fieldtype": "Select",
"label": "Image",
"options": "attach_files:"
},
{
"doctype": "DocField",
"label": "Heading",
"width": "200px",
"fieldname": "heading",
"fieldtype": "Data"
"fieldtype": "Data",
"label": "Heading",
"print_width": "200px",
"width": "200px"
},
{
"doctype": "DocField",
"label": "Description",
"width": "200px",
"fieldname": "description",
"fieldtype": "Text"
"fieldtype": "Text",
"label": "Description",
"print_width": "200px",
"width": "200px"
},
{
"print_hide": 1,
"no_copy": 1,
"doctype": "DocField",
"label": "File List",
"fieldname": "file_list",
"fieldtype": "Text",
"hidden": 1
"hidden": 1,
"label": "File List",
"no_copy": 1,
"print_hide": 1
}
]