mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-27 18:19:48 +00:00
fix: add attachment support for all transaction types
Fixed attachments not showing in edit forms for various transaction types by:
1. Adding @InjectAttachable() decorator to models:
- SaleReceipt, SaleEstimate, CreditNote, PaymentReceived
- Bill, BillPayment, VendorCredit
- ManualJournal, Expense
2. Fixing transformers to include attachments in API responses:
- SaleReceiptTransformer, PaymentReceivedTransformer
3. Registering missing event subscribers in Attachment.module.ts:
- AttachmentsOnSaleReceipts, AttachmentsOnSaleEstimates
4. Fixing DocumentLink model relation mapping:
- Changed Document.default to Document for proper module export
5. Fixing PaymentReceived model_ref consistency:
- Changed from 'PaymentReceive' to 'PaymentReceived' to match class name
6. Adding missing withGraphFetched('attachments') to GetPaymentReceived.service.ts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,8 @@ import { AttachmentsOnPaymentsReceived } from "./events/AttachmentsOnPaymentsRec
|
||||
import { AttachmentsOnManualJournals } from "./events/AttachmentsOnManualJournals";
|
||||
import { AttachmentsOnVendorCredits } from "./events/AttachmentsOnVendorCredits";
|
||||
import { AttachmentsOnSaleInvoiceCreated } from "./events/AttachmentsOnSaleInvoice";
|
||||
import { AttachmentsOnSaleReceipt } from "./events/AttachmentsOnSaleReceipts";
|
||||
import { AttachmentsOnSaleEstimates } from "./events/AttachmentsOnSaleEstimates";
|
||||
import { AttachmentsController } from "./Attachments.controller";
|
||||
import { RegisterTenancyModel } from "../Tenancy/TenancyModels/Tenancy.module";
|
||||
import { DocumentModel } from "./models/Document.model";
|
||||
@@ -50,6 +52,8 @@ const models = [
|
||||
AttachmentsOnManualJournals,
|
||||
AttachmentsOnVendorCredits,
|
||||
AttachmentsOnSaleInvoiceCreated,
|
||||
AttachmentsOnSaleReceipt,
|
||||
AttachmentsOnSaleEstimates,
|
||||
AttachmentsApplication,
|
||||
UploadDocument,
|
||||
AttachmentUploadPipeline,
|
||||
|
||||
Reference in New Issue
Block a user