improve detsta
This commit is contained in:
@@ -16,6 +16,10 @@ use common\models\Customer;
|
||||
use common\models\Card;
|
||||
use backend\models\TicketSearchStatisitcs;
|
||||
use backend\models\TicketSearchCustomer;
|
||||
use common\components\TicketSale;
|
||||
use common\models\Contract;
|
||||
use common\components\giro\GiroDETSTATetel;
|
||||
use common\components\DetStatTetelProcessor;
|
||||
|
||||
/**
|
||||
* TicketController implements the CRUD actions for Ticket model.
|
||||
@@ -34,7 +38,8 @@ class TicketController extends \backend\controllers\BackendController {
|
||||
'view',
|
||||
'update',
|
||||
'index-customer',
|
||||
'statistics'
|
||||
'statistics' ,
|
||||
'test'
|
||||
],
|
||||
'allow' => true,
|
||||
'roles' => [
|
||||
@@ -223,6 +228,58 @@ class TicketController extends \backend\controllers\BackendController {
|
||||
] );
|
||||
}
|
||||
|
||||
public function actionTest(){
|
||||
|
||||
// $this->doTestTicketSale();
|
||||
|
||||
$this->doTestDetstaProcess();
|
||||
|
||||
return $this->render('test');
|
||||
|
||||
}
|
||||
|
||||
protected function doTestDetstaProcess(){
|
||||
$contract = Contract::findOne(19);
|
||||
$megbizas = $contract->requests[0];
|
||||
|
||||
$tetel = new GiroDETSTATetel();
|
||||
$tetel->visszajelzesInformacio = "02";
|
||||
|
||||
$tp = new DetStatTetelProcessor([
|
||||
'megbizas' => $megbizas,
|
||||
'tetel' => $tetel
|
||||
]);
|
||||
|
||||
$tp->run();
|
||||
|
||||
}
|
||||
|
||||
protected function doTestTicketSale(){
|
||||
$ticketType = TicketType::findOne(1);
|
||||
$customer = Customer::findOne(1);
|
||||
$account = Account::findOne(1);
|
||||
$card = $customer->card;
|
||||
$discount = null;
|
||||
$contract = Contract::findOne(19);
|
||||
$megbizas = $contract->requests[0];
|
||||
|
||||
|
||||
|
||||
$ticketSale = new TicketSale(
|
||||
[
|
||||
'ticketType'=> $ticketType,
|
||||
'customer'=> $customer,
|
||||
'account'=> $account,
|
||||
'card'=> $card,
|
||||
'discount'=> $discount,
|
||||
'contract'=> $contract,
|
||||
'ticketInstallmentRequest' => $megbizas
|
||||
]
|
||||
);
|
||||
|
||||
$ticketSale->doSale();
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the Ticket model based on its primary key value.
|
||||
* If the model is not found, a 404 HTTP exception will be thrown.
|
||||
|
||||
1
backend/views/ticket/test.php
Normal file
1
backend/views/ticket/test.php
Normal file
@@ -0,0 +1 @@
|
||||
test
|
||||
Reference in New Issue
Block a user