mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
58 lines
1.5 KiB
PHP
58 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Receipts\Standards\Validators;
|
|
|
|
use App\Classes\General\Abstracts\AbstractValidation;
|
|
|
|
class ReceiptDetailValidation extends AbstractValidation
|
|
{
|
|
/*
|
|
*
|
|
* $this->bill_no = $bill_no;
|
|
$this->trans_type1= $trans_type1;
|
|
$this->trans_type2 = $trans_type2;
|
|
$this->amount= $amount;
|
|
$this->currency_id = $currency_id;
|
|
$this->original_amount = $original_amount;
|
|
$this->original_currency_id = $original_currency_id;
|
|
$this->currency_rate = $currency_rate;
|
|
$this->dt_transaction = $dt_transaction;
|
|
$this->status = $status;
|
|
$this->booking_id = $booking_id;
|
|
$this->company_id = $company_id;
|
|
*/
|
|
protected function data($object): array
|
|
{
|
|
return [
|
|
'trans_type1' => $object->getTransType1(),
|
|
'trans_type2' => $object->getTransType2(),
|
|
'transaction_id' => $object->getTransactionId(),
|
|
'receipt_id' => $object->getReceiptId(),
|
|
'price'=>$object->getPrice(),
|
|
'amount' => $object->getAmount()
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function rules(): array
|
|
{
|
|
return [
|
|
'trans_type1' => 'required',
|
|
'trans_type2' => 'required',
|
|
'transaction_id' => 'required',
|
|
'receipt_id' => 'required',
|
|
'price'=>'required',
|
|
'amount' => 'required'
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return array
|
|
*/
|
|
protected function messages(): array
|
|
{
|
|
return [];
|
|
}
|
|
} |