mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Added return receipt functionality and updated related models.
- ✨ **Feature**: Introduced ReturnReceiptValuesDTO for return receipt data - ✨ **Feature**: Added ReceiptCreateReturnReceipt method in ReceiptService - ✨ **Feature**: Updated ReceiptItemDTO with new fields for handling details
This commit is contained in:
@@ -246,6 +246,7 @@ export { ReceiptListItemDTO } from './models/receipt-list-item-dto';
|
||||
export { ListResponseArgsOfReceiptItemListItemDTO } from './models/list-response-args-of-receipt-item-list-item-dto';
|
||||
export { ResponseArgsOfIEnumerableOfReceiptItemListItemDTO } from './models/response-args-of-ienumerable-of-receipt-item-list-item-dto';
|
||||
export { ReceiptItemListItemDTO } from './models/receipt-item-list-item-dto';
|
||||
export { ReturnReceiptValuesDTO } from './models/return-receipt-values-dto';
|
||||
export { ResponseArgsOfIEnumerableOfValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO } from './models/response-args-of-ienumerable-of-value-tuple-of-long-and-receipt-type-and-entity-dtocontainer-of-receipt-dto';
|
||||
export { ValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO } from './models/value-tuple-of-long-and-receipt-type-and-entity-dtocontainer-of-receipt-dto';
|
||||
export { ReceiptOrderItemSubsetReferenceValues } from './models/receipt-order-item-subset-reference-values';
|
||||
|
||||
@@ -7,10 +7,10 @@ import { EntityDTOContainerOfLogisticianDTO } from './entity-dtocontainer-of-log
|
||||
import { EntityDTOContainerOfBranchDTO } from './entity-dtocontainer-of-branch-dto';
|
||||
import { OrderItemType } from './order-item-type';
|
||||
import { EntityReferenceTypeDTO } from './entity-reference-type-dto';
|
||||
import { ProductDTO } from './product-dto';
|
||||
import { EntityDTOContainerOfPackageDTO } from './entity-dtocontainer-of-package-dto';
|
||||
import { PaymentStatus } from './payment-status';
|
||||
import { OrderItemProcessingStatusValue } from './order-item-processing-status-value';
|
||||
import { ProductDTO } from './product-dto';
|
||||
import { PromotionDTO } from './promotion-dto';
|
||||
import { QuantityDTO } from './quantity-dto';
|
||||
import { EntityDTOContainerOfReceiptDTO } from './entity-dtocontainer-of-receipt-dto';
|
||||
@@ -70,6 +70,21 @@ export interface ReceiptItemDTO extends EntityDTOBaseOfReceiptItemDTOAndIReceipt
|
||||
*/
|
||||
features?: {[key: string]: string};
|
||||
|
||||
/**
|
||||
* Details
|
||||
*/
|
||||
handlingDetails?: string;
|
||||
|
||||
/**
|
||||
* Reason / Grund
|
||||
*/
|
||||
handlingReason?: string;
|
||||
|
||||
/**
|
||||
* Item condition / Artikelzustand
|
||||
*/
|
||||
itemCondition?: string;
|
||||
|
||||
/**
|
||||
* Positionsnummer
|
||||
*/
|
||||
@@ -100,6 +115,11 @@ export interface ReceiptItemDTO extends EntityDTOBaseOfReceiptItemDTOAndIReceipt
|
||||
*/
|
||||
origin?: EntityReferenceTypeDTO;
|
||||
|
||||
/**
|
||||
* Produkt
|
||||
*/
|
||||
otherProduct?: ProductDTO;
|
||||
|
||||
/**
|
||||
* Packstück
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/* tslint:disable */
|
||||
import { ProductDTO } from './product-dto';
|
||||
import { EntityDTOContainerOfReceiptItemDTO } from './entity-dtocontainer-of-receipt-item-dto';
|
||||
|
||||
/**
|
||||
* Return receipt values / Rücknahmebelegwerte
|
||||
*/
|
||||
export interface ReturnReceiptValuesDTO {
|
||||
|
||||
/**
|
||||
* Comment / Anmerkung
|
||||
*/
|
||||
comment?: string;
|
||||
|
||||
/**
|
||||
* Item condition / Artikelzustand
|
||||
*/
|
||||
itemCondition?: string;
|
||||
|
||||
/**
|
||||
* Other product / Anderer Artikel
|
||||
*/
|
||||
otherProduct?: ProductDTO;
|
||||
|
||||
/**
|
||||
* Quantity / Menge
|
||||
*/
|
||||
quantity: number;
|
||||
|
||||
/**
|
||||
* Receipt item pk
|
||||
*/
|
||||
receiptItem?: EntityDTOContainerOfReceiptItemDTO;
|
||||
|
||||
/**
|
||||
* Return details / Rückgabedetails
|
||||
*/
|
||||
returnDetails?: string;
|
||||
|
||||
/**
|
||||
* Return reason / Rückgabegrund
|
||||
*/
|
||||
returnReason?: string;
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import { DateRange } from '../models/date-range';
|
||||
import { ListResponseArgsOfReceiptListItemDTO } from '../models/list-response-args-of-receipt-list-item-dto';
|
||||
import { QueryTokenDTO } from '../models/query-token-dto';
|
||||
import { ListResponseArgsOfReceiptItemListItemDTO } from '../models/list-response-args-of-receipt-item-list-item-dto';
|
||||
import { ReturnReceiptValuesDTO } from '../models/return-receipt-values-dto';
|
||||
import { ResponseArgsOfIEnumerableOfValueTupleOfLongAndReceiptTypeAndEntityDTOContainerOfReceiptDTO } from '../models/response-args-of-ienumerable-of-value-tuple-of-long-and-receipt-type-and-entity-dtocontainer-of-receipt-dto';
|
||||
import { ReceiptOrderItemSubsetReferenceValues } from '../models/receipt-order-item-subset-reference-values';
|
||||
@Injectable({
|
||||
@@ -32,6 +33,7 @@ class ReceiptService extends __BaseService {
|
||||
static readonly ReceiptCreateShippingNote2Path = '/receipt/shippingnote/fromitems';
|
||||
static readonly ReceiptCreateInvoicePath = '/receipt/invoice/fromorder';
|
||||
static readonly ReceiptCreateInvoice2Path = '/receipt/invoice/fromitems';
|
||||
static readonly ReceiptCreateReturnReceiptPath = '/receipt/return-receipt';
|
||||
static readonly ReceiptGetReceiptsByOrderItemSubsetPath = '/order/orderitem/orderitemsubset/receipts';
|
||||
|
||||
constructor(
|
||||
@@ -479,6 +481,56 @@ class ReceiptService extends __BaseService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create return receipt / Rücknahmebeleg erstellen
|
||||
* @param params The `ReceiptService.ReceiptCreateReturnReceiptParams` containing the following parameters:
|
||||
*
|
||||
* - `payload`: Belegdaten
|
||||
*
|
||||
* - `locale`: Lokalisierung (optional)
|
||||
*
|
||||
* - `eagerLoading`: eagerLoading (optional)
|
||||
*/
|
||||
ReceiptCreateReturnReceiptResponse(params: ReceiptService.ReceiptCreateReturnReceiptParams): __Observable<__StrictHttpResponse<ResponseArgsOfIEnumerableOfReceiptDTO>> {
|
||||
let __params = this.newParams();
|
||||
let __headers = new HttpHeaders();
|
||||
let __body: any = null;
|
||||
__body = params.payload;
|
||||
if (params.locale != null) __params = __params.set('locale', params.locale.toString());
|
||||
if (params.eagerLoading != null) __params = __params.set('eagerLoading', params.eagerLoading.toString());
|
||||
let req = new HttpRequest<any>(
|
||||
'POST',
|
||||
this.rootUrl + `/receipt/return-receipt`,
|
||||
__body,
|
||||
{
|
||||
headers: __headers,
|
||||
params: __params,
|
||||
responseType: 'json'
|
||||
});
|
||||
|
||||
return this.http.request<any>(req).pipe(
|
||||
__filter(_r => _r instanceof HttpResponse),
|
||||
__map((_r) => {
|
||||
return _r as __StrictHttpResponse<ResponseArgsOfIEnumerableOfReceiptDTO>;
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* Create return receipt / Rücknahmebeleg erstellen
|
||||
* @param params The `ReceiptService.ReceiptCreateReturnReceiptParams` containing the following parameters:
|
||||
*
|
||||
* - `payload`: Belegdaten
|
||||
*
|
||||
* - `locale`: Lokalisierung (optional)
|
||||
*
|
||||
* - `eagerLoading`: eagerLoading (optional)
|
||||
*/
|
||||
ReceiptCreateReturnReceipt(params: ReceiptService.ReceiptCreateReturnReceiptParams): __Observable<ResponseArgsOfIEnumerableOfReceiptDTO> {
|
||||
return this.ReceiptCreateReturnReceiptResponse(params).pipe(
|
||||
__map(_r => _r.body as ResponseArgsOfIEnumerableOfReceiptDTO)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Zugeordnete Belege
|
||||
* @param params The `ReceiptService.ReceiptGetReceiptsByOrderItemSubsetParams` containing the following parameters:
|
||||
@@ -651,6 +703,27 @@ module ReceiptService {
|
||||
eagerLoading?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for ReceiptCreateReturnReceipt
|
||||
*/
|
||||
export interface ReceiptCreateReturnReceiptParams {
|
||||
|
||||
/**
|
||||
* Belegdaten
|
||||
*/
|
||||
payload: Array<ReturnReceiptValuesDTO>;
|
||||
|
||||
/**
|
||||
* Lokalisierung (optional)
|
||||
*/
|
||||
locale?: null | string;
|
||||
|
||||
/**
|
||||
* eagerLoading (optional)
|
||||
*/
|
||||
eagerLoading?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for ReceiptGetReceiptsByOrderItemSubset
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user