mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat: discount sale and purchase transactions
This commit is contained in:
@@ -3,6 +3,7 @@ import { IDynamicListFilterDTO } from './DynamicFilter';
|
||||
import { IItemEntry, IItemEntryDTO } from './ItemEntry';
|
||||
import { IBillLandedCost } from './LandedCost';
|
||||
import { AttachmentLinkDTO } from './Attachments';
|
||||
import { DiscountType } from './SaleInvoice';
|
||||
|
||||
export interface IBillDTO {
|
||||
vendorId: number;
|
||||
@@ -22,6 +23,13 @@ export interface IBillDTO {
|
||||
projectId?: number;
|
||||
isInclusiveTax?: boolean;
|
||||
attachments?: AttachmentLinkDTO[];
|
||||
|
||||
// # Discount
|
||||
discount?: number;
|
||||
discountType?: DiscountType;
|
||||
|
||||
// # Adjustment
|
||||
adjustment?: number;
|
||||
}
|
||||
|
||||
export interface IBillEditDTO {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Knex } from 'knex';
|
||||
import { IDynamicListFilter, IItemEntry } from '@/interfaces';
|
||||
import { DiscountType, IDynamicListFilter, IItemEntry } from '@/interfaces';
|
||||
import { ILedgerEntry } from './Ledger';
|
||||
import { AttachmentLinkDTO } from './Attachments';
|
||||
|
||||
@@ -23,6 +23,9 @@ export interface ICreditNoteNewDTO {
|
||||
branchId?: number;
|
||||
warehouseId?: number;
|
||||
attachments?: AttachmentLinkDTO[];
|
||||
discount?: number;
|
||||
discountType?: DiscountType;
|
||||
adjustment?: number;
|
||||
}
|
||||
|
||||
export interface ICreditNoteEditDTO {
|
||||
|
||||
@@ -3,6 +3,7 @@ import { IItemEntry, IItemEntryDTO } from './ItemEntry';
|
||||
import { IDynamicListFilterDTO } from '@/interfaces/DynamicFilter';
|
||||
import { CommonMailOptions, CommonMailOptionsDTO } from './Mailable';
|
||||
import { AttachmentLinkDTO } from './Attachments';
|
||||
import { DiscountType } from './SaleInvoice';
|
||||
|
||||
export interface ISaleEstimate {
|
||||
id?: number;
|
||||
@@ -40,6 +41,13 @@ export interface ISaleEstimateDTO {
|
||||
branchId?: number;
|
||||
warehouseId?: number;
|
||||
attachments?: AttachmentLinkDTO[];
|
||||
|
||||
// # Discount
|
||||
discount?: number;
|
||||
discountType?: DiscountType;
|
||||
|
||||
// # Adjustment
|
||||
adjustment?: number;
|
||||
}
|
||||
|
||||
export interface ISalesEstimatesFilter extends IDynamicListFilterDTO {
|
||||
|
||||
@@ -82,6 +82,11 @@ export interface ISaleInvoice {
|
||||
paymentMethods?: Array<PaymentIntegrationTransactionLink>;
|
||||
}
|
||||
|
||||
export enum DiscountType {
|
||||
Percentage = 'Percentage',
|
||||
Amount = 'Amount',
|
||||
}
|
||||
|
||||
export interface ISaleInvoiceDTO {
|
||||
invoiceDate: Date;
|
||||
dueDate: Date;
|
||||
@@ -105,7 +110,7 @@ export interface ISaleInvoiceDTO {
|
||||
|
||||
// # Discount
|
||||
discount?: number;
|
||||
discountType?: string;
|
||||
discountType?: DiscountType;
|
||||
|
||||
// # Adjustments
|
||||
adjustments?: string;
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Knex } from 'knex';
|
||||
import { IItemEntry } from './ItemEntry';
|
||||
import { CommonMailOptions, CommonMailOptionsDTO } from './Mailable';
|
||||
import { AttachmentLinkDTO } from './Attachments';
|
||||
import { DiscountType } from './SaleInvoice';
|
||||
|
||||
export interface ISaleReceipt {
|
||||
id?: number;
|
||||
@@ -47,6 +48,11 @@ export interface ISaleReceiptDTO {
|
||||
entries: any[];
|
||||
branchId?: number;
|
||||
attachments?: AttachmentLinkDTO[];
|
||||
|
||||
discount?: number;
|
||||
discountType?: DiscountType;
|
||||
|
||||
adjustment?: number;
|
||||
}
|
||||
|
||||
export interface ISalesReceiptsService {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IDynamicListFilter, IItemEntry, IItemEntryDTO } from '@/interfaces';
|
||||
import { DiscountType, IDynamicListFilter, IItemEntry, IItemEntryDTO } from '@/interfaces';
|
||||
import { Knex } from 'knex';
|
||||
import { AttachmentLinkDTO } from './Attachments';
|
||||
|
||||
@@ -63,6 +63,11 @@ export interface IVendorCreditDTO {
|
||||
branchId?: number;
|
||||
warehouseId?: number;
|
||||
attachments?: AttachmentLinkDTO[];
|
||||
|
||||
discount?: number;
|
||||
discountType?: DiscountType;
|
||||
|
||||
adjustment?: number;
|
||||
}
|
||||
|
||||
export interface IVendorCreditCreateDTO extends IVendorCreditDTO {}
|
||||
|
||||
Reference in New Issue
Block a user