pub struct SqliteAccountsReceivableRepository { /* private fields */ }Available on crate feature
sqlite only.Implementations§
Source§impl SqliteAccountsReceivableRepository
impl SqliteAccountsReceivableRepository
pub const fn new(pool: Pool<SqliteConnectionManager>) -> Self
Trait Implementations§
Source§impl AccountsReceivableRepository for SqliteAccountsReceivableRepository
impl AccountsReceivableRepository for SqliteAccountsReceivableRepository
Source§fn get_aging_summary(&self) -> Result<ArAgingSummary>
fn get_aging_summary(&self) -> Result<ArAgingSummary>
Get AR aging summary across all customers
Source§fn get_customer_aging(
&self,
customer_id: Uuid,
) -> Result<Option<CustomerArAging>>
fn get_customer_aging( &self, customer_id: Uuid, ) -> Result<Option<CustomerArAging>>
Get aging by customer (None if customer is not found)
Source§fn get_aging_report(
&self,
filter: ArAgingFilter,
) -> Result<Vec<CustomerArAging>>
fn get_aging_report( &self, filter: ArAgingFilter, ) -> Result<Vec<CustomerArAging>>
Get all customers with aging (AR aging report)
Source§fn log_collection_activity(
&self,
input: CreateCollectionActivity,
) -> Result<CollectionActivity>
fn log_collection_activity( &self, input: CreateCollectionActivity, ) -> Result<CollectionActivity>
Log collection activity
Source§fn list_collection_activities(
&self,
filter: CollectionActivityFilter,
) -> Result<Vec<CollectionActivity>>
fn list_collection_activities( &self, filter: CollectionActivityFilter, ) -> Result<Vec<CollectionActivity>>
Get collection activities
Source§fn update_collection_status(
&self,
invoice_id: InvoiceId,
status: CollectionStatus,
) -> Result<()>
fn update_collection_status( &self, invoice_id: InvoiceId, status: CollectionStatus, ) -> Result<()>
Update invoice collection status
Source§fn get_invoices_due_for_dunning(&self) -> Result<Vec<Invoice>>
fn get_invoices_due_for_dunning(&self) -> Result<Vec<Invoice>>
Get invoices due for dunning (based on aging)
Source§fn send_dunning_letter(
&self,
invoice_id: InvoiceId,
letter_type: DunningLetterType,
sent_by: Option<&str>,
) -> Result<CollectionActivity>
fn send_dunning_letter( &self, invoice_id: InvoiceId, letter_type: DunningLetterType, sent_by: Option<&str>, ) -> Result<CollectionActivity>
Send dunning letter (records activity, updates status)
Source§fn create_write_off(&self, input: CreateWriteOff) -> Result<WriteOff>
fn create_write_off(&self, input: CreateWriteOff) -> Result<WriteOff>
Create a write-off
Source§fn list_write_offs(&self, filter: WriteOffFilter) -> Result<Vec<WriteOff>>
fn list_write_offs(&self, filter: WriteOffFilter) -> Result<Vec<WriteOff>>
List write-offs
Source§fn create_credit_memo(&self, input: CreateCreditMemo) -> Result<CreditMemo>
fn create_credit_memo(&self, input: CreateCreditMemo) -> Result<CreditMemo>
Create a credit memo
Source§fn get_credit_memo(&self, id: Uuid) -> Result<Option<CreditMemo>>
fn get_credit_memo(&self, id: Uuid) -> Result<Option<CreditMemo>>
Get credit memo by ID
Source§fn get_credit_memo_by_number(&self, number: &str) -> Result<Option<CreditMemo>>
fn get_credit_memo_by_number(&self, number: &str) -> Result<Option<CreditMemo>>
Get credit memo by number
Source§fn list_credit_memos(&self, filter: CreditMemoFilter) -> Result<Vec<CreditMemo>>
fn list_credit_memos(&self, filter: CreditMemoFilter) -> Result<Vec<CreditMemo>>
List credit memos
Source§fn apply_credit_memo(&self, input: ApplyCreditMemo) -> Result<CreditMemo>
fn apply_credit_memo(&self, input: ApplyCreditMemo) -> Result<CreditMemo>
Apply credit memo to invoice
Source§fn void_credit_memo(&self, id: Uuid) -> Result<CreditMemo>
fn void_credit_memo(&self, id: Uuid) -> Result<CreditMemo>
Void credit memo
Source§fn get_unapplied_credits(&self, customer_id: Uuid) -> Result<Vec<CreditMemo>>
fn get_unapplied_credits(&self, customer_id: Uuid) -> Result<Vec<CreditMemo>>
Get unapplied credit memos for customer
Source§fn apply_payment_to_invoices(
&self,
input: ApplyPaymentToInvoices,
) -> Result<Vec<ArPaymentApplication>>
fn apply_payment_to_invoices( &self, input: ApplyPaymentToInvoices, ) -> Result<Vec<ArPaymentApplication>>
Apply payment to invoices
Source§fn get_payment_applications(
&self,
payment_id: Uuid,
) -> Result<Vec<ArPaymentApplication>>
fn get_payment_applications( &self, payment_id: Uuid, ) -> Result<Vec<ArPaymentApplication>>
Get payment applications
Source§fn get_customer_summary(
&self,
customer_id: Uuid,
) -> Result<Option<CustomerArSummary>>
fn get_customer_summary( &self, customer_id: Uuid, ) -> Result<Option<CustomerArSummary>>
Get customer AR summary (None if customer is not found)
Source§fn generate_statement(
&self,
request: GenerateStatementRequest,
) -> Result<CustomerStatement>
fn generate_statement( &self, request: GenerateStatementRequest, ) -> Result<CustomerStatement>
Generate customer statement
Source§fn get_total_outstanding(&self) -> Result<Decimal>
fn get_total_outstanding(&self) -> Result<Decimal>
Get total AR outstanding
Source§fn get_average_days_to_pay(&self, customer_id: Uuid) -> Result<Option<i32>>
fn get_average_days_to_pay(&self, customer_id: Uuid) -> Result<Option<i32>>
Get average days to pay by customer
fn get_customers_batch(&self, ids: Vec<Uuid>) -> Result<Vec<CustomerArSummary>>
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteAccountsReceivableRepository
impl !UnwindSafe for SqliteAccountsReceivableRepository
impl Freeze for SqliteAccountsReceivableRepository
impl Send for SqliteAccountsReceivableRepository
impl Sync for SqliteAccountsReceivableRepository
impl Unpin for SqliteAccountsReceivableRepository
impl UnsafeUnpin for SqliteAccountsReceivableRepository
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more