37 lines
966 B
JavaScript
37 lines
966 B
JavaScript
import { http } from './http.js';
|
|
|
|
/**
|
|
* Stock operations (manual stock adjustment).
|
|
*/
|
|
export const stock = {
|
|
/**
|
|
* POST /api/stock/adjust
|
|
* Body: { sku, warehouseId, amount, text?, date?, externalNumber?, lines? }
|
|
*/
|
|
// #region POST /api/stock/adjust — adjust
|
|
adjust(body) {
|
|
return http('/api/stock/adjust', { method: 'POST', body });
|
|
},
|
|
// #endregion
|
|
|
|
/**
|
|
* POST /api/stock/accept
|
|
* Body: { manifestarticleId, warehouseId?, text? } or { items: [...] } or { deliveryId, warehouseId? }
|
|
*/
|
|
// #region POST /api/stock/accept — accept
|
|
accept(body) {
|
|
return http('/api/stock/accept', { method: 'POST', body });
|
|
},
|
|
// #endregion
|
|
|
|
/**
|
|
* POST /api/stock/ship
|
|
* Body: { manifestarticleId, warehouseId?, text? } or { items: [...] } or { shipmentId, warehouseId? }
|
|
*/
|
|
// #region POST /api/stock/ship — ship
|
|
ship(body) {
|
|
return http('/api/stock/ship', { method: 'POST', body });
|
|
},
|
|
// #endregion
|
|
};
|