[enhancement] Int, Currency, Float, Percent as not null and default to 0

This commit is contained in:
Anand Doshi
2015-11-16 19:05:46 +05:30
parent 06df19b56a
commit 602e8253be
251 changed files with 8406 additions and 4858 deletions

View File

@@ -20,6 +20,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Activity Type",
"length": 0,
"no_copy": 0,
"options": "Activity Type",
"permlevel": 0,
@@ -42,6 +43,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -64,6 +66,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Employee",
"length": 0,
"no_copy": 0,
"options": "Employee",
"permlevel": 0,
@@ -87,6 +90,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Employee Name",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
@@ -109,6 +113,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -133,6 +138,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Billing Rate",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -154,6 +160,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -178,6 +185,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Costing Rate",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -200,6 +208,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "title",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
@@ -219,7 +228,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:38:37.693260",
"max_attachments": 0,
"modified": "2015-11-16 06:29:41.623039",
"modified_by": "Administrator",
"module": "Projects",
"name": "Activity Cost",

View File

@@ -20,6 +20,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Activity Type",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -41,6 +42,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Default Costing Rate",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -62,6 +64,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -84,6 +87,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Default Billing Rate",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -105,7 +109,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:38:37.799221",
"max_attachments": 0,
"modified": "2015-11-16 06:29:41.673241",
"modified_by": "Administrator",
"module": "Projects",
"name": "Activity Type",

View File

@@ -19,6 +19,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Task",
"length": 0,
"no_copy": 0,
"options": "Task",
"permlevel": 0,
@@ -39,7 +40,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:38:45.602997",
"max_attachments": 0,
"modified": "2015-11-16 06:29:45.201217",
"modified_by": "Administrator",
"module": "Projects",
"name": "Dependent Task",

View File

@@ -21,6 +21,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Project Name",
"length": 0,
"no_copy": 0,
"oldfieldname": "project_name",
"oldfieldtype": "Data",
@@ -44,7 +45,8 @@
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 0,
"label": "Status",
"label": "Status",
"length": 0,
"no_copy": 1,
"oldfieldname": "status",
"oldfieldtype": "Select",
@@ -68,7 +70,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Project Type",
"label": "Project Type",
"length": 0,
"no_copy": 0,
"oldfieldname": "project_type",
"oldfieldtype": "Data",
@@ -92,6 +95,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -113,7 +117,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Is Active",
"label": "Is Active",
"length": 0,
"no_copy": 0,
"oldfieldname": "is_active",
"oldfieldtype": "Select",
@@ -137,7 +142,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Priority",
"label": "Priority",
"length": 0,
"no_copy": 0,
"oldfieldname": "priority",
"oldfieldtype": "Select",
@@ -161,6 +167,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -183,6 +190,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Expected Start Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "project_start_date",
"oldfieldtype": "Date",
@@ -205,6 +213,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -227,6 +236,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Expected End Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "completion_date",
"oldfieldtype": "Date",
@@ -250,6 +260,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"options": "icon-user",
@@ -273,6 +284,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Customer",
"length": 0,
"no_copy": 0,
"oldfieldname": "customer",
"oldfieldtype": "Link",
@@ -296,6 +308,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -318,6 +331,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Sales Order",
"length": 0,
"no_copy": 0,
"options": "Sales Order",
"permlevel": 0,
@@ -341,6 +355,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Tasks",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"options": "icon-flag",
@@ -364,6 +379,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Tasks",
"length": 0,
"no_copy": 0,
"options": "Project Task",
"permlevel": 0,
@@ -387,6 +403,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "% Tasks Completed",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"print_hide": 0,
@@ -408,6 +425,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"options": "icon-list",
@@ -431,6 +449,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Notes",
"length": 0,
"no_copy": 0,
"oldfieldname": "notes",
"oldfieldtype": "Text Editor",
@@ -453,6 +472,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -475,6 +495,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Actual Start Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -497,6 +518,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Actual Time (in Hours)",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -518,6 +540,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -540,6 +563,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Actual End Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "act_completion_date",
"oldfieldtype": "Date",
@@ -562,6 +586,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -584,6 +609,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Estimated Costing",
"length": 0,
"no_copy": 0,
"oldfieldname": "project_value",
"oldfieldtype": "Currency",
@@ -607,6 +633,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -629,6 +656,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
@@ -651,6 +679,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Default Cost Center",
"length": 0,
"no_copy": 0,
"options": "Cost Center",
"permlevel": 0,
@@ -673,6 +702,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"options": "icon-money",
@@ -697,6 +727,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Costing Amount (via Time Logs)",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -720,6 +751,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Expense Claim (via Expense Claims)",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -741,6 +773,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -764,6 +797,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Billing Amount (via Time Logs)",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -786,6 +820,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Purchase Cost (via Purchase Invoice)",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -808,6 +843,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
@@ -831,6 +867,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Gross Margin",
"length": 0,
"no_copy": 0,
"oldfieldname": "gross_margin_value",
"oldfieldtype": "Currency",
@@ -854,6 +891,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -876,6 +914,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Gross Margin %",
"length": 0,
"no_copy": 0,
"oldfieldname": "per_gross_margin",
"oldfieldtype": "Currency",
@@ -900,7 +939,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 4,
"modified": "2015-10-02 07:39:02.200080",
"modified": "2015-11-16 06:29:52.684371",
"modified_by": "Administrator",
"module": "Projects",
"name": "Project",

