pub struct SqliteAccountsPayableRepository { /* private fields */ }Available on crate feature
sqlite only.Implementations§
Source§impl SqliteAccountsPayableRepository
impl SqliteAccountsPayableRepository
pub const fn new(pool: Pool<SqliteConnectionManager>) -> Self
Trait Implementations§
Source§impl AccountsPayableRepository for SqliteAccountsPayableRepository
impl AccountsPayableRepository for SqliteAccountsPayableRepository
Source§fn create_bill(&self, input: CreateBill) -> Result<Bill>
fn create_bill(&self, input: CreateBill) -> Result<Bill>
Create a new bill
Source§fn update_bill(&self, id: Uuid, input: UpdateBill) -> Result<Bill>
fn update_bill(&self, id: Uuid, input: UpdateBill) -> Result<Bill>
Update a bill
Source§fn list_bills(&self, filter: BillFilter) -> Result<Vec<Bill>>
fn list_bills(&self, filter: BillFilter) -> Result<Vec<Bill>>
List bills with filter
Source§fn add_bill_item(&self, bill_id: Uuid, item: CreateBillItem) -> Result<BillItem>
fn add_bill_item(&self, bill_id: Uuid, item: CreateBillItem) -> Result<BillItem>
Add item to bill
Source§fn count_bills(&self, filter: BillFilter) -> Result<u64>
fn count_bills(&self, filter: BillFilter) -> Result<u64>
Count bills
Source§fn create_payment(&self, input: CreateBillPayment) -> Result<BillPayment>
fn create_payment(&self, input: CreateBillPayment) -> Result<BillPayment>
Create a payment
Source§fn get_payment(&self, id: Uuid) -> Result<Option<BillPayment>>
fn get_payment(&self, id: Uuid) -> Result<Option<BillPayment>>
Get payment by ID
Source§fn get_payment_by_number(&self, number: &str) -> Result<Option<BillPayment>>
fn get_payment_by_number(&self, number: &str) -> Result<Option<BillPayment>>
Get payment by number
Source§fn list_payments(&self, filter: BillPaymentFilter) -> Result<Vec<BillPayment>>
fn list_payments(&self, filter: BillPaymentFilter) -> Result<Vec<BillPayment>>
List payments with filter
Source§fn void_payment(&self, id: Uuid) -> Result<BillPayment>
fn void_payment(&self, id: Uuid) -> Result<BillPayment>
Void a payment
Source§fn clear_payment(&self, id: Uuid) -> Result<BillPayment>
fn clear_payment(&self, id: Uuid) -> Result<BillPayment>
Mark payment as cleared
Source§fn get_payment_allocations(
&self,
payment_id: Uuid,
) -> Result<Vec<PaymentAllocation>>
fn get_payment_allocations( &self, payment_id: Uuid, ) -> Result<Vec<PaymentAllocation>>
Get payment allocations
Source§fn get_payments_for_bill(&self, bill_id: Uuid) -> Result<Vec<BillPayment>>
fn get_payments_for_bill(&self, bill_id: Uuid) -> Result<Vec<BillPayment>>
Get payments for bill
Source§fn count_payments(&self, filter: BillPaymentFilter) -> Result<u64>
fn count_payments(&self, filter: BillPaymentFilter) -> Result<u64>
Count payments
Source§fn create_payment_run(&self, input: CreatePaymentRun) -> Result<PaymentRun>
fn create_payment_run(&self, input: CreatePaymentRun) -> Result<PaymentRun>
Create a payment run
Source§fn get_payment_run(&self, id: Uuid) -> Result<Option<PaymentRun>>
fn get_payment_run(&self, id: Uuid) -> Result<Option<PaymentRun>>
Get payment run by ID
Source§fn list_payment_runs(&self, filter: PaymentRunFilter) -> Result<Vec<PaymentRun>>
fn list_payment_runs(&self, filter: PaymentRunFilter) -> Result<Vec<PaymentRun>>
List payment runs with filter
Source§fn approve_payment_run(&self, id: Uuid, approved_by: &str) -> Result<PaymentRun>
fn approve_payment_run(&self, id: Uuid, approved_by: &str) -> Result<PaymentRun>
Approve payment run
Source§fn process_payment_run(&self, id: Uuid) -> Result<PaymentRun>
fn process_payment_run(&self, id: Uuid) -> Result<PaymentRun>
Process payment run
Source§fn cancel_payment_run(&self, id: Uuid) -> Result<PaymentRun>
fn cancel_payment_run(&self, id: Uuid) -> Result<PaymentRun>
Cancel payment run
Source§fn get_aging_summary(&self) -> Result<ApAgingSummary>
fn get_aging_summary(&self) -> Result<ApAgingSummary>
Get AP aging summary
Source§fn get_supplier_summary(
&self,
supplier_id: Uuid,
) -> Result<Option<SupplierApSummary>>
fn get_supplier_summary( &self, supplier_id: Uuid, ) -> Result<Option<SupplierApSummary>>
Get AP summary by supplier (None if supplier is not found)
Source§fn get_total_outstanding(&self) -> Result<Decimal>
fn get_total_outstanding(&self) -> Result<Decimal>
Get total AP outstanding
Source§fn create_bills_batch(
&self,
inputs: Vec<CreateBill>,
) -> Result<BatchResult<Bill>>
fn create_bills_batch( &self, inputs: Vec<CreateBill>, ) -> Result<BatchResult<Bill>>
Create multiple bills
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteAccountsPayableRepository
impl !UnwindSafe for SqliteAccountsPayableRepository
impl Freeze for SqliteAccountsPayableRepository
impl Send for SqliteAccountsPayableRepository
impl Sync for SqliteAccountsPayableRepository
impl Unpin for SqliteAccountsPayableRepository
impl UnsafeUnpin for SqliteAccountsPayableRepository
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