diff --git a/packages/server/src/modules/Bills/models/Bill.ts b/packages/server/src/modules/Bills/models/Bill.ts index b3194585e..807c746e0 100644 --- a/packages/server/src/modules/Bills/models/Bill.ts +++ b/packages/server/src/modules/Bills/models/Bill.ts @@ -51,6 +51,7 @@ export class Bill extends TenantBaseModel { public updatedAt: Date | null; public entries?: ItemEntry[]; + public attachments!: Document[]; public locatedLandedCosts?: BillLandedCost[]; /** * Timestamps columns. @@ -633,7 +634,7 @@ export class Bill extends TenantBaseModel { return this.query(trx) .where('id', billId) - [changeMethod]('payment_amount', Math.abs(amount)); + [changeMethod]('payment_amount', Math.abs(amount)); } /** diff --git a/packages/server/src/modules/Bills/queries/Bill.transformer.ts b/packages/server/src/modules/Bills/queries/Bill.transformer.ts index f1ea70e5d..851a284a4 100644 --- a/packages/server/src/modules/Bills/queries/Bill.transformer.ts +++ b/packages/server/src/modules/Bills/queries/Bill.transformer.ts @@ -1,5 +1,7 @@ import { Transformer } from '@/modules/Transformer/Transformer'; import { Bill } from '../models/Bill'; +import { ItemEntryTransformer } from '@/modules/TransactionItemEntry/ItemEntry.transformer'; +import { AttachmentTransformer } from '@/modules/Attachments/Attachment.transformer'; export class BillTransformer extends Transformer { /** @@ -231,20 +233,18 @@ export class BillTransformer extends Transformer { /** * Retrieves the entries of the bill. * @param {Bill} credit - * @returns {} */ - // protected entries = (bill: Bill) => { - // return this.item(bill.entries, new ItemEntryTransformer(), { - // currencyCode: bill.currencyCode, - // }); - // }; + protected entries = (bill: Bill) => { + return this.item(bill.entries, new ItemEntryTransformer(), { + currencyCode: bill.currencyCode, + }); + }; /** * Retrieves the bill attachments. - * @param {ISaleInvoice} invoice - * @returns + * @param {Bill} bill */ - // protected attachments = (bill: Bill) => { - // return this.item(bill.attachments, new AttachmentTransformer()); - // }; + protected attachments = (bill: Bill) => { + return this.item(bill.attachments, new AttachmentTransformer()); + }; } diff --git a/packages/server/src/modules/Organization/commands/UpdateOrganization.service.ts b/packages/server/src/modules/Organization/commands/UpdateOrganization.service.ts index 29905e2d5..7102bc9aa 100644 --- a/packages/server/src/modules/Organization/commands/UpdateOrganization.service.ts +++ b/packages/server/src/modules/Organization/commands/UpdateOrganization.service.ts @@ -13,9 +13,8 @@ export class UpdateOrganizationService { private readonly tenancyContext: TenancyContext, private readonly eventEmitter: EventEmitter2, private readonly commandOrganizationValidators: CommandOrganizationValidators, - private readonly tenantRepository: TenantRepository, - ) {} + ) { } /** * Updates organization information. diff --git a/packages/webapp/src/containers/Dialogs/ExportDialog/ExportDialogContent.module.scss b/packages/webapp/src/containers/Dialogs/ExportDialog/ExportDialogContent.module.scss deleted file mode 100644 index 8e15ad992..000000000 --- a/packages/webapp/src/containers/Dialogs/ExportDialog/ExportDialogContent.module.scss +++ /dev/null @@ -1,18 +0,0 @@ - - -.root{ - padding: 20px; -} - -.footer{ - margin-top: 2rem; -} - -.resourceFormGroup{ - max-width: 280px; -} - -.paragraph{ - color: #5F6B7C; - margin-bottom: 1.2rem; -} \ No newline at end of file diff --git a/packages/webapp/src/containers/Dialogs/ExportDialog/ExportDialogFormContent.tsx b/packages/webapp/src/containers/Dialogs/ExportDialog/ExportDialogFormContent.tsx index e0bda67c5..c4d849685 100644 --- a/packages/webapp/src/containers/Dialogs/ExportDialog/ExportDialogFormContent.tsx +++ b/packages/webapp/src/containers/Dialogs/ExportDialog/ExportDialogFormContent.tsx @@ -2,8 +2,8 @@ import { FFormGroup, FRadioGroup, FSelect, Group } from '@/components'; import { Button, Intent, Radio } from '@blueprintjs/core'; import { Form, useFormikContext } from 'formik'; +import { x } from '@xstyled/emotion'; import { ExportResources } from './constants'; -import styles from './ExportDialogContent.module.scss'; import { compose } from '@/utils'; import { withDialogActions } from '@/containers/Dialog/withDialogActions'; import { DialogsName } from '@/constants/dialogs'; @@ -19,21 +19,22 @@ function ExportDialogFormContentRoot({ return (
); }