mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
9ed67e74e2
- Supplier (AP) - PO - DO - INV - Customer (AR) - PO - DO - INV
35 lines
1.2 KiB
PHP
35 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Transactions\Services;
|
|
|
|
use App\Classes\General\Eloquent\AbstractUpdateRecord;
|
|
use App\Classes\Modules\Transactions\DataTransferObjects\TransactionObject;
|
|
use App\Models\Transaction;
|
|
|
|
class CreatesTransaction extends AbstractUpdateRecord
|
|
{
|
|
/**
|
|
* @param WalletObject $object
|
|
* @return \Illuminate\Database\Eloquent\Model
|
|
* @throws \App\Classes\Exceptions\MalformedRequestException
|
|
*/
|
|
public function execute(TransactionObject $object) {
|
|
$model = new Transaction();
|
|
$model->bill_no = $object->getBillNo();
|
|
$model->trans_type1 = $object->getTransType1();
|
|
$model->trans_type2 = $object->getTransType2();
|
|
$model->amount = $object->getAmount();
|
|
$model->currency_id = $object->getCurrency();
|
|
$model->original_amount = $object->getOriginalAmount();
|
|
$model->original_currency_id = $object->getOriginalCurrency();
|
|
$model->currency_rate = $object->getCurrencyRate();
|
|
$model->dt_transaction = $object->getDtTransaction();
|
|
$model->status = $object->getStatus();
|
|
$model->booking_id = $object->getBookingId();
|
|
$model->company_id = $object->getCompanyId();
|
|
|
|
|
|
return $this->handler($model);
|
|
|
|
}
|
|
} |