detsta processing -> move to cart if not successfull, transfer/paymentLater changes
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
namespace console\controllers;
|
||||
|
||||
|
||||
use common\components\giro\GiroDETSTA;
|
||||
use common\components\giro\GiroDETSTAFej;
|
||||
use common\components\giro\GiroDETSTALab;
|
||||
use common\components\giro\GiroDETSTATetel;
|
||||
use common\models\Ugiro;
|
||||
use yii\console\Controller;
|
||||
use frontend\models\ContractForm;
|
||||
use common\models\TicketType;
|
||||
@@ -37,7 +42,61 @@ class DetstaConsoleController extends Controller{
|
||||
$contractForm->make();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param integer $id_ugiro
|
||||
*/
|
||||
public function actionDetstaAnswer($id_ugiro,$accepted = 1){
|
||||
|
||||
/** @var \common\models\Ugiro $ugiro */
|
||||
$ugiro = Ugiro::findOne($id_ugiro);
|
||||
/** @var \common\components\giro\\GiroDETSTA $detsta */
|
||||
$detsta = new GiroDETSTA();
|
||||
/** @var \common\components\giro\GiroDETSTAFej $detsta */
|
||||
$detsta->fej = new GiroDETSTAFej();
|
||||
|
||||
|
||||
$detsta->fej->jelentesJelzo = 8;
|
||||
$detsta->fej->kezdemenyezoAzonosito =\Yii::$app->params['ugiro_kezdemenyezo_azonosito'];
|
||||
$detsta->fej->csoportosUzenetSorszam->osszeallitasDatuma = $ugiro->datum;
|
||||
$detsta->fej->csoportosUzenetSorszam->sorszam = $ugiro->number;
|
||||
$detsta->fej->detstaUzenetSorszam->osszeallitasDatuma = $ugiro->datum;
|
||||
$detsta->fej->detstaUzenetSorszam->sorszam = $ugiro->number;
|
||||
|
||||
|
||||
|
||||
$detsta->lab = new GiroDETSTALab();
|
||||
|
||||
$tetelek = $ugiro->requests;
|
||||
/** @var \common\models\TicketInstallmentRequest $tetel */
|
||||
foreach ($tetelek as $tetel ){
|
||||
$detstaTetel = new GiroDETSTATetel();
|
||||
|
||||
$detstaTetel->tetelSorszam = $tetel->number;
|
||||
$detstaTetel->osszeg = $tetel->money;
|
||||
$detstaTetel->eredetiTetelElszamolasiDatuma = $ugiro->datum;
|
||||
if ( $accepted == "1"){
|
||||
$detstaTetel->visszajelzesInformacio = GiroDETSTATetel::$INFORMACIO_TELJESITETT;
|
||||
}else{
|
||||
$detstaTetel->visszajelzesInformacio = '50';
|
||||
}
|
||||
$detstaTetel->feldolgozasDatum = $ugiro->datum;
|
||||
$detstaTetel->terhelesiDatum = $ugiro->datum;
|
||||
$detstaTetel->valaszHivatkozasiKod = '1234';
|
||||
$detstaTetel->eredetiHivatkozasiKod = '1234';
|
||||
$detstaTetel->ugyfelAzonosito = $tetel->customer->id_customer;
|
||||
|
||||
$detsta->tetelek[] = $detstaTetel;
|
||||
|
||||
|
||||
}
|
||||
|
||||
$content = $detsta->toString();
|
||||
|
||||
file_put_contents('c:\tmp\detsta.txt',$content);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user