Пример #1
0
 public static function CreateReceiptVoucher($receipt)
 {
     $rcpt = new Voucher($receipt->id, $receipt->transactionType->name, $receipt->transactionId, $receipt->amount->amount, $receipt->description, $receipt->date, $receipt->stamp);
     $rcpt->persist();
     $rcpt->setClient($receipt->clientId);
     return $rcpt;
 }
Пример #2
0
 public static function CreatePayrollVoucher($tx)
 {
     $voucher = new Voucher($tx->id, $tx->transactionType->name, $tx->transactionId, $tx->amount->amount, $tx->description, $tx->date, $tx->stamp);
     $voucher->persist();
     if ($tx->transactionType->name == 'Salary Advance') {
         return PayrollVoucher::GetAdvanceVoucher($tx->id);
     } else {
         return PayrollVoucher::GetVoucher($tx->id);
     }
 }