Added automatic generation in dashboard when employees start application to generate product under limit during absence
This commit is contained in:
@@ -109,10 +109,6 @@ export class PurchaseOrderTable implements OnInit {
|
||||
|
||||
const futureDate = new Date(today);
|
||||
futureDate.setMonth(today.getMonth() + 2);
|
||||
const yyyy = futureDate.getFullYear();
|
||||
const mm = (futureDate.getMonth() + 1).toString().padStart(2, '0');
|
||||
const dd = futureDate.getDate().toString().padStart(2, '0');
|
||||
const estimateDate = `${yyyy}-${mm}-${dd}`;
|
||||
|
||||
let trackingValue = 'TRK-';
|
||||
const idStr = purchaseOrder.id?.toString() ?? '';
|
||||
@@ -129,8 +125,6 @@ export class PurchaseOrderTable implements OnInit {
|
||||
|
||||
const deliveryNoteDto: CreateDeliveryNoteDto = {
|
||||
trackingNumber: trackingValue,
|
||||
expeditionDate: date,
|
||||
estimateDeliveryDate: estimateDate,
|
||||
delivererId: deliverer.delivererId,
|
||||
productQuantities: productQuantities,
|
||||
supplierId: purchaseOrder.supplierId
|
||||
@@ -141,6 +135,7 @@ export class PurchaseOrderTable implements OnInit {
|
||||
} catch {
|
||||
this.notificationService.error('Erreur', 'Erreur lors du transfert');
|
||||
}
|
||||
this.onModalCancel(this.modalDeliverer());
|
||||
this.purchaseOrdersLoading.set(false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user