Export column headers displayed raw i18n keys like
`expense.field.payment_account` instead of translated names like
"Payment Account" because ExportResourceService never resolved the
i18n keys before rendering.
Inject I18nService and translate column names in both
getExportableColumns() (CSV/XLSX) and getPrintableColumns() (PDF).
Closes#1073
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reports (Receivable Aging Summary, Payable Aging Summary, Inventory
Valuation, Sales Tax Liability Summary, Vendor Balance Summary) were
not assigning baseCurrency from meta in their constructors, causing
currency formatting to fall back to USD instead of the organization's
base currency.
Closes#1069
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GET /api/attachments/:id crashes with "Cannot read properties of
undefined (reading extension)" when the S3 object has no ContentType
metadata. This happens when files are uploaded without explicit content
type (e.g., via API integrations).
mime.extension(undefined) returns undefined, which then causes the
Content-Disposition header template to fail.
Fix: fallback to "application/octet-stream" when ContentType is missing,
and "bin" when mime.extension() returns undefined.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Updated Dockerfiles for server and webapp to copy all shared packages in a single command, improving maintainability.
- Removed individual package copy commands for bigcapital-utils, pdf-templates, and email-components.
- Ensured that all shared packages are included automatically during the build process.
Add missing viewSlug, filterRoles, stringifiedFilterRoles, searchKeyword,
columnSortBy, sortOrder, customViewId, page, and pageSize properties to
GetAccountsQueryDto to enable proper filtering when selecting table views
(Assets, Liabilities, Equity, Income, Expenses) on the Accounts Chart page.
Previously, the API received view_slug but didn't process it because the
DTO lacked these properties, causing all accounts to be returned instead
of filtering by the view's root_type.
Fixes#1023
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Change @IsInt() to @IsNumber() for paymentAmount field in PaymentReceivedEntryDto
to allow recording payments with cents (e.g., $1,679.80).
Fixes#1016
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Introduced new DTOs for various financial reports including Balance Sheet, Cash Flow Statement, and Aging Summaries.
- Updated existing controllers to utilize the new DTOs and enhance OpenAPI documentation with proper schema references.
- Removed unnecessary query parameters from the Bank Accounts controller.
- Enhanced response structures for better data representation in reports.
Add missing function invocation on LinkModel to properly call query method.
The model reference was missing parentheses to invoke the factory function.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Generate presigned URL for companyLogoKey when retrieving PDF template
to allow the logo to display when reopening the branding template drawer.
- Inject GetAttachmentPresignedUrl service in GetPdfTemplateService
- Generate companyLogoUri from companyLogoKey in template attributes
- Add companyLogoUri to transformer included attributes
Fixes the issue where logo uploads and saves but doesn't show when
reopening the branding template customization drawer.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>
- Add OrganizationSettingsModule to BankingTransactionsModule
- Update GetBankAccountTransactions to pass dateFormat from settings
- Add meta support to FinancialSheet base class
- Refactor TransactionsByReference to use IFinancialReportMeta
- Update frontend to use server-provided formatted_date
- Add AccountsSettingsService for managing account-related settings
- Update validators, create and edit services to use settings
- Add constants for account configuration
- Update frontend utils and translations
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace hardcoded date formats ('YYYY/MM/DD') in all Meta classes with meta.dateFormat
- Add IFinancialReportMeta interface with baseCurrency and dateFormat fields
- Add DEFAULT_REPORT_META constant with default date format 'YYYY MMM DD'
- Update all sheet classes to accept IFinancialReportMeta parameter
- Update all services to pass dateFormat from meta to sheet constructors
- Fix customer/vendor transactions date formatting in table rows
- Add TenancyModule to SalesTaxLiabilityModule for dependency injection
- Make dateFormat optional in JournalSheet and GeneralLedger query types
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix date format mismatch between Miscellaneous and Organization constants
- Fix default date format casing ('DD MMM yyyy' -> 'DD MMM YYYY')
- Rename address fields from address_1/address_2 to address1/address2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The `validateInvoicesRemainingAmount` method was incorrectly comparing the
total credit amount (sum of all entries) against each individual invoice's
due amount. This caused valid credit note applications to be rejected when
applying to multiple invoices where the total exceeded any single invoice's
due amount.
Changed the validation to compare each invoice's due amount against only the
specific entry amount being applied to that invoice.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add AuthorizationGuard and PermissionGuard to the following controllers:
- CreditNoteRefundsController
- CreditNotesApplyInvoiceController
- VendorCreditApplyBillsController
- VendorCreditsRefundController
Add @RequirePermission decorators with appropriate actions:
- View action for GET endpoints
- Edit action for POST/DELETE endpoints
- Refund action for refund-related operations
Also fixes AuthorizationGuard to use userId from clsService instead of
user.id from request for consistency with the abilities cache.
- Include child account transactions when filtering parent accounts
- Fix order of operations in accounts section mapping
- Ensure accounts with child transactions are not incorrectly filtered out
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>