Added petty cash and a couple higher security accounts, Equity and Loan

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@291 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-09 16:37:16 +00:00
parent 6507009acc
commit de5f4208eb
2 changed files with 71 additions and 3 deletions

View File

@@ -1346,6 +1346,70 @@ foreach $row (@{query($sdbh, $query)})
}
######################################################################
## Special case - Equities / Loans / Petty Cash
my ($stamp, $effective_date, $through_date);
print("Set up Petty Cash...\n");
# Add the first loan
# debit: Equity credit: Loan
addRow('transactions',
{ 'stamp' => datefmt('03/25/2009 16:00'),
});
addRow('ledger_entries',
{ 'effective_date' => $effective_date,
'through_date' => $through_date,
'monetary_source_id' => $newdb{'ids'}{'monetary_source'}{'internal'},
'transaction_id' => $newdb{'tables'}{'transactions'}{'autoid'},
'debit_ledger_id' => $newdb{'lookup'}{'account'}{'Equity'}{'ledger_id'},
'credit_ledger_id' => $newdb{'lookup'}{'account'}{'Loan'}{'ledger_id'},
'customer_id' => undef,
'lease_id' => undef,
'amount' => 5000,
'comment' => "HTP Loan #1",
});
# Add the second loan
# debit: Equity credit: Loan
addRow('transactions',
{ 'stamp' => datefmt('04/01/2009 16:00'),
});
addRow('ledger_entries',
{ 'effective_date' => $effective_date,
'through_date' => $through_date,
'monetary_source_id' => $newdb{'ids'}{'monetary_source'}{'internal'},
'transaction_id' => $newdb{'tables'}{'transactions'}{'autoid'},
'debit_ledger_id' => $newdb{'lookup'}{'account'}{'Equity'}{'ledger_id'},
'credit_ledger_id' => $newdb{'lookup'}{'account'}{'Loan'}{'ledger_id'},
'customer_id' => undef,
'lease_id' => undef,
'amount' => 1000,
'comment' => "HTP Loan #2",
});
# Cheat for now, using equity for Petty Cash
# debit: Petty Cash credit: Equity
addRow('transactions',
{ 'stamp' => datefmt('03/25/2009 16:00'),
});
addRow('ledger_entries',
{ 'effective_date' => $effective_date,
'through_date' => $through_date,
'monetary_source_id' => $newdb{'ids'}{'monetary_source'}{'internal'},
'transaction_id' => $newdb{'tables'}{'transactions'}{'autoid'},
'debit_ledger_id' => $newdb{'lookup'}{'account'}{'Petty Cash'}{'ledger_id'},
'credit_ledger_id' => $newdb{'lookup'}{'account'}{'Equity'}{'ledger_id'},
'customer_id' => undef,
'lease_id' => undef,
'amount' => 750,
'comment' => "Petty Cash Funding",
});
######################################################################
## Fake Data for Testing