Skip to content

Commit

Permalink
Merge pull request #947 from inbaz/develop
Browse files Browse the repository at this point in the history
changes to correct e-ticket
  • Loading branch information
BigAndini authored May 5, 2017
2 parents 3f0e524 + bb7b4ec commit c5bab65
Show file tree
Hide file tree
Showing 39 changed files with 99 additions and 43 deletions.
Binary file modified data/ers.mwb
Binary file not shown.
Binary file modified data/ers.mwb.bak
Binary file not shown.
15 changes: 14 additions & 1 deletion module/Admin/src/Admin/Form/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,20 @@ public function __construct($name = null)
'class' => 'checkbox',
),
'options' => array(
'label' => 'Visible',
'label' => 'visible in shop',
'label_attributes' => array(
'class' => 'media-object',
),
),
));
$this->add(array(
'type' => 'checkbox',
'name' => 'visible_on_eticket',
'attributes' => array(
'class' => 'checkbox',
),
'options' => array(
'label' => 'visible on e-ticket',
'label_attributes' => array(
'class' => 'media-object',
),
Expand Down
1 change: 1 addition & 0 deletions module/Admin/view/admin/product/add.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ echo $this->formHidden($form->get('active'));
echo $this->formHidden($form->get('deleted'));
echo $this->formRow($form->get('position'));
echo $this->formRow($form->get('visible'));
echo $this->formRow($form->get('visible_on_eticket'));
echo $this->formRow($form->get('name'));
echo $this->formRow($form->get('short_description'));
echo $this->formRow($form->get('long_description'));
Expand Down
1 change: 1 addition & 0 deletions module/Admin/view/admin/product/edit.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ echo $this->formHidden($form->get('active'));
echo $this->formHidden($form->get('deleted'));
echo $this->formRow($form->get('position'));
echo $this->formRow($form->get('visible'));
echo $this->formRow($form->get('visible_on_eticket'));
echo $this->formRow($form->get('name'));
echo $this->formRow($form->get('short_description'));
echo $this->formRow($form->get('long_description'));
Expand Down
16 changes: 12 additions & 4 deletions module/Admin/view/admin/product/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ $this->headTitle($title);

<table class="table">
<tr>
<th>Pos.</th>
<th>Visible</th>
<th>Name</th>
<th>Template for E-Ticket <i class="fa fa-question-circle text-info" data-toggle="tooltip" title="Some product types can be displayed on the e-ticket via a template. If no template fits for your product request a template through an issue on github. You can find a link to the issue tracker on the bottom right of this page."></i></th>
<th>pos.</th>
<th>visible<br />in shop</th>
<th>visible<br />on e-ticket</th>
<th>name</th>
<th>template for e-ticket <i class="fa fa-question-circle text-info" data-toggle="tooltip" title="Some product types can be displayed on the e-ticket via a template. If no template fits for your product request a template through an issue on github. You can find a link to the issue tracker on the bottom right of this page."></i></th>
<!--<th>Variant</th>-->
<th>
<a class="btn btn-sm btn-success" href="<?php echo $this->url('admin/product', array('action'=>'add'));?>"><i class="fa fa-plus"></i> <?php echo _('product'); ?></a>
Expand All @@ -29,6 +30,13 @@ $this->headTitle($title);
<i class="fa fa-lg fa-eye-slash"></i>
<?php endif; ?>
</td>
<td>
<?php if($product->getVisibleOnEticket()) : ?>
<i class="fa fa-lg fa-eye"></i>
<?php else: ?>
<i class="fa fa-lg fa-eye-slash"></i>
<?php endif; ?>
</td>
<td><?php
if($product->getPersonalized()) : ?>
<!--<img src="/img/icons/32px/user.png" alt="(personalized)" title="This product needs to be linked to a user" />-->
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public function getServiceConfig() {
$service->setServiceLocator($sm);
$em = $sm->get('Doctrine\ORM\EntityManager');
$products = $em->getRepository('ErsBase\Entity\Product')
->findBy(array('visible' => '1'), array('position' => 'ASC'));
->findBy(array('visible_on_eticket' => '1'), array('position' => 'ASC'));
$service->setProducts($products);
return $service;
},
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Agegroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/BankAccountCsv.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/BankStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Code.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Counter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Country.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Currency.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Deadline.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/ItemPackage.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/ItemVariant.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Log.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Match.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-04-17 14:11:19.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/PackageStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/PaymentDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/PaymentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
34 changes: 31 additions & 3 deletions module/ErsBase/src/ErsBase/Entity/Base/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down Expand Up @@ -68,6 +68,11 @@ abstract class Product
*/
protected $visible;

/**
* @ORM\Column(name="`visible_on_eticket`", type="boolean", nullable=true)
*/
protected $visible_on_eticket;

/**
* @ORM\Column(name="`deleted`", type="boolean", nullable=true)
*/
Expand Down Expand Up @@ -365,6 +370,29 @@ public function getVisible()
return $this->visible;
}

/**
* Set the value of visible_on_eticket.
*
* @param boolean $visible_on_eticket
* @return \ErsBase\Entity\Base\Product
*/
public function setVisibleOnEticket($visible_on_eticket)
{
$this->visible_on_eticket = $visible_on_eticket;

return $this;
}

/**
* Get the value of visible_on_eticket.
*
* @return boolean
*/
public function getVisibleOnEticket()
{
return $this->visible_on_eticket;
}

/**
* Set the value of deleted.
*
Expand Down Expand Up @@ -713,7 +741,7 @@ public function populate(array $data = array())
*/
public function getArrayCopy(array $fields = array())
{
$dataFields = array('id', 'tax_id', 'position', 'display_name', 'name', 'short_description', 'long_description', 'active', 'visible', 'deleted', 'personalized', 'ticket_template', 'updated', 'created');
$dataFields = array('id', 'tax_id', 'position', 'display_name', 'name', 'short_description', 'long_description', 'active', 'visible', 'visible_on_eticket', 'deleted', 'personalized', 'ticket_template', 'updated', 'created');
$relationFields = array('tax');
$copiedFields = array();
foreach ($relationFields as $relationField) {
Expand Down Expand Up @@ -746,6 +774,6 @@ public function getArrayCopy(array $fields = array())

public function __sleep()
{
return array('id', 'tax_id', 'position', 'display_name', 'name', 'short_description', 'long_description', 'active', 'visible', 'deleted', 'personalized', 'ticket_template', 'updated', 'created');
return array('id', 'tax_id', 'position', 'display_name', 'name', 'short_description', 'long_description', 'active', 'visible', 'visible_on_eticket', 'deleted', 'personalized', 'ticket_template', 'updated', 'created');
}
}
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/ProductPackage.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/ProductPrice.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/ProductVariant.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Role.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
2 changes: 1 addition & 1 deletion module/ErsBase/src/ErsBase/Entity/Base/Tax.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-03-06 16:58:38.
* Version 2.1.6-dev (doctrine2-mappedsuperclass) on 2017-05-05 22:04:45.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
Expand Down
Loading

0 comments on commit c5bab65

Please sign in to comment.