예제 #1
0
 public function execute()
 {
     if ($this->prepare()) {
         if (TransactionProcessor::ProcessTransfer($this)) {
             return true;
         } else {
             return false;
         }
     }
 }
예제 #2
0
 public function submit()
 {
     if ($this->prepare()) {
         $voucher = TransactionProcessor::ProcessReceipt($this);
         if ($voucher) {
             //payment has gone trough;
             if ($this->projectId != 0) {
                 $project = Project::GetProject($this->projectId);
                 $project->credit($this->amount);
             }
             $this->status = 1;
             $this->updateStatus();
             return $voucher;
         } else {
             return false;
         }
     }
     //make the journal entry based on the invoicing TX
     //Cr - Sales
     //Dr - Debtors [A/C Receivable]
     //Dr - Taxes Collectable
 }
예제 #3
0
 public function postprojectclaim($expvouch)
 {
     if ($this->prepare()) {
         $voucher = TransactionProcessor::ProcessClaim($this);
         if ($voucher) {
             $voucher->setExtras($expvouch);
             return $voucher;
         } else {
             return false;
         }
     }
 }
예제 #4
0
 public function post()
 {
     if ($this->prepare()) {
         $voucher = TransactionProcessor::ProcessPayrollTx($this);
         if ($voucher) {
             $voucher->status = 1;
             $this->status = 1;
             $this->updateStatus();
             return $voucher;
         } else {
             return false;
         }
     }
 }