summary ai and issues fixes : ps
This commit is contained in:
parent
95e56431a5
commit
13f22d5efb
@ -117,7 +117,7 @@ closeDialogue(){
|
||||
}
|
||||
|
||||
changeOptions(indexVal: any,event: any): void{
|
||||
console.log('indexVal: any,event: any',indexVal,event);
|
||||
|
||||
let control: any = <FormArray>this.purchaseItemForm.controls['purchase'];
|
||||
if(event.value=="1"){
|
||||
control.controls[indexVal].controls['purchase_qty'].setValidators([Validators.required]);
|
||||
@ -140,7 +140,7 @@ changeOptions(indexVal: any,event: any): void{
|
||||
}
|
||||
|
||||
purchaseCalculation(indexVal: number,values: any): void {
|
||||
console.log('indexVal: number,values: any',indexVal,values);
|
||||
|
||||
let control:any = <FormArray>this.purchaseItemForm.controls['purchase'];
|
||||
|
||||
if(values.purchase_type=="1" &&values.purchase_qty!='' && values.rate_per_unit!='' && values.fk_frequency_id!='') {
|
||||
@ -148,7 +148,7 @@ purchaseCalculation(indexVal: number,values: any): void {
|
||||
control.controls[indexVal].controls['annual_purchase_value'].setValue(parseInt(values.purchase_qty) * parseInt(values.rate_per_unit) * parseInt(filterFrequencyValue[0].mutiple_factor));
|
||||
}
|
||||
else if(values.purchase_type=="2" && values.rate_per_unit!='' && values.fk_frequency_id!='') {
|
||||
console.log('purchaseCalculation else if');
|
||||
|
||||
let filterFrequencyValue: any = this.frequencyData.filter(val =>val.frequency_id==values.fk_frequency_id);
|
||||
control.controls[indexVal].controls['annual_purchase_value'].setValue(parseInt(values.rate_per_unit) * parseInt(filterFrequencyValue[0].mutiple_factor));
|
||||
}
|
||||
|
||||
@ -38,19 +38,19 @@
|
||||
<!-- Position1 Column -->
|
||||
<ng-container matColumnDef="position_2">
|
||||
<th mat-header-cell *matHeaderCellDef> Declared by Customer</th>
|
||||
<td mat-cell *matCellDef="let element;let i = index">{{ i==7 ? element.declared_by_customer : i==9 ? element.declared_by_customer : element.declared_by_customer | rupeeCurrencyFormat}} </td>
|
||||
<td mat-cell *matCellDef="let element;let i = index">{{ i==7 ? element.declared_by_customer : i==10 ? element.declared_by_customer : element.declared_by_customer | rupeeCurrencyFormat}} </td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Position2 Column -->
|
||||
<ng-container matColumnDef="position_3">
|
||||
<th mat-header-cell *matHeaderCellDef> As Derived from Item Wise Sales </th>
|
||||
<td mat-cell *matCellDef="let element;let i = index">{{ i==7 ? element.derived_item_wise : i==9 ? element.derived_item_wise : element.derived_item_wise | rupeeCurrencyFormat}} </td>
|
||||
<td mat-cell *matCellDef="let element;let i = index">{{ i==7 ? element.derived_item_wise : i==10 ? element.derived_item_wise : element.derived_item_wise | rupeeCurrencyFormat}} </td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Position3 Column -->
|
||||
<ng-container matColumnDef="position_4">
|
||||
<th mat-header-cell *matHeaderCellDef> As Derived from Kuchha Sales Book/Bills </th>
|
||||
<td mat-cell *matCellDef="let element;let i = index">{{ i==7 ? element.derived_sales_book : i==9 ? element.derived_sales_book : element.derived_sales_book | rupeeCurrencyFormat}} </td>
|
||||
<td mat-cell *matCellDef="let element;let i = index">{{ i==7 ? element.derived_sales_book : i==10 ? element.derived_sales_book : element.derived_sales_book | rupeeCurrencyFormat}} </td>
|
||||
<!-- | rupeeCurrencyFormat -->
|
||||
</ng-container>
|
||||
|
||||
|
||||
@ -214,7 +214,6 @@ public viewerOptions: any = {
|
||||
}
|
||||
|
||||
if(value.records.final_data.length >0 && (value.records.final_data[0].sales_declared_by_customer && value.records.final_data[0].sales_declared_by_customer.cost_of_goods_sold) || (value.records.final_data[0].sales_calculated_by_itemwise &&value.records.final_data[0].sales_calculated_by_itemwise.cost_of_goods_sold)|| (value.records.final_data[0].sales_calculated_by_monthwise &&value.records.final_data[0].sales_calculated_by_monthwise.cost_of_goods_sold) ){
|
||||
|
||||
let get_sumary: any=[];
|
||||
// set sales and revenue
|
||||
get_sumary.push({"sno":'a. ',"label":'Sales / Revenue ',"declared_by_customer":(value.records.final_data[0].sales_declared_by_customer && value.records.final_data[0].sales_declared_by_customer.sales_revenue) ? value.records.final_data[0].sales_declared_by_customer.sales_revenue:0, "derived_item_wise":(value.records.final_data[0].sales_calculated_by_itemwise && value.records.final_data[0].sales_calculated_by_itemwise.sales_revenue) ? value.records.final_data[0].sales_calculated_by_itemwise.sales_revenue:0 ,"derived_sales_book":(value.records.final_data[0].sales_calculated_by_monthwise && value.records.final_data[0].sales_calculated_by_monthwise.sales_revenue) ? value.records.final_data[0].sales_calculated_by_monthwise.sales_revenue:0 });
|
||||
@ -252,7 +251,6 @@ public viewerOptions: any = {
|
||||
: (value.records.final_data[0].consolidated_report &&value.records.final_data[0].sales_declared_by_customer==null && value.records.final_data[0].sales_calculated_by_itemwise!=null && value.records.final_data[0].sales_calculated_by_monthwise==null) ? get_sumary.push({"sno":'',"label":'Considered Net Profit Amount ',"declared_by_customer":'', "derived_item_wise":value.records.final_data[0].consolidated_report.consolidated_nerprofit ,"derived_sales_book":'' })
|
||||
: (value.records.final_data[0].consolidated_report &&value.records.final_data[0].sales_declared_by_customer==null && value.records.final_data[0].sales_calculated_by_itemwise==null && value.records.final_data[0].sales_calculated_by_monthwise!=null) ? get_sumary.push({"sno":'',"label":'Considered Net Profit Amount ',"declared_by_customer":'', "derived_item_wise":'' ,"derived_sales_book":value.records.final_data[0].consolidated_report.consolidated_nerprofit })
|
||||
:'';
|
||||
|
||||
|
||||
// get conslidate net margin details
|
||||
(value.records.final_data[0].consolidated_report && value.records.final_data[0].sales_declared_by_customer!=null && value.records.final_data[0].sales_calculated_by_itemwise!=null && value.records.final_data[0].sales_calculated_by_monthwise!=null) ? get_sumary.push({"sno":'',"label":'Considered Net Profit to Sales %',"declared_by_customer":value.records.final_data[0].consolidated_report.consolidated_nermagin +'%', "derived_item_wise":'' ,"derived_sales_book":'' })
|
||||
@ -279,8 +277,8 @@ public viewerOptions: any = {
|
||||
// this.sumary_details.house_hold_expense_details = value.records.final_data[0].house_hold_expense_details !='' && value.records.final_data[0].house_hold_expense_details !=null ? value.records.final_data[0].house_hold_expense_details : 0;
|
||||
// this.sumary_details.net_disable_income_value = Number(this.sumary_details.net_profit) - Number(this.sumary_details.household_expenses);
|
||||
}
|
||||
else if(value.records.final_data.length >0 && (value.records.final_data[0].sales_declared_by_customer && value.records.final_data[0].sales_declared_by_customer.purchases) || (value.records.final_data[0].sales_calculated_by_itemwise &&value.records.final_data[0].sales_calculated_by_itemwise.purchases)|| (value.records.final_data[0].sales_calculated_by_monthwise &&value.records.final_data[0].sales_calculated_by_monthwise.purchases)){
|
||||
|
||||
// else if(value.records.final_data.length >0 && (value.records.final_data[0].sales_declared_by_customer && value.records.final_data[0].sales_declared_by_customer.purchases) || (value.records.final_data[0].sales_calculated_by_itemwise &&value.records.final_data[0].sales_calculated_by_itemwise.purchases)|| (value.records.final_data[0].sales_calculated_by_monthwise &&value.records.final_data[0].sales_calculated_by_monthwise.purchases)){
|
||||
else if(value.records.final_data.length >0 && (value.records.final_data[0].sales_declared_by_customer && (value.records.final_data[0].sales_declared_by_customer.purchases !== null && value.records.final_data[0].sales_declared_by_customer.purchases !== undefined)) || (value.records.final_data[0].sales_calculated_by_itemwise && (value.records.final_data[0].sales_calculated_by_itemwise.purchases !== null && value.records.final_data[0].sales_calculated_by_itemwise.purchases !== undefined)) || (value.records.final_data[0].sales_calculated_by_monthwise && (value.records.final_data[0].sales_calculated_by_monthwise.purchases !== null && value.records.final_data[0].sales_calculated_by_monthwise.purchases !== undefined))){
|
||||
let get_sumary: any=[];
|
||||
// set sales and revenue
|
||||
get_sumary.push({"sno":'a. ',"label":'Sales / Revenue ',"declared_by_customer":(value.records.final_data[0].sales_declared_by_customer && value.records.final_data[0].sales_declared_by_customer.sales_revenue) ? value.records.final_data[0].sales_declared_by_customer.sales_revenue:0, "derived_item_wise":(value.records.final_data[0].sales_calculated_by_itemwise && value.records.final_data[0].sales_calculated_by_itemwise.sales_revenue) ? value.records.final_data[0].sales_calculated_by_itemwise.sales_revenue:0 ,"derived_sales_book":(value.records.final_data[0].sales_calculated_by_monthwise && value.records.final_data[0].sales_calculated_by_monthwise.sales_revenue) ? value.records.final_data[0].sales_calculated_by_monthwise.sales_revenue:0 });
|
||||
@ -317,7 +315,6 @@ public viewerOptions: any = {
|
||||
: (value.records.final_data[0].consolidated_report &&value.records.final_data[0].sales_declared_by_customer==null && value.records.final_data[0].sales_calculated_by_itemwise!=null && value.records.final_data[0].sales_calculated_by_monthwise==null) ? get_sumary.push({"sno":'',"label":'Considered Net Profit ',"declared_by_customer":'', "derived_item_wise":value.records.final_data[0].consolidated_report.consolidated_nerprofit ,"derived_sales_book":'' })
|
||||
: (value.records.final_data[0].consolidated_report &&value.records.final_data[0].sales_declared_by_customer==null && value.records.final_data[0].sales_calculated_by_itemwise==null && value.records.final_data[0].sales_calculated_by_monthwise!=null) ? get_sumary.push({"sno":'',"label":'Considered Net Profit ',"declared_by_customer":'', "derived_item_wise":'' ,"derived_sales_book":value.records.final_data[0].consolidated_report.consolidated_nerprofit })
|
||||
:'';
|
||||
// get conslidate net margin details
|
||||
|
||||
|
||||
(value.records.final_data[0].consolidated_report && value.records.final_data[0].sales_declared_by_customer!=null && value.records.final_data[0].sales_calculated_by_itemwise!=null && value.records.final_data[0].sales_calculated_by_monthwise!=null) ? get_sumary.push({"sno":'',"label":'Considered Net Margin % ',"declared_by_customer":value.records.final_data[0].consolidated_report.consolidated_nermagin +'%', "derived_item_wise":'' ,"derived_sales_book":'' })
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="purchaseBillWiseDetails.length>0;else notAvilable;">
|
||||
<mat-card *ngFor="let expandDetails of purchaseBillWiseDetails">
|
||||
<div>
|
||||
<mat-card-header>
|
||||
@ -69,6 +70,10 @@
|
||||
</mat-card-actions>
|
||||
|
||||
</mat-card>
|
||||
</div>
|
||||
<ng-template #notAvilable>
|
||||
<!-- <strong>Purchase is Not Available.. </strong> -->
|
||||
</ng-template>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<notifier-container></notifier-container>
|
||||
@ -42,7 +42,7 @@ export class GrossProfitCalculationComponent implements OnInit, OnChanges {
|
||||
|
||||
|
||||
submitDetails(records: any){
|
||||
console.log(records);
|
||||
// console.log(records);
|
||||
// return;
|
||||
if (this.grossProfitForm.invalid) {
|
||||
this.validateAllFormFields(this.grossProfitForm);
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="example-container mat-elevation-z8" *ngIf="purchaseItemSource.data.length>0;">
|
||||
<div class="example-container mat-elevation-z8" *ngIf="purchaseItemSource.data.length>0;else notAvilable;">
|
||||
<table mat-table [dataSource]="purchaseItemSource">
|
||||
|
||||
<ng-container matColumnDef="raw_material" sticky>
|
||||
@ -86,7 +86,7 @@
|
||||
</div>
|
||||
</mat-card-content>
|
||||
<ng-template #notAvilable>
|
||||
<strong>Purchase Item is Not Available.. </strong>
|
||||
<!-- <strong>Purchase Item is Not Available.. </strong> -->
|
||||
</ng-template>
|
||||
</mat-card>
|
||||
<notifier-container></notifier-container>
|
||||
|
||||
@ -99,8 +99,8 @@
|
||||
<mat-select placeholder="Payment Mode" formControlName="manufacturing_payment_mode">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Payment received in Cash.">Payment received in Cash.</mat-option>
|
||||
<mat-option value="Payment received through Banking channels.">Payment
|
||||
received through Banking channels.</mat-option>
|
||||
<mat-option value="Payment received through Banking channels.">Payment received through Banking channels.</mat-option>
|
||||
<mat-option value="Payment received in Cash and also through Banking channels.">Payment received in Cash and also through Banking channels.</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
@ -233,8 +233,8 @@
|
||||
<mat-select placeholder="Payment Mode" formControlName="trade_product_payment_mode">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Payment received in Cash.">Payment received in Cash.</mat-option>
|
||||
<mat-option value="Payment received through Banking channels.">Payment
|
||||
received through Banking channels.</mat-option>
|
||||
<mat-option value="Payment received through Banking channels.">Payment received through Banking channels.</mat-option>
|
||||
<mat-option value="Payment received in Cash and also through Banking channels.">Payment received in Cash and also through Banking channels.</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
@ -366,8 +366,8 @@
|
||||
<mat-select placeholder="Payment Mode" formControlName="service_provider_product_payment_mode">
|
||||
<mat-option>Select</mat-option>
|
||||
<mat-option value="Payment received in Cash.">Payment received in Cash.</mat-option>
|
||||
<mat-option value="Payment received through Banking channels.">Payment
|
||||
received through Banking channels.</mat-option>
|
||||
<mat-option value="Payment received through Banking channels.">Payment received through Banking channels.</mat-option>
|
||||
<mat-option value="Payment received in Cash and also through Banking channels.">Payment received in Cash and also through Banking channels.</mat-option>
|
||||
</mat-select>
|
||||
|
||||
</mat-form-field>
|
||||
|
||||
@ -95,9 +95,6 @@ export class OtherApplicantDetailsComponent implements OnInit {
|
||||
// save applicant
|
||||
temp: number = 0;
|
||||
saveApplicant(formData: any) {
|
||||
console.log(formData);
|
||||
// console.log('formData',formData);
|
||||
|
||||
if (formData.applicant_list.length > 0) {
|
||||
|
||||
formData.applicant_list.forEach((val, index) => {
|
||||
|
||||
@ -63,7 +63,8 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
|
||||
this.form_id = 6;
|
||||
this.notifier = notifier;
|
||||
this.selectPerson = this.pd_all_details.pdapplicants_detials;
|
||||
console.clear();
|
||||
this.selectPerson = this.pd_all_details.pdapplicants_detials.filter(item => item.applicant_type != '2');
|
||||
this.pdid = this.pd_all_details.pdmaster_details.pd_id;
|
||||
this.main_applicant = this.pd_all_details.pdmaster_details.main_applicant;
|
||||
this.lender_applicant_id = this.pd_all_details.pdmaster_details.lender_applicant_id;
|
||||
@ -81,8 +82,6 @@ export class FamilyDetailsComponent implements OnInit {
|
||||
this.getMasterDetails('STATE', 6);
|
||||
|
||||
this._pd.getFamilyDetails(this.pdid).subscribe(data => {
|
||||
console.clear();
|
||||
|
||||
if (data.dataStatus == true) {
|
||||
|
||||
let Temparr: any = [];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user