I should be working.

This commit is contained in:
didier amyot committed 2022-12-20 11:08:31 -05:00
1 parent d262f0d2f8
commit d78b4f1d90
5 files changed
+55 -45

No files matched your search

+10 -6
View File
@@ -2,9 +2,13 @@ use rusqlite::{Result, Transaction};
use crate::db::_external_id::{AccountId, SecurityId, UserId};
pub type Drawer = (UserId, AccountId, SecurityId);
pub type Payee = (UserId, SecurityId);
#[derive(Debug)]
pub struct SecurityEmitterCheque {
pub drawer_user_id: UserId,
pub drawer_account_id: AccountId,
pub security_id: SecurityId,
pub payee_user_id: UserId,
pub cheque_number: u32,
@@ -12,15 +16,15 @@ pub struct SecurityEmitterCheque {
}
impl SecurityEmitterCheque {
pub fn new(drawer_user_id: UserId,
security_id: SecurityId,
payee_user_id: UserId,
pub fn new(drawer: Drawer,
payee: Payee,
amount: u32,
cheque_number: u32) -> SecurityEmitterCheque {
SecurityEmitterCheque {
drawer_user_id,
security_id,
payee_user_id,
drawer_user_id: drawer.0,
drawer_account_id: drawer.1,
security_id: drawer.2,
payee_user_id: payee.0,
cheque_number,
amount,
}