Commit 89bd2da8 authored by Dirk Wildt's avatar Dirk Wildt

0.9.4

parent cf8c9db6
0.9.4
19-07-24
Feature
* #i0007: Tax for tickets
0.9.3
19-07-17
Improvement
......
......@@ -18,7 +18,7 @@ use Netzmacher\Tile\Utility\Module\SessionModuleUtility;
/**
* ShopController: backend module
*
* @version 0.0.6
* @version 0.9.4
* @since 0.0.1
* @internal #t3823
*/
......@@ -272,7 +272,7 @@ class ShopController extends AbstractController
* @param \Netzmacher\Tile\Domain\Model\Group $group
* @param int $pid
* @return \Netzmacher\Tile\Domain\Model\Cell
* @version 0.0.6
* @version 0.9.4
* @since 0.0.6
* @internal #t3857
*/
......@@ -301,6 +301,7 @@ class ShopController extends AbstractController
$product->setPrice( $ticket->getPrice() );
$product->setStockmanagement( true );
$product->setStockquantity( 1 );
$product->setTax( $ticket->getTax() );
$title = SessionModuleUtility::getFormShopTitle() . ': ' . $group->getTitle();
$product->setTitle( $title );
......
......@@ -69,6 +69,13 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
* @var integer
*/
protected $stockquantity = '';
/**
* tax
*
* @var integer
*/
protected $tax = 1;
/**
* title
......@@ -239,6 +246,28 @@ class Product extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
$this->stockquantity = $stockquantity;
}
/**
* Returns the tax
*
* @return integer $tax
*/
public function getTax()
{
return $this->tax;
}
/**
* Sets the tax
*
* @param integer $tax
* @return void
*/
public function setTax( $tax )
{
$this->tax = $tax;
}
/**
* Returns the title
*
......
......@@ -28,6 +28,13 @@ class Ticket extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
*/
protected $price = '0.00';
/**
* tax
*
* @var integer
*/
protected $tax = 1;
/**
* title
*
......@@ -78,6 +85,27 @@ class Ticket extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
$this->price = $price;
}
/**
* Returns the tax
*
* @return integer $tax
*/
public function getTax()
{
return $this->tax;
}
/**
* Sets the tax
*
* @param integer $tax
* @return void
*/
public function setTax( $tax )
{
$this->tax = $tax;
}
/**
* Returns the title
*
......
......@@ -34,17 +34,26 @@ return [
// . 'hidden,'
. 'title,'
. 'price, '
. 'tax, '
. 'tx_tile_cssdefault,'
. 'tx_tile_csscaddy,'
. 'tx_tile_cssselled,'
],
'palettes' => [
'price' => [
'showitem' => ''
. 'price;LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_ticket.grossprice,'
. 'tax;LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_ticket.tax,',
'canNotCollapse' => 1,
],
],
'types' => [
'1' => [
'showitem' => ''
// . ' promptReadonly, sys_language_uid, l10n_parent, l10n_diffsource, '
// . ' hidden, '
. ' title,'
. ' price, '
. 'title,'
. '--palette--;LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:palette.price;price,'
. 'tx_tile_cssdefault,'
. 'tx_tile_csscaddy,'
. 'tx_tile_cssselled,'
......@@ -163,6 +172,24 @@ return [
'eval' => 'required,double2,nospace',
)
),
'tax' => array(
'l10n_mode' => 'exclude',
'exclude' => 0,
'label' => 'LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_ticket.tax',
'config' => array(
'type' => 'select',
'renderType' => 'selectSingle',
'items' => array(
array( 'LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_ticket.tax.I.0', '1' ),
array( 'LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_ticket.tax.I.1', '2' ),
array( 'LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_ticket.tax.I.2', '0' ),
),
'default' => 2,
'size' => 1,
'maxitems' => 1,
'eval' => 'required',
)
),
'title' => [
'exclude' => true,
'label' => 'LLL:EXT:tile/Resources/Private/Language/locallang_db.xlf:tx_tile_domain_model_ticket.title',
......
......@@ -3,6 +3,10 @@
<file source-language="en" datatype="plaintext" original="messages" date="2019-05-13T21:10:20Z" product-name="tile">
<header/>
<body>
<trans-unit id="palette.price">
<source>Price</source>
<target>Preis</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_area">
<source>Site Plan</source>
<target>Plan</target>
......@@ -147,6 +151,22 @@
<source>TitleGross price</source>
<target>Bruttopreis</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_ticket.tax">
<source>Tax</source>
<target>MwSt.</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_ticket.tax.I.0">
<source>Reduced</source>
<target>Ermäßigt</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_ticket.tax.I.1">
<source>Normal</source>
<target>Normal</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_ticket.tax.I.2">
<source>Without</source>
<target>Ohne</target>
</trans-unit>
<trans-unit id="tx_tile_domain_model_ticket.title">
<source>Title</source>
<target>Name</target>
......
......@@ -244,6 +244,7 @@ CREATE TABLE tx_tile_domain_model_ticket (
title varchar(255) DEFAULT '' NOT NULL,
price double(11,2) DEFAULT '0.00' NOT NULL,
tax int(11) DEFAULT '0' NOT NULL,
tx_tile_cell int(11) unsigned DEFAULT '0' NOT NULL,
tx_tile_csscaddy int(11) unsigned DEFAULT '0',
tx_tile_cssdefault int(11) unsigned DEFAULT '0',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment