From edd195a66dbaf931e7a3109efbcfb29e04b682ee Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Tue, 22 Dec 2020 20:16:37 +0530 Subject: [PATCH] Fairoj : smc credit pd feedbacks --- ng6-seed/package.json | 4 +- .../dynamic-form/dynamic-form.component.html | 3 +- .../dynamic-question-template.component.html | 2 +- .../dynamic-question-template.component.ts | 6 + .../start-pd/forms/form/form.component.ts | 2 +- .../data/SMC_CREDIT_TEMPLATES/LFMP/10.json | 9 + .../data/SMC_CREDIT_TEMPLATES/WCTL/10.json | 1536 +++++++++-------- 7 files changed, 805 insertions(+), 757 deletions(-) diff --git a/ng6-seed/package.json b/ng6-seed/package.json index 7cfd918..46d3169 100755 --- a/ng6-seed/package.json +++ b/ng6-seed/package.json @@ -3,8 +3,8 @@ "version": "0.0.0", "license": "MIT", "scripts": { - "production": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --prod --build-optimizer=true", - "staging": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --prod --configuration=staging --base-href /dist/", + "production": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --prod --build-optimizer=true --base-href /lender/", + "staging": "node --max_old_space_size=6144 node_modules/@angular/cli/bin/ng build --prod --configuration=staging --base-href /lenderdemo/", "ng": "ng", "start": "ng serve", "build": "ng build", diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.html b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.html index 64e5fc3..57d96ca 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.html +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/dynamic-form/dynamic-form/dynamic-form.component.html @@ -37,7 +37,8 @@ --> -
+
+ *ngIf="parent_ques.type == '9'" > {{parent_ques.question}} curr_index+1) { + console.log("Current index",curr_index,this.json_index) + this.setModifiedValuetoControl_frommultiple(curr_obj,formArray,curr_index+1) + } + console.log("No Control RETURN") return } } diff --git a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts index e6206b3..6df34d5 100644 --- a/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts +++ b/ng6-seed/src/app/personal-discussion/manage-pd/list-pd/start-pd/forms/form/form.component.ts @@ -72,7 +72,7 @@ export class FormComponent implements OnInit { // let localId = this.getLocalFormId() console.log("d",this.pd_all_details.form_id,Number(this.pd_all_details.form_id)) // this.pdTriggerService.loadTemplate(Number(this.pd_all_details.form_id)).subscribe(result=>{ - let params = {"fk_entity_id":"35","fk_product_id":this.pd_all_details.pdmaster_details.fk_product_id,"pd_form_id":this.pd_all_details.form_id,"fk_pd_id":this.pd_all_details.pdmaster_details.pd_id} + let params = {"fk_entity_id":this.pd_all_details.pdmaster_details.fk_lender_id,"fk_product_id":this.pd_all_details.pdmaster_details.fk_product_id,"pd_form_id":this.pd_all_details.form_id,"fk_pd_id":this.pd_all_details.pdmaster_details.pd_id} this.pdTriggerService.loadCreditPDTemplate(params).subscribe(result=>{ if(!environment.production){ // result.dataStatus = false diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/10.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/10.json index 3cad6de..8eba7e4 100644 --- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/10.json +++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/LFMP/10.json @@ -87,6 +87,15 @@ "sales_revenue" ], "insert_control":"sales_py" + }, + { + "purpose":"answer_value_arr", + "arr_include":["py","now"], + "expression":"(((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100).toFixed(2)", + "value_keys":[ + "net_profit_sales_percent" + ], + "insert_control":"netprofit_py_percent" } ], "is_repeatable":null, diff --git a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/WCTL/10.json b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/WCTL/10.json index b94f412..46469e0 100644 --- a/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/WCTL/10.json +++ b/ng6-seed/src/assets/data/SMC_CREDIT_TEMPLATES/WCTL/10.json @@ -1,776 +1,808 @@ { - "section_id":"10", - "section_name":"Financial Information", - "onsubmit":[ - { - "expression":"(function (){let sum_val=null;let ques_key=[];control.questions_group.forEach(ques_obj=>{ques_obj.questions.map(ques=>{if(ques.question_key == submitProperty.key_name){ques_key.push(ques.answer_value)}})});console.log('none',ques_key);return new Set(ques_key).size === ques_key.length}())", - "group_key":"financial_info", - "key_name":"fy", - "msg":"Financial Year already entered earlier" - } - ], - "questions":[ - { - "question":"Number of financial years for which we have financials", - "question_key":"no_of_financial_years", - "place_holder":"Enter the number", - "type":"1", - "field_width":"45", - "api_properties":null, - "answers":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - }, - { - "name":"pattern", - "isactive":"1", - "validator":"[0-9]*", - "message":"alphabets only ", - "value":null - } - ] - }, - { - "question":[ - { - "question":"Enter FY", - "question_key":"fy", - "type":"3", - "field_width":"45", - "answers":[ - - ], - "answer_value":"GET_FY_YEARS", - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Fin Yr Required", - "value":null - } - ] - }, - { - "question":"Sales / Revenue (Rs)", - "question_key":"sales_revenue", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":[ - { - "purpose":"answer_value", - "expression":"((Number(net_profit)/Number(sales_revenue))*100).toFixed(2)", - "value_keys":[ - "sales_revenue","net_profit" - ], - "insert_control":"net_profit_sales_percent" - }, - { - "purpose":"answer_value_arr", - "arr_include":["py","now"], - "expression":"((Number(sales_revenue[now])-Number(sales_revenue[py]))/Number(sales_revenue[py]))*100", - "value_keys":[ - "sales_revenue" - ], - "insert_control":"sales_py" + "section_id":"10", + "section_name":"Financial Information", + "onsubmit":[ + { + "expression":"(function (){let sum_val=null;let ques_key=[];control.forEach(ques_obj=>{ques_key.push(ques_obj[submitProperty.key_name])});console.log('none',ques_key);return new Set(ques_key).size === ques_key.length}())", + "group_key":"financial_info", + "key_name":"fy", + "msg":"Financial Year already entered earlier" + } + ], + "questions":[ + { + "question":"Number of financial years for which we have financials", + "question_key":"no_of_financial_years", + "place_holder":"Enter the number", + "type":"1", + "field_width":"45", + "api_properties":null, + "answers":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + }, + { + "name":"pattern", + "isactive":"1", + "validator":"[0-9]*", + "message":"alphabets only ", + "value":null } - ], - "is_repeatable":null, - "field_type":"numtoword", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } + ] + }, + { + "question":[ + { + "question":"Enter FY", + "question_key":"fy", + "type":"3", + "field_width":"45", + "answers":[ - ] - }, - { - "question":"Net Profit / (Net Loss) (Rs) ", - "question_key":"net_profit", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":[ + ], + "answer_value":"GET_FY_YEARS", + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Fin Yr Required", + "value":null + } + ] + }, + { + "question":"Sales / Revenue (Rs)", + "question_key":"sales_revenue", + "type":"1", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":[ { "purpose":"answer_value", - "expression":"(Number(net_profit)/Number(sales_revenue))*100", + "expression":"((Number(net_profit)/Number(sales_revenue))*100).toFixed(2)", "value_keys":[ "sales_revenue","net_profit" ], "insert_control":"net_profit_sales_percent" }, { - "purpose":"answer_value_arr", - "arr_include":["py","now"], - "expression":"((Number(net_profit[now])-Number(net_profit[py]))/Number(net_profit[py]))*100", - "value_keys":[ - "net_profit" - ], - "insert_control":"netprofit_py" - }, - { - "purpose":"answer_value_arr", - "arr_include":["py","now"], - "expression":"((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100", - "value_keys":[ - "net_profit_sales_percent" - ], - "insert_control":"netprofit_py_percent" - } + "purpose":"answer_value_arr", + "arr_include":["py","now"], + "expression":"((Number(sales_revenue[now])-Number(sales_revenue[py]))/Number(sales_revenue[py]))*100", + "value_keys":[ + "sales_revenue" + ], + "insert_control":"sales_py" + }, + { + "purpose":"answer_value_arr", + "arr_include":["py","now"], + "expression":"(((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100).toFixed(2)", + "value_keys":[ + "net_profit_sales_percent" + ], + "insert_control":"netprofit_py_percent" + } ], - "is_repeatable":null, - "field_type":"numtoword", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } + "is_repeatable":null, + "field_type":"numtoword", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } - ] - }, - { - "question":"Net Profit or (Net Loss) to Sales % ", - "question_key":"net_profit_sales_percent", + ] + }, + { + "question":"Net Profit / (Net Loss) (Rs) ", + "question_key":"net_profit", + "type":"1", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":[ + { + "purpose":"answer_value", + "expression":"((Number(net_profit)/Number(sales_revenue))*100).toFixed(2)", + "value_keys":[ + "sales_revenue","net_profit" + ], + "insert_control":"net_profit_sales_percent" + }, + { + "purpose":"answer_value_arr", + "arr_include":["py","now"], + "expression":"((Number(net_profit[now])-Number(net_profit[py]))/Number(net_profit[py]))*100", + "value_keys":[ + "net_profit" + ], + "insert_control":"netprofit_py" + }, + { + "purpose":"answer_value_arr", + "arr_include":["py","now"], + "expression":"(((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100).toFixed(2)", + "value_keys":[ + "net_profit_sales_percent" + ], + "insert_control":"netprofit_py_percent" + } + ], + "is_repeatable":null, + "field_type":"numtoword", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + + ] + }, + { + "question":"Net Profit or (Net Loss) to Sales % ", + "question_key":"net_profit_sales_percent", + "type":"1", + "is_disabled":"1", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":[ + { + "purpose":"answer_value_arr", + "arr_include":["py","now"], + "expression":"(((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100).toFixed(2)", + "value_keys":[ + "net_profit_sales_percent" + ], + "insert_control":"netprofit_py_percent" + } + ], + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + ] + }, + { + "question":"% (↑ /↓) in Sales over PY", + "question_key":"sales_py", "type":"1", "is_disabled":"1", "field_width":"45", "answers":null, "api_properties":null, - "onchange_properties":[ + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + ] + }, + { + "question":"% (↑ /↓) in Net Profit over PY", + "question_key":"netprofit_py", + "type":"1", + "is_disabled":"1", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + + ] + }, + { + "question":"% (↑ /↓) in Net Profit % over PY", + "question_key":"netprofit_py_percent", + "type":"1", + "is_disabled":"1", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + ] + }, + + { + "question":"Debtor Days as per CET", + "sub_title":"In Case of credit sales, what is the average no. of days taken to receive the money?", + "question_key":"debtor_days_cet", + "type":"1", + "field_width":"100", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + ] + }, + { + "question":"Creditor Days as per CET", + "sub_title":"In Case of credit purchases, what is the average no. of days taken to pay the money?", + "question_key":"creditor_days_cet", + "type":"1", + "field_width":"100", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + + ] + }, + { + "question":"Inventory Days as per CET", + "sub_title":"What is the average no. of days for which stock lies unsold during the year?", + "question_key":"inventory_days_cet", + "type":"1", + "field_width":"100", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + + ] + } + + + + ], + "is_repeatable":"1", + "group_key":"financial_info", + "group_title":"Financial Information" + }, + { + "question":"Debtor Days as per CM Discussion", + "question_key":"debtor_days_cm", + "type":"1", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + ] + }, + { + "question":"Creditor Days as per CM Discussion", + "question_key":"creditor_days_cm", + "type":"1", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + ] + }, + { + "question":"Inventory Days as per CM Discussion", + "question_key":"inventory_days_cm", + "type":"1", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + + ] + }, + { + "question":"Broken Period starting from (Date)", + "question_key":"broken_period_from_month", + "type":"1", + "field_width":"45", + "place_holder":"DD-MM-YYYY (Eg 05-02-2020)", + "answers":null, + "api_properties":null, + "onchange_properties":[ + { + "purpose":"answer_value", + "expression":"(function (){let final_value = ''; if(String('broken_period_to_month') && String('broken_period_from_month')) {let from_date = new Date((String('broken_period_from_month')).split('-').reverse().join('-'));let to_date = new Date((String('broken_period_to_month')).split('-').reverse().join('-'));console.log(to_date);if(!from_date || !to_date || !from_date instanceof Date || !to_date instanceof Date || isNaN(from_date) || isNaN(to_date)) {final_value = '';return;}final_value = to_date.getMonth() - from_date.getMonth() + (12 * (to_date.getFullYear() - from_date.getFullYear()))};return final_value}())", + "value_keys":[ + "broken_period_to_month", "broken_period_from_month" + ], + "insert_control":"broken_period_no_of_months" + } + ], + "is_repeatable":null, + "field_type":"string", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + + ] + }, + { + "question":"Broken Period starting to (Date)", + "question_key":"broken_period_to_month", + "type":"1", + "place_holder":"DD-MM-YYYY (Eg 03-12-2020)", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":[ + { + "purpose":"answer_value", + "expression":"(function (){let final_value = ''; if(String('broken_period_to_month') && String('broken_period_from_month')) {let from_date = new Date((String('broken_period_from_month')).split('-').reverse().join('-'));let to_date = new Date((String('broken_period_to_month')).split('-').reverse().join('-'));console.log(to_date);if(!from_date || !to_date || !from_date instanceof Date || !to_date instanceof Date || isNaN(from_date) || isNaN(to_date)) {final_value = '';return;}final_value = to_date.getMonth() - from_date.getMonth() + (12 * (to_date.getFullYear() - from_date.getFullYear()))};return final_value}())", + "value_keys":[ + "broken_period_to_month", "broken_period_from_month" + ], + "insert_control":"broken_period_no_of_months" + } + ], + "is_repeatable":null, + "field_type":"string", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + + ] + }, + { + "question":"No of Months", + "question_key":"broken_period_no_of_months", + "type":"1", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + ] + }, + { + "question":"Turnover for Broken Period in CY (Rs)", + "question_key":"broken_period_turnover_cy", + "type":"1", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":[ + { + "purpose":"answer_value", + "expression":"(((Number(broken_period_turnover_cy)-Number(broken_period_turnover_py))/Number(broken_period_turnover_cy))*100).toFixed(2)", + "value_keys":[ + "broken_period_turnover_py","broken_period_turnover_cy" + ], + "insert_control":"broken_period_turnover_percent" + } + ], + "is_repeatable":null, + "field_type":"numtoword", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + ] + }, + { + "question":"Turnover for Broken Period in PY (Rs)", + "question_key":"broken_period_turnover_py", + "type":"1", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":[ + { + "purpose":"answer_value", + "expression":"(((Number(broken_period_turnover_cy)-Number(broken_period_turnover_py))/Number(broken_period_turnover_cy))*100).toFixed(2)", + "value_keys":[ + "broken_period_turnover_py","broken_period_turnover_cy" + ], + "insert_control":"broken_period_turnover_percent" + } + ], + "is_repeatable":null, + "field_type":"numtoword", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + ] + }, + { + "question":"Increase / Decrease in Turnover for Broken Period %", + "question_key":"broken_period_turnover_percent", + "type":"1", + "field_width":"45", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + + ] + }, + { + "question":"Does the business have any working capital facility from any lender other than Moneywise?", + "question_key":"is_any_other_working_captial_facility", + "type":"2", + "field_width":"45", + "answers":[ { - "purpose":"answer_value_arr", - "arr_include":["py","now"], - "expression":"((Number(net_profit_sales_percent[now])-Number(net_profit_sales_percent[py]))/Number(net_profit_sales_percent[py]))*100", - "value_keys":[ - "net_profit_sales_percent" - ], - "insert_control":"netprofit_py_percent" + "answer":"Yes", + "answer_id":"Yes" + }, + { + "answer":"No", + "answer_id":"No" } - ], - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, - { - "question":"% (↑ /↓) in Sales over PY", - "question_key":"sales_py", - "type":"1", - "is_disabled":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, - { - "question":"% (↑ /↓) in Net Profit over PY", - "question_key":"netprofit_py", - "type":"1", - "is_disabled":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - - ] - }, - { - "question":"% (↑ /↓) in Net Profit % over PY", - "question_key":"netprofit_py_percent", - "type":"1", - "is_disabled":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, - - { - "question":"Debtor Days as per CET", - "sub_title":"In Case of credit sales, what is the average no. of days taken to receive the money?", - "question_key":"debtor_days_cet", - "type":"1", - "field_width":"100", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, - { - "question":"Debtor Days as per CM Discussion", - "question_key":"debtor_days_cm", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, - { - "question":"Creditor Days as per CET", - "sub_title":"In Case of credit purchases, what is the average no. of days taken to pay the money?", - "question_key":"creditor_days_cet", - "type":"1", - "field_width":"100", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - - ] - }, - { - "question":"Creditor Days as per CM Discussion", - "question_key":"creditor_days_cm", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, - { - "question":"Inventory Days as per CET", - "sub_title":"What is the average no. of days for which stock lies unsold during the year?", - "question_key":"inventory_days_cet", - "type":"1", - "field_width":"100", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - - ] - }, - { - "question":"Inventory Days as per CM Discussion", - "question_key":"inventory_days_cm", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - - ] - } - - - ], - "is_repeatable":"1", - "group_key":"financial_info", - "group_title":"Financial Information" - }, - { - "question":"Broken Period starting from (Month)", - "question_key":"broken_period_from_month", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - - ] - }, - { - "question":"Broken Period starting to (Month)", - "question_key":"broken_period_to_month", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - - ] - }, - { - "question":"No of Months", - "question_key":"broken_period_no_of_months", - "type":"1", - "field_width":"45", - "answers":null, + ], "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, - { - "question":"Turnover for Broken Period in CY (Rs)", - "question_key":"broken_period_turnover_cy", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"numtoword", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, - { - "question":"Turnover for Broken Period in PY (Rs)", - "question_key":"broken_period_turnover_py", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"numtoword", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, - { - "question":"Increase / Decrease in Turnover for Broken Period %", - "question_key":"broken_period_turnover_percent", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - - ] - }, - { - "question":"Sales / Revenue (Rs) for the broken period of the Current FY as per applicant", - "question_key":"broken_period_sales_amount", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, - { - "question":"Net Profit / (Net Loss) (Rs) for the broken period of the Current FY as per applicant ", - "question_key":"broken_period_netprofit_amount", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, - { - "question":"% of Net Profit / (Net Loss) over Sales for the broken period of the Current FY as per applicant ", - "question_key":"broken_period_netprofit_percent", - "type":"1", - "field_width":"45", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - - ] - }, - { - "question":"Does the business have any working capital facility from any lender other than Moneywise?", - "question_key":"is_any_other_working_captial_facility", - "type":"2", - "field_width":"45", - "answers":[ - { - "answer":"Yes", - "answer_id":"Yes" - }, - { - "answer":"No", - "answer_id":"No" - } - ], - "api_properties":null, - "onchange_properties":[ - { - "purpose":"FORM_CTRL", - "form_controls":[ - { - "insert_index":"is_any_other_working_captial_facility", - "expression":"(String('is_any_other_working_captial_facility') === String('Yes'))", - "value_keys":[ - "is_any_other_working_captial_facility" - ], - "questions":[ - { - "question":"Facility details i.e. Letter of Credit/ Bank guarantee, CC limit etc.", - "question_key":"facility_details_other_lender", - "type":"3", - "field_width":"45", - "answers":[ - { - "answer":"Letter of Credit", - "answer_id":"Letter of Credit" - }, - { - "answer":"Bank guarantee", - "answer_id":"Bank guarantee" - }, - { - "answer":"CC limit", - "answer_id":"CC limit" - } - ], - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "is_subfield":"1", - "parent_question_key":"is_any_other_working_captial_facility", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - - ] - }, - { - "question":"Details of above facilities need to be entered", - "question_key":"facility_details_specify", - "type":"7", - "placeholder":"Enter the text", - "answers":null, - "api_properties":null, - "onchange_properties":null, - "is_repeatable":null, - "is_subfield":"1", - "parent_question_key":"is_any_other_working_captial_facility", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - - ] - } + "onchange_properties":[ + { + "purpose":"FORM_CTRL", + "form_controls":[ + { + "insert_index":"is_any_other_working_captial_facility", + "expression":"(String('is_any_other_working_captial_facility') === String('Yes'))", + "value_keys":[ + "is_any_other_working_captial_facility" + ], + "questions":[ + { + "question":"Details of above facilities need to be entered", + "question_key":"facility_details_specify", + "type":"7", + "placeholder":"Enter the text", + "answers":null, + "api_properties":null, + "onchange_properties":null, + "is_repeatable":null, + "is_subfield":"1", + "parent_question_key":"is_any_other_working_captial_facility", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + ] - } - ] - } - ], - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null + }, + { + "question":"Facility details i.e. Letter of Credit/ Bank guarantee, CC limit etc.", + "question_key":"facility_details_other_lender", + "type":"3", + "field_width":"45", + "answers":[ + { + "answer":"Letter of Credit", + "answer_id":"Letter of Credit" + }, + { + "answer":"Bank guarantee", + "answer_id":"Bank guarantee" + }, + { + "answer":"CC limit", + "answer_id":"CC limit" + }, + { + "answer":"Others", + "answer_id":"Others" + } + ], + "api_properties":null, + "onchange_properties": [ + { + "purpose":"FORM_CTRL", + "form_controls":[{ + "insert_index":"facility_details_other_lender", + "expression":"(String('facility_details_other_lender').toLowerCase() == String('others'))", + "value_keys":[ + "facility_details_other_lender" + ], + "questions":[ + { + "question": "Specify Facility details", + "question_key": "facility_details_other", + "type": "1", + "field_width": "45", + "field_type": "string", + "api_properties": null, + "answers": null, + "onchange_properties": null, + "is_repeatable": null, + "validations": [ + ] + } + ] + }] + } + ], + "is_repeatable":null, + "is_subfield":"1", + "parent_question_key":"is_any_other_working_captial_facility", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + + ] + } + + ] + } + ] } + ], + "is_repeatable":null, + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } - ] - }, - - { - "question":"Sales / Revenue (Rs)", - "sub_title":"Particulars of Financials for Latest Year as per person met during PD visit", - "question_key":"sales_amount", - "place_holder":"Enter text", - "type":"1", - "field_width":"100", - "field_type":"numtoword", - "api_properties":null, - "answers":null, - "onchange_properties":[ - { - "purpose":"answer_value", - "expression":"(function (){let final_value; Number(net_profit_to_sales_percent) ? final_value = (Number(sales_amount)*Number(net_profit_to_sales_percent))/100 : '';return final_value}())", - "value_keys":[ - "sales_amount", "net_profit_to_sales_percent" - ], - "insert_control":"net_profit_rs" - }, - { - "purpose":"answer_value", - "expression":"(function (){let final_value; Number(net_profit_rs) ? final_value = (Number(net_profit_rs)/Number(sales_amount))*100 : '';return final_value}())", - "value_keys":[ - "sales_amount", "net_profit_rs" - ], - "insert_control":"net_profit_to_sales_percent" - } - ], - "is_repeatable":null, - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ] - }, - { - "question":"Net Profit or (Net Loss) to Sales % ", - "question_key":"net_profit_to_sales_percent", - "place_holder":"Enter number", - "type":"1", - "field_width":"45", - "api_properties":null, - "answers":null, - "onchange_properties":[ - { - "purpose":"answer_value", - "expression":"(Number(sales_amount)*Number(net_profit_to_sales_percent))/100", - "value_keys":[ - "sales_amount", "net_profit_to_sales_percent" - ], - "insert_control":"net_profit_rs" - } - ], - "is_repeatable":null, - "field_type":"num", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - }, - { - "name":"max", - "validator":"100", - "isactive":"1", - "message":"Number must be less than 100", - "value":null - } - ] - }, - { - "question":"Net Profit / (Net Loss) (Rs)", - "question_key":"net_profit_rs", - "place_holder":"Enter the text", - "type":"1", - "field_width":"45", - "api_properties":null, - "answers":null, - "is_repeatable":null, - "field_type":"numtoword", - "validations":[ - { - "name":"required", - "isactive":"1", - "validator":"Validators.required", - "message":"Required", - "value":null - } - ], - "onchange_properties":[ - { - "purpose":"answer_value", - "expression":"(Number(net_profit_rs)/Number(sales_amount))*100", - "value_keys":[ - "sales_amount", "net_profit_rs" - ], - "insert_control":"net_profit_to_sales_percent" - } - ] - } - - ] - } \ No newline at end of file + ] + }, + + { + "question":"Sales / Revenue (Rs)", + "sub_title":"Particulars of Financials for Latest Year as per person met during PD visit", + "question_key":"sales_amount", + "place_holder":"Enter text", + "type":"1", + "field_width":"100", + "field_type":"numtoword", + "api_properties":null, + "answers":null, + "onchange_properties":[ + { + "purpose":"answer_value", + "expression":"(function (){let final_value; Number(net_profit_to_sales_percent) ? final_value = (Number(sales_amount)*Number(net_profit_to_sales_percent))/100 : '';return final_value}())", + "value_keys":[ + "sales_amount", "net_profit_to_sales_percent" + ], + "insert_control":"net_profit_rs" + }, + { + "purpose":"answer_value", + "expression":"(function (){let final_value; Number(net_profit_rs) ? final_value = (Number(net_profit_rs)/Number(sales_amount))*100 : '';return final_value.toFixed(2)}())", + "value_keys":[ + "sales_amount", "net_profit_rs" + ], + "insert_control":"net_profit_to_sales_percent" + } + ], + "is_repeatable":null, + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + ] + }, + { + "question":"Net Profit or (Net Loss) to Sales % ", + "question_key":"net_profit_to_sales_percent", + "place_holder":"Enter number", + "type":"1", + "field_width":"45", + "api_properties":null, + "answers":null, + "onchange_properties":[ + { + "purpose":"answer_value", + "expression":"(Number(sales_amount)*Number(net_profit_to_sales_percent))/100", + "value_keys":[ + "sales_amount", "net_profit_to_sales_percent" + ], + "insert_control":"net_profit_rs" + } + ], + "is_repeatable":null, + "field_type":"num", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + }, + { + "name":"max", + "validator":"100", + "isactive":"1", + "message":"Number must be less than 100", + "value":null + } + ] + }, + { + "question":"Net Profit / (Net Loss) (Rs)", + "question_key":"net_profit_rs", + "place_holder":"Enter the text", + "type":"1", + "field_width":"45", + "api_properties":null, + "answers":null, + "is_repeatable":null, + "field_type":"numtoword", + "validations":[ + { + "name":"required", + "isactive":"1", + "validator":"Validators.required", + "message":"Required", + "value":null + } + ], + "onchange_properties":[ + { + "purpose":"answer_value", + "expression":"((Number(net_profit_rs)/Number(sales_amount))*100).toFixed(2)", + "value_keys":[ + "sales_amount", "net_profit_rs" + ], + "insert_control":"net_profit_to_sales_percent" + } + ] + }, + { + "question_key":"common_remarks", + "question":"Remarks", + "place_holder":"Enter the text", + "type":"7", + "api_properties":null, + "answers":null, + "onchange_properties":null, + "is_repeatable":null, + "field_type":"string", + "field_width":"45", + "validations":[ + ] + } + + ] +} \ No newline at end of file