.
This commit is contained in:
parent
b45fd00358
commit
5ea5010fd0
@ -26,16 +26,9 @@ export const ListQuotesPresenter: IListQuotesPresenter = {
|
|||||||
lang_code: quote.language.toString(),
|
lang_code: quote.language.toString(),
|
||||||
currency_code: quote.currency.toString(),
|
currency_code: quote.currency.toString(),
|
||||||
|
|
||||||
subtotal: {
|
subtotal_price: quote.subtotalPrice.toObject(),
|
||||||
amount: 0,
|
discount: quote.discount.toObject(),
|
||||||
precision: 2,
|
total_price: quote.totalPrice.toObject(),
|
||||||
currency: "EUR",
|
|
||||||
},
|
|
||||||
total: {
|
|
||||||
amount: 0,
|
|
||||||
precision: 2,
|
|
||||||
currency: "EUR",
|
|
||||||
},
|
|
||||||
//items: quoteItemPresenter(quote.items, context),
|
//items: quoteItemPresenter(quote.items, context),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class QuoteItemMapper
|
|||||||
const id = this.mapsValue(source, "item_id", UniqueID.create);
|
const id = this.mapsValue(source, "item_id", UniqueID.create);
|
||||||
|
|
||||||
const props: IQuoteItemProps = {
|
const props: IQuoteItemProps = {
|
||||||
articleId: source.id_article,
|
articleId: source.id_article === "" ? null : source.id_article,
|
||||||
description: this.mapsValue(source, "description", Description.create),
|
description: this.mapsValue(source, "description", Description.create),
|
||||||
quantity: this.mapsValue(source, "quantity", (quantity) =>
|
quantity: this.mapsValue(source, "quantity", (quantity) =>
|
||||||
Quantity.create({
|
Quantity.create({
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { IMoney_Response_DTO } from "../../../../../common";
|
import { IMoney_Response_DTO, IPercentage_Response_DTO } from "../../../../../common";
|
||||||
|
|
||||||
export interface IListQuotes_Response_DTO {
|
export interface IListQuotes_Response_DTO {
|
||||||
id: string;
|
id: string;
|
||||||
@ -10,5 +10,6 @@ export interface IListQuotes_Response_DTO {
|
|||||||
currency_code: string;
|
currency_code: string;
|
||||||
|
|
||||||
subtotal_price: IMoney_Response_DTO;
|
subtotal_price: IMoney_Response_DTO;
|
||||||
|
discount: IPercentage_Response_DTO;
|
||||||
total_price: IMoney_Response_DTO;
|
total_price: IMoney_Response_DTO;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user