mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-21 05:45:46 +00:00
feat(FE): scenario egg sale with type conversion qty
This commit is contained in:
+18
@@ -36,6 +36,8 @@ export type BaseSalesOrder = {
|
||||
total_price: number;
|
||||
product_warehouse: ProductWarehouse;
|
||||
vehicle_number: string;
|
||||
marketing_type: string;
|
||||
convertion_unit: string;
|
||||
};
|
||||
|
||||
export type BaseDeliveryOrder = {
|
||||
@@ -111,6 +113,22 @@ export type BaseCreateMarketingProductPayload = {
|
||||
avg_weight: string | number | undefined;
|
||||
total_price: string | number | undefined;
|
||||
marketing_type: string;
|
||||
/**
|
||||
* Tipe konversi untuk TELUR
|
||||
* - "PETI": Penjualan telur dalam satuan peti
|
||||
* - "KG": Penjualan telur dalam satuan kilogram
|
||||
*
|
||||
* Note: Untuk mode "QTY" di FE, tetap kirim "KG" ke BE dengan unit_price yang dinormalisasi
|
||||
* karena BE tidak support convertion_unit "QTY". Workaround:
|
||||
* - FE hitung: total_price = qty × price_per_qty
|
||||
* - FE normalisasi: unit_price = total_price / total_weight
|
||||
* - BE akan hitung: total_price = total_weight × unit_price (hasil sama)
|
||||
*/
|
||||
convertion_unit?: 'PETI' | 'KG';
|
||||
/** Berat per peti (kg), hanya untuk TELUR + PETI */
|
||||
weight_per_convertion?: number;
|
||||
/** Umur minggu untuk AYAM_PULLET */
|
||||
week?: number;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user