BranchGoodPrice
Representa a un precio personalizado para un Good en una sucursal. Contiene valores para calcular
el precio del producto aplicando una sencilla fórmula:
multiplied_price = branch_good.min_price_e2 * price_multiplier;
rounded_price_e2 = roundUpToNearestInt(multiplied_price, price_multiple_e2);
price_e2 = rounded_price_e2 + price_adjustment_e2;
- branch_good_id: Identificador de la asignación
BranchGood. El registro es eliminado en cascada si el
BranchGood es removido.
- price_multiplier: Multiplicador del precio mínimo (por defecto).
- price_multiple_e2: Múltiplo para redondear el valor multiplicado (hacia arriba).
- price_adjustment_e2: Valor adicional a sumar (o restar) del resultado final.
- price_e2: Precio del Good después de realizar los cálculos.
Modelo BranchGoodPrice
{
"id": 1,
"price_multiplier": 1,
"price_multiple_e2": 1,
"price_adjustment_e2": 0,
"created_at": "2020-04-02 15:21:46",
"updated_at": "2020-04-02 15:21:46",
"branch_id": 2,
"branch_good_id": 1,
"branch_price_list_id": 2,
"price_e2": 2800000
}
Insertar BranchGoodPrice
Insertar PriceList Good GoodPrice
Método |
URI |
Cabeceras |
POST |
/companies/{companyId}/price-lists/{priceListId}/goods/{goodId}/good-prices |
Authorization |
{
"price_multiplier": "numeric|min:0.00001",
"price_multiple_e2": "integer|min:1",
"price_adjustment_e2": "integer"
}
Listar BranchGoodPrice
Listar Branch Good GoodPrice
{info} Soporta:
Filters
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/branches/{branchId}/goods/{goodId}/good-prices |
Authorization |
Mostrar BranchGoodPrice
Mostrar GoodPrice
Método |
URI |
Cabeceras |
GET |
/companies/{companyId}/good-prices/{goodPriceId} |
Authorization |
Actualizar BranchGoodPrice
Actualizar GoodPrice
Método |
URI |
Cabeceras |
PATCH |
/companies/{companyId}/good-prices/{goodPriceId} |
Authorization |
{
"price_multiplier": "numeric|min:0.00001",
"price_multiple_e2": "integer|min:1",
"price_adjustment_e2": "integer"
}
Eliminar BranchGoodPrice
Eliminar GoodPrice
Método |
URI |
Cabeceras |
DELETE |
/companies/{companyId}/good-prices/{goodPriceId} |
Authorization |
Enlaces de BranchGoodPrice