Merge branch 'development' into 'devops-staging'
fix: product See merge request empatnusabangsa/ppob/ppob-backend!65
This commit is contained in:
commit
c6b4303adc
|
@ -12,6 +12,7 @@ import { UsersService } from '../users/users.service';
|
||||||
import { SupplierService } from '../users/supplier/supplier.service';
|
import { SupplierService } from '../users/supplier/supplier.service';
|
||||||
import { parsingFile } from '../helper/csv-parser';
|
import { parsingFile } from '../helper/csv-parser';
|
||||||
import { PartnerService } from '../users/partner/partner.service';
|
import { PartnerService } from '../users/partner/partner.service';
|
||||||
|
import { isNull } from 'util';
|
||||||
|
|
||||||
export class ProductService {
|
export class ProductService {
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -90,6 +91,11 @@ export class ProductService {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!dataHistoryPrice){
|
||||||
|
console.log(productData,"productnya",partnerData);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
dataHistoryPrice.endDate = new Date();
|
dataHistoryPrice.endDate = new Date();
|
||||||
await this.productHistoryPrice.save(dataHistoryPrice);
|
await this.productHistoryPrice.save(dataHistoryPrice);
|
||||||
|
|
||||||
|
@ -99,7 +105,6 @@ export class ProductService {
|
||||||
price: it[3],
|
price: it[3],
|
||||||
type: productType.NORMAL,
|
type: productType.NORMAL,
|
||||||
startDate: new Date(),
|
startDate: new Date(),
|
||||||
endDate: null,
|
|
||||||
partner: it[6] != '-' ? partnerData : null,
|
partner: it[6] != '-' ? partnerData : null,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
@ -122,7 +127,7 @@ export class ProductService {
|
||||||
type: productType.NORMAL,
|
type: productType.NORMAL,
|
||||||
startDate: new Date(),
|
startDate: new Date(),
|
||||||
endDate: null,
|
endDate: null,
|
||||||
partner: it[6] != '-' ? partnerData : null,
|
partner: partnerData,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user