isCardWithCustomer() ){
echo Html::a(Yii::t("frontend/ticket","Write up"),null,['class' => 'btn btn-success btn-block', 'id' => 'btn_add_to_customer_cart'] );
diff --git a/frontend/views/ticket/create.php b/frontend/views/ticket/create.php
index eebe3fa..c1ed076 100644
--- a/frontend/views/ticket/create.php
+++ b/frontend/views/ticket/create.php
@@ -31,6 +31,8 @@ $options['types'] = TicketType::modelsToArray($ticketTypes);
$options['user_cart'] = $model->userCart;
$options['customer_cart'] = $model->customerCart;
$options['selected_type'] = count($ticketTypes) > 0 ? $ticketTypes[0]->id_ticket_type : 0;
+$options['url_delete_transaction'] = Url::toRoute(['transfer/delete']);
+$options['url_pay_transaction'] = Url::toRoute(['transfer/payout']);
$this->registerJs ( 'new TicketSell( '. json_encode($options).');' );
?>
diff --git a/frontend/views/transfer/_export_btn_sale.php b/frontend/views/transfer/_export_btn_sale.php
new file mode 100644
index 0000000..7bc053d
--- /dev/null
+++ b/frontend/views/transfer/_export_btn_sale.php
@@ -0,0 +1,29 @@
+
+
+
+
+ = Html::a(
+ Yii::t('frontend/transfer', 'Export PDF'),
+ Url::to(['sale-pdf' ,
+ Html::getInputName($model, "start") => Html::getAttributeValue($model, "start"),
+ Html::getInputName($model, "end") =>Html::getAttributeValue($model, "end"),
+ Html::getInputName($model, "id_account") => Html::getAttributeValue($model, "id_account"),
+ Html::getInputName($model, "id_user") => Html::getAttributeValue($model, "id_user"),
+ Html::getInputName($model, "category") => Html::getAttributeValue($model, "category"),
+ Html::getInputName($model, "id_product") => Html::getAttributeValue($model, "id_product"),
+ Html::getInputName($model, "status") => Html::getAttributeValue($model, "status"),
+ ] ),
+ ['class' => 'btn btn-primary'])
+ ?>
+
+
+
diff --git a/frontend/views/transfer/_export_btn_ticket.php b/frontend/views/transfer/_export_btn_ticket.php
new file mode 100644
index 0000000..c052a2b
--- /dev/null
+++ b/frontend/views/transfer/_export_btn_ticket.php
@@ -0,0 +1,29 @@
+
+
+
+
+ = Html::a(
+ Yii::t('frontend/transfer', 'Export PDF'),
+ Url::to(['tickets-pdf' ,
+ Html::getInputName($model, "start") => Html::getAttributeValue($model, "start"),
+ Html::getInputName($model, "end") =>Html::getAttributeValue($model, "end"),
+ Html::getInputName($model, "id_account") => Html::getAttributeValue($model, "id_account"),
+ Html::getInputName($model, "id_user") => Html::getAttributeValue($model, "id_user"),
+ Html::getInputName($model, "status") => Html::getAttributeValue($model, "status"),
+ Html::getInputName($model, "customer") => Html::getAttributeValue($model, "customer"),
+ Html::getInputName($model, "id_ticket_type") => Html::getAttributeValue($model, "id_ticket_type"),
+ ] ),
+ ['class' => 'btn btn-primary'])
+ ?>
+
+
+
diff --git a/frontend/views/transfer/_result_sale.php b/frontend/views/transfer/_result_sale.php
new file mode 100644
index 0000000..33f7002
--- /dev/null
+++ b/frontend/views/transfer/_result_sale.php
@@ -0,0 +1,142 @@
+
+
+
+
+
Termék eladások
+
+
+
+ | getAttributeLabel('start')) ?> |
+ |
+ getAttributeLabel('end')) ?> |
+ |
+
+
+ | getAttributeLabel('id_account')) ?> |
+ id_account) ){
+ echo"Mind" ;
+ }else{
+ $account = Account::findOne($searchModel->id_account) ;
+ if ( $account != null ){
+ echo $account->name;
+ }
+ }?> |
+ getAttributeLabel('id_user')) ?> |
+ id_user) ){
+ echo"Mind" ;
+ }else{
+ $user = User::findOne($searchModel->id_user) ;
+ if ( $user != null ){
+ echo $user->username;
+ }
+ }?> |
+
+
+ | getAttributeLabel('category')) ?> |
+ category) ){
+ echo"Mind" ;
+ }else{
+ $category = ProductCategory::findOne($searchModel->category) ;
+ if ( $category != null ){
+ echo $category->name;
+ }
+ }?> |
+
+ getAttributeLabel('id_product')) ?> |
+ id_product) ){
+ echo"Mind" ;
+ }else{
+ $product = Product::findOne($searchModel->id_product) ;
+ if ( $product != null ){
+ echo $product->name;
+ }
+ }?> |
+
+
+ | getAttributeLabel('status')) ?> |
+ status) ){
+ echo"Mind" ;
+ }else{
+ $statuses = Transfer::statuses();
+ $status = "";
+ if (array_key_exists($searchModel->status, $statuses) ){
+ echo $statuses[$searchModel->status];
+ }
+ }?> |
+
+
+
+
+ Összesen: productMoney; ?> Ft
+
+
+
+
+
+ | T |
+ Kiadva |
+ Fizetve |
+ Kassza |
+ Felhasználó |
+
+ Kategória |
+ Termék |
+ Egység ár |
+ Mennyiség |
+ Összeg |
+
+
+
+ products as $p ){?>
+
+ | |
+ |
+ |
+ |
+ |
+
+ |
+ |
+ Ft |
+ Db |
+ FT |
+
+
+
+
+
+ products ) == 0) {
+ ?>
+ Nincs találat
+
+
diff --git a/frontend/views/transfer/_result_ticket.php b/frontend/views/transfer/_result_ticket.php
new file mode 100644
index 0000000..f6a07aa
--- /dev/null
+++ b/frontend/views/transfer/_result_ticket.php
@@ -0,0 +1,136 @@
+
+
+
+
+
Termék eladások
+
+
+
+ | getAttributeLabel('start')) ?> |
+ |
+ getAttributeLabel('end')) ?> |
+ |
+
+
+ | getAttributeLabel('id_account')) ?> |
+ id_account) ){
+ echo"Mind" ;
+ }else{
+ $account = Account::findOne($searchModel->id_account) ;
+ if ( $account != null ){
+ echo $account->name;
+ }
+ }?> |
+ getAttributeLabel('id_user')) ?> |
+ id_user) ){
+ echo"Mind" ;
+ }else{
+ $user = User::findOne($searchModel->id_user) ;
+ if ( $user != null ){
+ echo $user->username;
+ }
+ }?> |
+
+
+ | getAttributeLabel('id_ticket_type')) ?> |
+ id_ticket_type) ){
+ echo"Mind" ;
+ }else{
+ $ticketType = TicketType::findOne($searchModel->id_ticket_type) ;
+ if ( $ticketType != null ){
+ echo $ticketType->name;
+ }
+ }?> |
+
+ getAttributeLabel('customer')) ?> |
+ customer) ){
+ echo"" ;
+ }else{
+ echo Html::encode($searchModel->customer) ;
+ }?> |
+
+
+ | getAttributeLabel('status')) ?> |
+ status) ){
+ echo"Mind" ;
+ }else{
+ $statuses = Transfer::statuses();
+ $status = "";
+ if (array_key_exists($searchModel->status, $statuses) ){
+ echo $statuses[$searchModel->status];
+ }
+ }?> |
+
+
+
+
+ Összesen: ticketMoney; ?> Ft
+
+
+
+
+
+ | Kiadva |
+ Fizetve |
+ Kassza |
+ Felhasználó |
+ Vendég |
+ Bérlet típus |
+ Egység ár |
+ Mennyiség |
+ Összeg |
+
+
+
+ tickets as $t ){?>
+
+ | |
+ |
+ |
+ |
+ |
+ |
+ Ft |
+ Db |
+ FT |
+
+
+
+
+
+ tickets ) == 0) {
+ ?>
+ Nincs találat
+
+
diff --git a/frontend/views/transfer/_search_sale.php b/frontend/views/transfer/_search_sale.php
new file mode 100644
index 0000000..c00483a
--- /dev/null
+++ b/frontend/views/transfer/_search_sale.php
@@ -0,0 +1,77 @@
+
+
+'Mind']+ HtmlHelper::mkAccountOptions( $model->accounts );
+ $userOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->users,'id','username');
+ $productOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->productOptions,'id_product','name');
+ $productCategoryOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->productCategories,'id_product_category','name');
+ $transferStatusOptions = ['' => 'Mind'] + Transfer::statuses();
+?>
+
+
+
+ ['sale'],
+ 'method' => 'get',
+ ]); ?>
+
+
+
+
+ = $form->field($model, 'start')->widget(DateTimePicker::classname(), [
+ 'pluginOptions' => [
+ 'autoclose'=>true,
+ 'format' => 'yyyy.mm.dd hh:ii'
+ ]
+ ]) ?>
+
+
+
+ = $form->field($model, 'end') ->widget(DateTimePicker::classname(), [
+ 'pluginOptions' => [
+ 'autoclose'=>true,
+ 'format' => 'yyyy.mm.dd hh:ii'
+ ]
+ ]) ?>
+
+
+
+
+ = $form->field($model, 'id_account')->dropDownList($accountOptions) ?>
+
+
+ = $form->field($model, 'id_user')->dropDownList($userOptions) ?>
+
+
+
+
+ = $form->field($model, 'category')->dropDownList($productCategoryOptions) ?>
+
+
+ = $form->field($model, 'id_product')->dropDownList($productOptions) ?>
+
+
+ = $form->field($model, 'status')->dropDownList($transferStatusOptions) ?>
+
+
+
+
+ = Html::submitButton(Yii::t('frontend/transfer', 'Search'), ['class' => 'btn btn-primary']) ?>
+
+
+
+
+
+
diff --git a/frontend/views/transfer/_search_ticket.php b/frontend/views/transfer/_search_ticket.php
new file mode 100644
index 0000000..ca2ec56
--- /dev/null
+++ b/frontend/views/transfer/_search_ticket.php
@@ -0,0 +1,78 @@
+
+
+'Mind']+ HtmlHelper::mkAccountOptions( $model->accounts );
+ $userOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->users,'id','username');
+ $transferStatusOptions = ['' => 'Mind'] + Transfer::statuses();
+ $ticketTypeOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->ticketTypes,'id_ticket_type','name');
+?>
+
+
+
+ ['tickets'],
+ 'method' => 'get',
+ ]); ?>
+
+
+
+
+ = $form->field($model, 'start')->widget(DateTimePicker::classname(), [
+ 'pluginOptions' => [
+ 'autoclose'=>true,
+ 'format' => 'yyyy.mm.dd hh:ii'
+ ]
+ ]) ?>
+
+
+
+ = $form->field($model, 'end') ->widget(DateTimePicker::classname(), [
+ 'pluginOptions' => [
+ 'autoclose'=>true,
+ 'format' => 'yyyy.mm.dd hh:ii'
+ ]
+ ]) ?>
+
+
+
+
+ = $form->field($model, 'id_account')->dropDownList($accountOptions) ?>
+
+
+ = $form->field($model, 'id_user')->dropDownList($userOptions) ?>
+
+
+
+
+ = $form->field($model, 'id_ticket_type')->dropDownList($ticketTypeOptions) ?>
+
+
+ = $form->field($model, 'status')->dropDownList($transferStatusOptions) ?>
+
+
+
+
+ = $form->field($model, 'customer')->textInput() ?>
+
+
+
+
+ = Html::submitButton(Yii::t('frontend/transfer', 'Search'), ['class' => 'btn btn-primary']) ?>
+
+
+
+
+
+
diff --git a/frontend/views/transfer/list.php b/frontend/views/transfer/list.php
index b688f85..4015789 100644
--- a/frontend/views/transfer/list.php
+++ b/frontend/views/transfer/list.php
@@ -245,6 +245,7 @@ td.name{
Fizetve |
Kassza |
Felhasználó |
+
Vendég |
Bérlet típus |
Egység ár |
Mennyiség |
@@ -258,6 +259,7 @@ td.name{
|
|
|
+
|
|
Ft |
Db |
diff --git a/frontend/views/transfer/sale.php b/frontend/views/transfer/sale.php
new file mode 100644
index 0000000..34ad890
--- /dev/null
+++ b/frontend/views/transfer/sale.php
@@ -0,0 +1,115 @@
+title = Yii::t ( 'frontend/transfer', 'Product sale detailed' );
+$this->params ['breadcrumbs'] [] = $this->title;
+?>
+
+
+
+
+
= Html::encode($this->title) ?>
+ render('_search_sale', ['model' => $searchModel]); ?>
+ render('_export_btn_sale', ['model' => $searchModel]); ?>
+
+
+
+
+
Termék eladások
+
+
+ Összesen: productMoney; ?> Ft
+
+
+
+
+
+ | Tranzakció |
+ Kiadva |
+ Fizetve |
+ Kassza |
+ Felhasználó |
+ Vásárló |
+ Kategória |
+ Termék |
+ Egység ár |
+ Mennyiség |
+ Összeg |
+
+
+
+ products as $p ){?>
+
+ | |
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+ Ft |
+ Db |
+ FT |
+
+
+
+
+
+ products ) == 0) {
+ ?>
+ Nincs találat
+
+
+
+
+
+
+
+
diff --git a/frontend/views/transfer/search_tickets.php b/frontend/views/transfer/search_tickets.php
new file mode 100644
index 0000000..c00483a
--- /dev/null
+++ b/frontend/views/transfer/search_tickets.php
@@ -0,0 +1,77 @@
+
+
+'Mind']+ HtmlHelper::mkAccountOptions( $model->accounts );
+ $userOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->users,'id','username');
+ $productOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->productOptions,'id_product','name');
+ $productCategoryOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->productCategories,'id_product_category','name');
+ $transferStatusOptions = ['' => 'Mind'] + Transfer::statuses();
+?>
+
+
+
+ ['sale'],
+ 'method' => 'get',
+ ]); ?>
+
+
+
+
+ = $form->field($model, 'start')->widget(DateTimePicker::classname(), [
+ 'pluginOptions' => [
+ 'autoclose'=>true,
+ 'format' => 'yyyy.mm.dd hh:ii'
+ ]
+ ]) ?>
+
+
+
+ = $form->field($model, 'end') ->widget(DateTimePicker::classname(), [
+ 'pluginOptions' => [
+ 'autoclose'=>true,
+ 'format' => 'yyyy.mm.dd hh:ii'
+ ]
+ ]) ?>
+
+
+
+
+ = $form->field($model, 'id_account')->dropDownList($accountOptions) ?>
+
+
+ = $form->field($model, 'id_user')->dropDownList($userOptions) ?>
+
+
+
+
+ = $form->field($model, 'category')->dropDownList($productCategoryOptions) ?>
+
+
+ = $form->field($model, 'id_product')->dropDownList($productOptions) ?>
+
+
+ = $form->field($model, 'status')->dropDownList($transferStatusOptions) ?>
+
+
+
+
+ = Html::submitButton(Yii::t('frontend/transfer', 'Search'), ['class' => 'btn btn-primary']) ?>
+
+
+
+
+
+
diff --git a/frontend/views/transfer/tickets.php b/frontend/views/transfer/tickets.php
new file mode 100644
index 0000000..12d6713
--- /dev/null
+++ b/frontend/views/transfer/tickets.php
@@ -0,0 +1,111 @@
+title = Yii::t ( 'frontend/transfer', 'Ticket sale detailed' );
+$this->params ['breadcrumbs'] [] = $this->title;
+?>
+
+
+
+
+
= Html::encode($this->title) ?>
+ render('_search_ticket', ['model' => $searchModel]); ?>
+ render('_export_btn_ticket', ['model' => $searchModel]); ?>
+
+
+
+
+
Bérlet eladások
+
+
+ Összesen: ticketMoney; ?> Ft
+
+
+
+
+
+ | Kiadva |
+ Fizetve |
+ Kassza |
+ Felhasználó |
+ Vendég |
+ Bérlet típus |
+ Egység ár |
+ Mennyiség |
+ Összeg |
+
+
+
+ tickets as $t ){?>
+
+ | |
+ |
+ |
+ |
+ |
+ |
+ Ft |
+ Db |
+ FT |
+
+
+
+
+
+ tickets ) == 0) {
+ ?>
+ Nincs találat
+
+
+
+
+
+
+
+
diff --git a/frontend/web/js/product.sell.js b/frontend/web/js/product.sell.js
index 4972f0d..0b6f435 100644
--- a/frontend/web/js/product.sell.js
+++ b/frontend/web/js/product.sell.js
@@ -30,6 +30,8 @@ function ProductSell(o){
customer_cart: [],
id_account: null,
products : [],
+ url_delete_transaction : '',
+ url_pay_transaction : '',
};
@@ -55,6 +57,13 @@ function ProductSell(o){
// addDocumentKeypressedListener();
initAutocomplete();
+ disalbeMousewheelSpinOnNumberInput();
+ }
+
+ function disalbeMousewheelSpinOnNumberInput(){
+ $(':input[type=number]').on('mousewheel', function(e){
+ e.preventDefault();
+ });
}
/**
@@ -199,7 +208,7 @@ function ProductSell(o){
if ( event.which == 13 ) {
event.preventDefault();
event.stopImmediatePropagation();
- $('#productsaleform-id_currency').focus();
+ submitSellAndAppend();
}
});
}
@@ -477,12 +486,16 @@ function ProductSell(o){
function createUserCartTable(){
$(app.defaults.selector_user_cart).transferList({
- 'transfers' : app.defaults.user_cart
+ 'transfers' : app.defaults.user_cart,
+ 'url_delete' : app.defaults.url_delete_transaction,
+ 'url_pay' : app.defaults.url_pay_transaction,
});
}
function createCustomerCartTable(){
$(app.defaults.selector_customer_cart).transferList({
- 'transfers' : app.defaults.customer_cart
+ 'transfers' : app.defaults.customer_cart,
+ 'url_delete' : app.defaults.url_delete_transaction,
+ 'url_pay' : app.defaults.url_pay_transaction,
});
}
diff --git a/frontend/web/js/ticket.sell.js b/frontend/web/js/ticket.sell.js
index 456ea04..b47cb0b 100644
--- a/frontend/web/js/ticket.sell.js
+++ b/frontend/web/js/ticket.sell.js
@@ -45,6 +45,8 @@ function TicketSell(o){
/**mark list paid url*/
url_pay_customer_card: '-',
url_pay_user_cart: '',
+ url_delete_transaction: '',
+ url_pay_transaction: '',
};
@@ -91,18 +93,23 @@ function TicketSell(o){
function createUserCartTable(){
$(app.defaults.selector_user_cart).transferList({
- 'transfers' : app.defaults.user_cart
+ 'transfers' : app.defaults.user_cart,
+ 'url_delete' : app.defaults.url_delete_transaction,
+ 'url_pay' : app.defaults.url_pay_transaction,
});
}
function createCustomerCartTable(){
$(app.defaults.selector_customer_cart).transferList({
- 'transfers' : app.defaults.customer_cart
+ 'transfers' : app.defaults.customer_cart,
+ 'url_delete' : app.defaults.url_delete_transaction,
+ 'url_pay' : app.defaults.url_pay_transaction,
});
}
function addSellButtons(){
addBehaviourBtnSellAndAppendToUserCart();
addBehaviourBtnAddToCustomerCart();
+ addBehaviourBtnSell();
}
function addBehaviourBtnSellAndAppendToUserCart(){
@@ -113,6 +120,10 @@ function TicketSell(o){
$('#btn_add_to_customer_cart').on('click',submitAddTicketToCustomerCart);
}
+ function submitSell(){
+ $('#ticketcreate-cart').val('');
+ $('#ticket_form').submit();
+ }
function submitAddTicketToUserCart(){
$('#ticketcreate-cart').val('user');
$('#ticket_form').submit();
@@ -123,6 +134,9 @@ function TicketSell(o){
$('#ticket_form').submit();
}
+ function addBehaviourBtnSell(){
+ $('#btn_sell').on('click',submitSell);
+ }
function addBehaviourPayoutUserCart( ){
// $( app.defaults.selector_btn_pay_user_cart ).on('click',function(){
diff --git a/frontend/web/js/transferlist.js b/frontend/web/js/transferlist.js
index 7c48c49..a055491 100644
--- a/frontend/web/js/transferlist.js
+++ b/frontend/web/js/transferlist.js
@@ -1,6 +1,8 @@
$.widget( "fitness.transferList", {
options: {
transfers: [],
+ url_delete : '',
+ url_pay : '',
columns: [
{ 'label' : 'Idő' },
@@ -8,6 +10,7 @@ $.widget( "fitness.transferList", {
{ 'label' : 'Ár' },
{ 'label' : 'Db' },
{ 'label' : 'Összesen' },
+ { 'label' : '' },
],
footers: [
{
@@ -100,6 +103,14 @@ $.widget( "fitness.transferList", {
s += '
';
s += transfer.money;
s += ' | ';
+ s += '
';
+ s += '';
+ s += '';
+ s += ' | ';
s += '';
break;
case 'footer':
@@ -120,6 +131,9 @@ $.widget( "fitness.transferList", {
s += "
";
s += footer.total( params.transfers );
s += " | ";
+ s += "
";
+ s += "";
+ s += " | ";
s += "";
}
s += "";