From 2fb9ff9efbafa582ca7e83f12c61548d8e7a93ed Mon Sep 17 00:00:00 2001 From: PROINT <> Date: Wed, 22 Jul 2026 09:43:33 +0700 Subject: Updated types.rs --- src/main.rs | 41 +---------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 5350945..bfc2330 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,44 +3,5 @@ mod types; use types::*; fn main() { - let asset = Account { - account_type: AccountType::Asset, - path: "1".to_string(), - name: "Asset".to_string(), - description: "Asset".to_string() - }; - let revenue = Account { - account_type: AccountType::Revenue, - path: "4".to_string(), - name: "Revenue".to_string(), - description: "Revenue".to_string() - }; - let asset_debit = Transaction { - transaction_type: TransactionType::Debit, - account: asset, - amount: 1000 - }; - let revenue_credit = Transaction { - transaction_type: TransactionType::Credit, - account: revenue, - amount: 1000 - }; - let entry = JournalEntry { - date: chrono::Utc::now(), - transactions: vec![asset_debit, revenue_credit], - balance: 1000, - description: "Paycheck".to_string() - }; - println!("date\t\t\t\t\taccount\tdebit\tcredit"); - print!("{}\t", entry.date); - for t in &entry.transactions { - if t.transaction_type == TransactionType::Debit { - println!("{}\t{}", t.account.name, t.amount); - } - } - for t in entry.transactions { - if t.transaction_type == TransactionType::Credit { - println!("\t\t\t\t\t{}\t\t{}", t.account.name, t.amount); - } - } + println!("Hello World!"); } -- cgit v1.3