View File

@@ -90,15 +90,15 @@ class Project(Document):
def update_costing(self):
from_time_log = frappe.db.sql("""select
sum(ifnull(costing_amount, 0)) as costing_amount,
sum(ifnull(billing_amount, 0)) as billing_amount,
sum(costing_amount) as costing_amount,
sum(billing_amount) as billing_amount,
min(from_time) as start_date,
max(to_time) as end_date,
sum(hours) as time
from `tabTime Log` where project = %s and docstatus = 1""", self.name, as_dict=1)[0]
from_expense_claim = frappe.db.sql("""select
sum(ifnull(total_sanctioned_amount, 0)) as total_sanctioned_amount
sum(total_sanctioned_amount) as total_sanctioned_amount
from `tabExpense Claim` where project = %s and approval_status='Approved'
and docstatus = 1""",
self.name, as_dict=1)[0]
@@ -118,7 +118,7 @@ class Project(Document):
self.per_gross_margin = (self.gross_margin / flt(self.total_billing_amount)) *100
def update_purchase_costing(self):
total_purchase_cost = frappe.db.sql("""select sum(ifnull(base_net_amount, 0))
total_purchase_cost = frappe.db.sql("""select sum(base_net_amount)
from `tabPurchase Invoice Item` where project_name = %s and docstatus=1""", self.name)
self.total_purchase_cost = total_purchase_cost and total_purchase_cost[0][0] or 0

View File

@@ -19,6 +19,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Title",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -41,7 +42,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Status",
"label": "Status",
"length": 0,
"no_copy": 1,
"options": "Open\nWorking\nPending Review\nClosed\nCancelled",
"permlevel": 0,
@@ -66,6 +68,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "View Task",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -87,6 +90,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -109,6 +113,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Start Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -132,6 +137,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "End Date",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -153,6 +159,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -175,6 +182,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Description",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -197,6 +205,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Task ID",
"length": 0,
"no_copy": 1,
"options": "Task",
"permlevel": 0,
@@ -217,7 +226,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-12 10:24:11.748792",
"max_attachments": 0,
"modified": "2015-11-16 06:29:52.824820",
"modified_by": "Administrator",
"module": "Projects",
"name": "Project Task",

View File

@@ -20,6 +20,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Subject",
"length": 0,
"no_copy": 0,
"oldfieldname": "subject",
"oldfieldtype": "Data",
@@ -43,6 +44,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Project",
"length": 0,
"no_copy": 0,
"oldfieldname": "project",
"oldfieldtype": "Link",
@@ -66,6 +68,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
@@ -89,7 +92,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Status",
"label": "Status",
"length": 0,
"no_copy": 1,
"oldfieldname": "status",
"oldfieldtype": "Select",
@@ -113,7 +117,8 @@
"ignore_user_permissions": 0,
"in_filter": 1,
"in_list_view": 1,
"label": "Priority",
"label": "Priority",
"length": 0,
"no_copy": 0,
"oldfieldname": "priority",
"oldfieldtype": "Select",
@@ -137,6 +142,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"options": "Simple",
@@ -160,6 +166,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Details",
"length": 0,
"no_copy": 0,
"oldfieldname": "description",
"oldfieldtype": "Text Editor",
@@ -185,6 +192,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Depends On",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Section Break",
"permlevel": 0,
@@ -207,6 +215,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "depends_on",
"length": 0,
"no_copy": 0,
"options": "Task Depends On",
"permlevel": 0,
@@ -229,6 +238,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -251,6 +261,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Expected Start Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "exp_start_date",
"oldfieldtype": "Date",
@@ -276,6 +287,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Expected Time (in hours)",
"length": 0,
"no_copy": 0,
"oldfieldname": "exp_total_hrs",
"oldfieldtype": "Data",
@@ -298,6 +310,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -320,6 +333,7 @@
"in_filter": 1,
"in_list_view": 0,
"label": "Expected End Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "exp_end_date",
"oldfieldtype": "Date",
@@ -344,6 +358,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"oldfieldtype": "Column Break",
"permlevel": 0,
@@ -368,6 +383,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Actual Start Date (via Time Logs)",
"length": 0,
"no_copy": 0,
"oldfieldname": "act_start_date",
"oldfieldtype": "Date",
@@ -393,6 +409,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Actual Time (in hours)",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
@@ -415,6 +432,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -437,6 +455,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Actual End Date (via Time Logs)",
"length": 0,
"no_copy": 0,
"oldfieldname": "act_end_date",
"oldfieldtype": "Date",
@@ -459,6 +478,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -481,6 +501,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Costing Amount (via Time Logs)",
"length": 0,
"no_copy": 0,
"oldfieldname": "actual_budget",
"oldfieldtype": "Currency",
@@ -505,6 +526,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Expense Claim (via Expense Claim)",
"length": 0,
"no_copy": 0,
"options": "Company:company:default_currency",
"permlevel": 0,
@@ -527,6 +549,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -549,6 +572,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Billing Amount (via Time Logs)",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -571,6 +595,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -593,6 +618,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Review Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "review_date",
"oldfieldtype": "Date",
@@ -617,6 +643,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Closing Date",
"length": 0,
"no_copy": 0,
"oldfieldname": "closing_date",
"oldfieldtype": "Date",
@@ -639,6 +666,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -660,6 +688,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Company",
"length": 0,
"no_copy": 0,
"options": "Company",
"permlevel": 0,
@@ -682,7 +711,7 @@
"issingle": 0,
"istable": 0,
"max_attachments": 5,
"modified": "2015-10-02 07:39:16.010028",
"modified": "2015-11-16 06:29:59.063379",
"modified_by": "Administrator",
"module": "Projects",
"name": "Task",

View File

@@ -53,7 +53,7 @@ class Task(Document):
def update_total_expense_claim(self):
self.total_expense_claim = frappe.db.sql("""select sum(total_sanctioned_amount) from `tabExpense Claim`
where project = %s and task = %s and approval_status = "Approved" and docstatus=1""",(self.project, self.name))
where project = %s and task = %s and approval_status = "Approved" and docstatus=1""",(self.project, self.name))[0][0]
def update_time_and_costing(self):
tl = frappe.db.sql("""select min(from_time) as start_date, max(to_time) as end_date,

View File

@@ -19,6 +19,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Task",
"length": 0,
"no_copy": 0,
"options": "Task",
"permlevel": 0,
@@ -41,6 +42,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -63,6 +65,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Subject",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
@@ -83,7 +86,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:39:16.216665",
"max_attachments": 0,
"modified": "2015-11-16 06:29:59.161882",
"modified_by": "Administrator",
"module": "Projects",
"name": "Task Depends On",

View File

@@ -20,7 +20,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Series",
"label": "Series",
"length": 0,
"no_copy": 0,
"options": "TL-",
"permlevel": 0,
@@ -42,6 +43,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -63,7 +65,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Status",
"label": "Status",
"length": 0,
"no_copy": 0,
"options": "Draft\nSubmitted\nBatched for Billing\nBilled\nCancelled",
"permlevel": 0,
@@ -85,6 +88,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -107,6 +111,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "From Time",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -129,6 +134,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Hours",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -150,6 +156,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "To Time",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -170,6 +177,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -193,6 +201,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Activity Type",
"length": 0,
"no_copy": 0,
"options": "Activity Type",
"permlevel": 0,
@@ -216,6 +225,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Project",
"length": 0,
"no_copy": 0,
"options": "Project",
"permlevel": 0,
@@ -239,6 +249,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Task",
"length": 0,
"no_copy": 0,
"options": "Task",
"permlevel": 0,
@@ -260,6 +271,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -282,6 +294,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "User",
"length": 0,
"no_copy": 0,
"options": "User",
"permlevel": 0,
@@ -305,6 +318,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Employee",
"length": 0,
"no_copy": 0,
"options": "Employee",
"permlevel": 0,
@@ -327,6 +341,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -348,6 +363,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "For Manufacturing",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -370,6 +386,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Billable",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -391,6 +408,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -414,6 +432,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Production Order",
"length": 0,
"no_copy": 0,
"options": "Production Order",
"permlevel": 0,
@@ -438,6 +457,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Operation",
"length": 0,
"no_copy": 0,
"options": "Operation",
"permlevel": 0,
@@ -462,6 +482,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Operation ID",
"length": 0,
"no_copy": 0,
"options": "",
"permlevel": 0,
@@ -484,6 +505,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -507,6 +529,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Workstation",
"length": 0,
"no_copy": 0,
"options": "Workstation",
"permlevel": 0,
@@ -532,6 +555,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Completed Qty",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -553,6 +577,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -574,6 +599,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Note",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -595,6 +621,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -619,6 +646,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Costing Rate based on Activity Type (per hour)",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -642,6 +670,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Costing Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -663,6 +692,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -687,6 +717,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Billing Rate based on Activity Type (per hour)",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -711,6 +742,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Billing Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -732,6 +764,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -755,6 +788,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Time Log Batch",
"length": 0,
"no_copy": 0,
"options": "Time Log Batch",
"permlevel": 0,
@@ -778,6 +812,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Sales Invoice",
"length": 0,
"no_copy": 0,
"options": "Sales Invoice",
"permlevel": 0,
@@ -800,6 +835,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "Time Log",
"permlevel": 1,
@@ -822,6 +858,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Title",
"length": 0,
"no_copy": 1,
"permlevel": 0,
"precision": "",
@@ -843,7 +880,8 @@
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:39:16.759881",
"max_attachments": 0,
"modified": "2015-11-16 06:29:59.410559",
"modified_by": "Administrator",
"module": "Projects",
"name": "Time Log",

View File

@@ -203,7 +203,7 @@ class TimeLog(Document):
def get_time_log_summary(self):
"""Returns 'Actual Operating Time'. """
return frappe.db.sql("""select
sum(hours*60) as mins, sum(ifnull(completed_qty, 0)) as completed_qty
sum(hours*60) as mins, sum(completed_qty) as completed_qty
from `tabTime Log`
where production_order = %s and operation_id = %s and docstatus=1""",
(self.production_order, self.operation_id), as_dict=1)[0]

View File

@@ -20,7 +20,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Series",
"label": "Series",
"length": 0,
"no_copy": 0,
"options": "TLB-",
"permlevel": 0,
@@ -43,7 +44,8 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"label": "Status",
"label": "Status",
"length": 0,
"no_copy": 1,
"options": "Draft\nSubmitted\nBilled\nCancelled",
"permlevel": 0,
@@ -65,6 +67,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -87,6 +90,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Sales Invoice",
"length": 0,
"no_copy": 0,
"options": "Sales Invoice",
"permlevel": 0,
@@ -108,6 +112,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -129,6 +134,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Time Logs",
"length": 0,
"no_copy": 0,
"options": "Time Log Batch Detail",
"permlevel": 0,
@@ -150,6 +156,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -174,6 +181,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Total Hours",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -194,6 +202,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -218,6 +227,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Total Billing Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -240,6 +250,7 @@
"in_filter": 0,
"in_list_view": 0,
"label": "Amended From",
"length": 0,
"no_copy": 1,
"options": "Time Log Batch",
"permlevel": 0,
@@ -261,7 +272,8 @@
"is_submittable": 1,
"issingle": 0,
"istable": 0,
"modified": "2015-10-02 07:39:17.042383",
"max_attachments": 0,
"modified": "2015-11-16 06:29:59.535984",
"modified_by": "Administrator",
"module": "Projects",
"name": "Time Log Batch",

View File

@@ -18,6 +18,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Time Log",
"length": 0,
"no_copy": 0,
"options": "Time Log",
"permlevel": 0,
@@ -42,6 +43,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Hours",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -62,6 +64,7 @@
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 0,
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -84,6 +87,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Activity Type",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
@@ -105,6 +109,7 @@
"in_filter": 0,
"in_list_view": 1,
"label": "Billing Amount",
"length": 0,
"no_copy": 0,
"permlevel": 0,
"precision": "",
@@ -115,27 +120,6 @@
"search_index": 0,
"set_only_once": 0,
"unique": 0
},
{
"allow_on_submit": 0,
"bold": 0,
"collapsible": 0,
"fieldname": "note",
"fieldtype": "Data",
"hidden": 0,
"ignore_user_permissions": 0,
"in_filter": 0,
"in_list_view": 1,
"label": "Note",
"no_copy": 0,
"permlevel": 0,
"print_hide": 0,
"read_only": 1,
"report_hide": 0,
"reqd": 0,
"search_index": 0,
"set_only_once": 0,
"unique": 0
}
],
"hide_heading": 0,
@@ -146,7 +130,8 @@
"is_submittable": 0,
"issingle": 0,
"istable": 1,
"modified": "2015-10-02 07:39:17.158572",
"max_attachments": 0,
"modified": "2015-11-16 06:29:59.590738",
"modified_by": "Administrator",
"module": "Projects",
"name": "Time Log Batch Detail",
@@ -154,4 +139,4 @@
"permissions": [],
"read_only": 0,
"read_only_onload": 0
}
}

View File

@@ -64,8 +64,8 @@ def get_delivered_items_cost():
si_items = frappe.db.sql("""select si.project_name, sum(si_item.base_net_amount) as amount
from `tabSales Invoice` si, `tabSales Invoice Item` si_item
where si.name = si_item.parent and si.docstatus = 1 and ifnull(si.update_stock, 0) = 1
and ifnull(si.is_pos, 0) = 1 and ifnull(si.project_name, '') != ''
where si.name = si_item.parent and si.docstatus = 1 and si.update_stock = 1
and si.is_pos = 1 and ifnull(si.project_name, '') != ''
group by si.project_name""", as_dict=1)