diff --git a/.travis.yml b/.travis.yml index 718356e8075..1a6cae1e792 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ php: - '5.5' - '5.6' - '7.0' +- '7.1' - nightly addons: @@ -96,7 +97,7 @@ install: if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then composer -n require phpunit/phpunit ^4 fi - if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then + if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then composer -n require phpunit/phpunit ^5 fi echo @@ -136,7 +137,7 @@ before_script: echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini echo echo "Enabling Memcached for PHP <= 5.4" - # Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0 and nightly! + # Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0, 7.1 and nightly! echo 'extension = memcached.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini fi phpenv rehash @@ -208,7 +209,7 @@ before_script: echo "Setting up Apache + FPM" # enable php-fpm cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.conf - if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then + if [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] || [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then # Copy the included pool cp ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php-fpm.d/www.conf fi diff --git a/htdocs/cashdesk/css/ticket.css b/htdocs/cashdesk/css/ticket.css new file mode 100644 index 00000000000..248e0f7b9b6 --- /dev/null +++ b/htdocs/cashdesk/css/ticket.css @@ -0,0 +1,61 @@ +/* + * TPV ticket.css + */ +body { + font-size: 1.5em; + position: relative; +} + +.entete { /* position: relative; */ + +} + +.address { /* float: left; */ + font-size: 12px; +} + +.date_heure { + position: absolute; + top: 0; + right: 0; + font-size: 16px; +} + +.infos { + position: relative; +} + +.liste_articles { + width: 100%; + border-bottom: 1px solid #000; + text-align: center; +} + +.liste_articles tr.titres th { + border-bottom: 1px solid #000; +} + +.liste_articles td.total { + text-align: right; +} + +.totaux { + margin-top: 20px; + width: 30%; + float: right; + text-align: right; +} + +.lien { + position: absolute; + top: 0; + left: 0; + display: none; +} + +@media print { + .lien { + display: none; + } +} + diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php index 9ea8cb70943..78ce86f45f7 100644 --- a/htdocs/cashdesk/tpl/ticket.tpl.php +++ b/htdocs/cashdesk/tpl/ticket.tpl.php @@ -28,130 +28,84 @@ $object->fetch($facid); ?> -
-name; ?>
-
-
name; ?>
+
+
'; -print $object->ref; -?>
-'; + print $object->ref; + ?>
+| trans("Code"); ?> | -trans("Label"); ?> | -trans("Qty"); ?> | -trans("Discount").' (%)'; ?> | -trans("TotalHT"); ?> | +trans("Code"); ?> | +trans("Label"); ?> | +trans("Qty"); ?> | +trans("Discount").' (%)'; ?> | +trans("TotalHT"); ?> | '.$tab[$i]['ref'].' | '.$tab[$i]['label'].' | '.$tab[$i]['qte'].' | '.$tab[$i]['remise_percent'].' | '.price(price2num($tab[$i]['total_ht'],'MT'),0,$langs,0,0,-1,$conf->currency).' | '."\n"); + ?> +
|---|---|---|---|---|---|---|---|---|---|
| + | + | + | + | currency);?> | +
| '.$langs->trans("TotalHT").' | '.price(price2num($obj_facturation->prixTotalHt(),'MT'),'',$langs,0,-1,-1,$conf->currency)." | \n"; -echo '
|---|---|
| '.$langs->trans("TotalVAT").' | '.price(price2num($obj_facturation->montantTva(),'MT'),'',$langs,0,-1,-1,$conf->currency)." |
| '.$langs->trans("TotalTTC").' | '.price(price2num($obj_facturation->prixTotalTtc(),'MT'),'',$langs,0,-1,-1,$conf->currency)." |
| trans("TotalHT");?> | +prixTotalHt(),'MT'),'',$langs,0,-1,-1,$conf->currency)."\n";?> | +
| trans("TotalVAT").' | '.price(price2num($obj_facturation->montantTva(),'MT'),'',$langs,0,-1,-1,$conf->currency)."\n";?> | +
| trans("TotalTTC").' | '.price(price2num($obj_facturation->prixTotalTtc(),'MT'),'',$langs,0,-1,-1,$conf->currency)."\n";?> | +
| '.$langs->trans("Ref").' | '; - print $form->showrefnav($object,'id'); - print " |
| '.$langs->trans("Label").' | '; - print ''; - print ' |
| '.$langs->trans("Label").' | '.$object->label.' |
| '.$langs->trans("LoanCapital").' | '; + print ' |
| '.$langs->trans("LoanCapital").' | '; print ' |
| '.$langs->trans("Nbterms").' | '.$object->nbterm.' |
| '.$langs->trans("Nbterms").' | '; + print ''; + if ($action == 'edit') + { + print ''; + } + else + { + print $object->nbterm; + } + print ' |
| '.$langs->trans("Rate").' | '.$object->rate.' % |
| '.$langs->trans("Rate").' | '; + print ''; + if ($action == 'edit') + { + print '%'; + } + else + { + print $object->rate . '%'; + } + print ' |
| '; print $langs->trans("LoanAccountancyCapitalCode"); print ' | '; - if (! empty($conf->accounting->enabled)) { - print length_accountg($object->account_capital); - } else { - print $object->account_capital; + if ($action == 'edit') + { + if (! empty($conf->accounting->enabled)) + { + print $formaccountancy->select_account($object->account_capital, 'accountancy_account_capital', 1, '', 0, 1); + } + else + { + print ''; + } + } + else + { + if (! empty($conf->accounting->enabled)) { + print length_accountg($object->account_capital); + } else { + print $object->account_capital; + } } print ' |
| '; print $langs->trans("LoanAccountancyInsuranceCode"); print ' | '; - if (! empty($conf->accounting->enabled)) { - print length_accountg($object->account_insurance); - } else { - print $object->account_insurance; + if ($action == 'edit') + { + if (! empty($conf->accounting->enabled)) + { + print $formaccountancy->select_account($object->account_insurance, 'accountancy_account_insurance', 1, '', 0, 1); + } + else + { + print ''; + } + } + else + { + if (! empty($conf->accounting->enabled)) { + print length_accountg($object->account_insurance); + } else { + print $object->account_insurance; + } } print ' |
| '; print $langs->trans("LoanAccountancyInterestCode"); print ' | '; - if (! empty($conf->accounting->enabled)) { - print length_accountg($object->account_interest); - } else { - print $object->account_interest; + if ($action == 'edit') + { + if (! empty($conf->accounting->enabled)) + { + print $formaccountancy->select_account($object->account_interest, 'accountancy_account_interest', 1, '', 0, 1); + } + else + { + print ''; + } + } + else + { + if (! empty($conf->accounting->enabled)) { + print length_accountg($object->account_interest); + } else { + print $object->account_interest; + } } print ' |
| '.$langs->trans("Status").' | '.$object->getLibStatut(4, $totalpaye).' |