Current code.
[capital-apms.git] / inc / menus_document.php
blobab5e4bc2eae94ac8c901cbf82d4fc01cf6019097
1 <?php
2 switch ( $viewer->Record->{'documenttype'} ) {
3 case 'VCHR':
4 $vchr = substr($viewer->Record->{'reference'},4);
5 $related_menu->AddOption("Voucher","/view.php?t=voucher&id=$vchr","View the creditor voucher that created this document");
6 break;
7 case 'INVC':
8 $invc = substr($viewer->Record->{'reference'},4);
9 $related_menu->AddOption("Invoice","/view.php?t=invoice&id=$invc","View the debtor invoice that created this document");
10 break;
11 case 'CHEQ':
12 list($bankaccountcode,$chequeno) = split( ",", $viewer->Record->{'reference'},2);
13 $related_menu->AddOption("Cheque","/view.php?t=cheque&id=".$viewer->Record->{'reference'},"View the cheque payment that created this document");
14 break;
16 $related_menu->AddOption("Batch","/view.php?t=batch&id=$b","View the entire batch");