2 switch ( $viewer->Record
->{'documenttype'} ) {
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");
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");
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");
16 $related_menu->AddOption("Batch","/view.php?t=batch&id=$b","View the entire batch");