Remove Quanta cruft.
[capital-apms.git] / inc / menus_entityaccount.php
blob8369c147719e7680b41fb0db1a6a82bb8856d582
1 <?php
2 switch( $component ) {
3 case 'creditor': if ( isset($id) ) $creditorcode = $id; break;
4 case 'debtor': if ( isset($id) ) $debtorcode = $id; break;
5 case 'company': if ( isset($id) ) $companycode = $id; break;
6 case 'property': if ( isset($id) ) $propertycode = $id; break;
7 case 'project': if ( isset($id) ) $projectcode = $id; break;
8 case 'asset': if ( isset($id) ) $assetcode = $id; break;
9 default:
10 if ( isset($et) && isset($ec) ) {
11 switch( $et ) {
12 case 'C': $creditorcode = $ec; break;
13 case 'T': $debtorcode = $ec; break;
14 case 'J': $projectcode = $ec; break;
15 case 'L': $companycode = $ec; break;
16 case 'P': $propertycode = $ec; break;
17 case 'A': $assetcode = $ec; break;
22 if ( isset($debtorcode) && $debtorcode > 0 ) {
23 $related_menu->AddOption("View Debtor","/view.php?t=debtor&id=$debtorcode","View the details for this debtor", false, 1000);
24 $related_menu->AddOption("Edit Debtor","/edit.php?t=debtor&id=$debtorcode","Edit the details for this debtor", false, 1001);
26 $related_menu->AddOption("Debtor Invoices","/browse.php?t=invoices&et=T&ec=$debtorcode","Browse the invoices for this debtor", false, 3000);
27 $related_menu->AddOption("New Invoice","/edit.php?t=invoice&et=T&ec=$debtorcode","Create a new invoice for this debtor", false, 3100);
29 $related_menu->AddOption("Debtor Transactions","/browse.php?t=transactions&et=T&ec=$debtorcode","Browse the transactions for this debtor", false, 5000);
30 $related_menu->AddOption("Close Transactions","/action.php?t=close_transactions&et=T&ec=$debtorcode","Close transactions for this debtor", false, 6000);
33 if ( isset($creditorcode) && $creditorcode > 0 ) {
34 $related_menu->AddOption("View Creditor","/view.php?t=creditor&id=$creditorcode","View the details for this creditor", false, 1000);
35 $related_menu->AddOption("Edit Creditor","/edit.php?t=creditor&id=$creditorcode","Edit the details for this creditor", false, 1001);
37 $related_menu->AddOption("Creditor Vouchers","/browse.php?t=vouchers&creditorcode=$creditorcode","Browse the vouchers of this creditor", false, 3000);
38 $related_menu->AddOption("New Voucher","/edit.php?t=voucher&creditorcode=$creditorcode","Create a new voucher for this creditor", false, 3100);
40 $related_menu->AddOption("Creditor Transactions","/browse.php?t=transactions&et=C&ec=$creditorcode","Browse the transactions for this creditor", false, 5000);
41 $related_menu->AddOption("Close Transactions","/action.php?t=close_transactions&et=C&ec=$creditorcode","Close transactions for this creditor", false, 6000);
44 if ( isset($propertycode) && $propertycode > 0 ) {
45 $related_menu->AddOption("View Property","/view.php?t=property&id=$propertycode","View the details for this property", false, 1000);
46 $related_menu->AddOption("Edit Property","/edit.php?t=property&id=$propertycode","Edit the details for this property", false, 1001);
48 $related_menu->AddOption("Property Accounts","/browse.php?t=accounts&et=P&ec=$propertycode","Browse the accounts for this property", false, 7100);
51 if ( isset($companycode) && $companycode > 0 ) {
52 $related_menu->AddOption("View Company","/view.php?t=company&id=$companycode","View the details for this company", false, 1000);
53 $related_menu->AddOption("Edit Company","/edit.php?t=company&id=$companycode","Edit the details for this company", false, 1001);
54 $related_menu->AddOption("Company Accounts","/browse.php?t=accounts&et=L&ec=$companycode","Browse the accounts for this company", false, 3000);
55 $related_menu->AddOption("View Year End","/view.php?t=company_year_end&id=$companycode".($year > 0 ? "&year=$year" : ""),"View end of year balances for this company", false, 4000);
56 $related_menu->AddOption("Monthly Balances","/view.php?t=company-by-month&id=$companycode".($year > 0 ? "&year=$year" : ""),"View detailed monthly balances for this company", false, 5000);
57 $related_menu->AddOption("Run Year End","/action.php?t=year-end&companycode=$companycode","Create a batch of year end transactions for this company", false, 9800);
60 if ( isset($et) && isset($ec) && isset($ac) ) {
61 $related_menu->AddOption("Account Balances","/view.php?t=account&et=$et&ec=$ec&ac=$ac","View the primary account for this $component", false, 7200);
62 $related_menu->AddOption("Account Transactions","/browse.php?t=transactions&et=$et&ec=$ec&ac=$ac","Browse the transactions for this account", false, 7400);
65 if ( isset($ac) ) {
66 $related_menu->AddOption("View Account Rec","/view.php?t=chartofaccount&ac=$ac","View the chart of accounts record");
67 $related_menu->AddOption("Edit Account Rec","/edit.php?t=chartofaccount&ac=$ac","Edit the chart of accounts record");