Merge branch 'features/feature-commande-detail' into releases/release-h2f
This commit is contained in:
commit
64bbca652b
@ -161,6 +161,9 @@ return [
|
||||
['name' => 'order#updateOrderDate','url' => '/order/{orderId}/updateDate', 'verb' => 'PUT'],
|
||||
['name' => 'order#getThanatoProductsFees','url' => '/thanatoProductFees/list', 'verb' => 'PROPFIND'],
|
||||
['name' => 'order#createDefaultThanatoProductFee','url' => '/thanatoProductFees/createDefaultThanatoProductFee', 'verb' => 'POST'],
|
||||
['name' => 'order#orderDetails', 'url' => '/order/{orderId}/details', 'verb' => 'GET'],
|
||||
['name' => 'order#getOrderProductsById', 'url' => '/order/{orderId}/products', 'verb' => 'PROPFIND'],
|
||||
['name' => 'order#getOrderTotalAmount', 'url' => '/order/{orderId}/totalAmount', 'verb' => 'PROPFIND'],
|
||||
|
||||
//clients discount
|
||||
['name' => 'page#getClientGroupDiscounts', 'url' => '/getClientGroupDiscounts', 'verb' => 'PROPFIND'],
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
gestion/js/orderDetails.app.js
Normal file
2
gestion/js/orderDetails.app.js
Normal file
File diff suppressed because one or more lines are too long
379
gestion/js/orderDetails.app.js.LICENSE.txt
Normal file
379
gestion/js/orderDetails.app.js.LICENSE.txt
Normal file
@ -0,0 +1,379 @@
|
||||
/*!
|
||||
* Sizzle CSS Selector Engine v2.3.9
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://js.foundation/
|
||||
*
|
||||
* Date: 2022-12-19
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Toastify js 1.12.0
|
||||
* https://github.com/apvarun/toastify-js
|
||||
* @license MIT licensed
|
||||
*
|
||||
* Copyright (C) 2018 Varun A P
|
||||
*/
|
||||
|
||||
/*!
|
||||
* escape-html
|
||||
* Copyright(c) 2012-2013 TJ Holowaychuk
|
||||
* Copyright(c) 2015 Andreas Lubbe
|
||||
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
/*!
|
||||
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
||||
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
||||
* Released under MIT License
|
||||
*/
|
||||
|
||||
/*!
|
||||
* jQuery JavaScript Library v3.6.3
|
||||
* https://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright OpenJS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2022-12-20T21:28Z
|
||||
*/
|
||||
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
|
||||
/*! @license DOMPurify 2.4.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.4/LICENSE */
|
||||
|
||||
/*! DataTables 1.13.2
|
||||
* ©2008-2023 SpryMedia Ltd - datatables.net/license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
Copyright (c) 2008, Adobe Systems Incorporated
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of Adobe Systems Incorporated nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
*
|
||||
* Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
*
|
||||
* Licensed under the MIT License.
|
||||
* http://opensource.org/licenses/mit-license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* (c) Dean McNamee <dean@gmail.com>, 2013.
|
||||
*
|
||||
* https://github.com/deanm/omggif
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
* deal in the Software without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*
|
||||
* omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
|
||||
* including animation and compression. It does not rely on any specific
|
||||
* underlying system, so should run in the browser, Node, or Plask.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
|
||||
*
|
||||
* Licensed under the MIT License.
|
||||
* http://opensource.org/licenses/mit-license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Copyright (c) 2017 Aras Abbasi
|
||||
*
|
||||
* Licensed under the MIT License.
|
||||
* http://opensource.org/licenses/mit-license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Copyright (c) 2018 Aras Abbasi
|
||||
*
|
||||
* Licensed under the MIT License.
|
||||
* http://opensource.org/licenses/mit-license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Copyright (c) 2019 Aras Abbasi
|
||||
*
|
||||
* Licensed under the MIT License.
|
||||
* http://opensource.org/licenses/mit-license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* FPDF is released under a permissive license: there is no usage restriction.
|
||||
* You may embed it freely in your application (commercial or not), with or
|
||||
* without modifications.
|
||||
*
|
||||
* Reference: http://www.fpdf.org/en/script/script37.php
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Joseph Myers does not specify a particular license for his work.
|
||||
*
|
||||
* Author: Joseph Myers
|
||||
* Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
|
||||
*
|
||||
* Modified by: Owen Leong
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Licensed under the MIT License.
|
||||
* http://opensource.org/licenses/mit-license
|
||||
* Author: Owen Leong (@owenl131)
|
||||
* Date: 15 Oct 2020
|
||||
* References:
|
||||
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
|
||||
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
|
||||
* http://www.fpdf.org/en/script/script37.php
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Licensed under the MIT License.
|
||||
* http://opensource.org/licenses/mit-license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
|
||||
* MIT License
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* jsPDF fileloading PlugIn
|
||||
* Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)
|
||||
*
|
||||
* Licensed under the MIT License.
|
||||
* http://opensource.org/licenses/mit-license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* jsPDF filters PlugIn
|
||||
* Copyright (c) 2014 Aras Abbasi
|
||||
*
|
||||
* Licensed under the MIT License.
|
||||
* http://opensource.org/licenses/mit-license
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
* jsPDF virtual FileSystem functionality
|
||||
*
|
||||
* Licensed under the MIT License.
|
||||
* http://opensource.org/licenses/mit-license
|
||||
*/
|
||||
|
||||
/**
|
||||
* A class to parse color values
|
||||
* @author Stoyan Stefanov <sstoo@gmail.com>
|
||||
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
|
||||
* @license Use it if you like it
|
||||
*/
|
||||
|
||||
/** ====================================================================
|
||||
* @license
|
||||
* jsPDF XMP metadata plugin
|
||||
* Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
* ====================================================================
|
||||
*/
|
||||
|
||||
/** @license
|
||||
* Copyright (c) 2017 Dominik Homberger
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
https://webpjs.appspot.com
|
||||
WebPRiffParser dominikhlbg@gmail.com
|
||||
*/
|
||||
|
||||
/** @license
|
||||
*
|
||||
* jsPDF - PDF Document creation from JavaScript
|
||||
* Version 2.5.1 Built on 2022-01-28T15:37:57.791Z
|
||||
* CommitID 00000000
|
||||
*
|
||||
* Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
|
||||
* 2015-2021 yWorks GmbH, http://www.yworks.com
|
||||
* 2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
|
||||
* 2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
|
||||
* 2010 Aaron Spike, https://github.com/acspike
|
||||
* 2012 Willow Systems Corporation, https://github.com/willowsystems
|
||||
* 2012 Pablo Hess, https://github.com/pablohess
|
||||
* 2012 Florian Jenett, https://github.com/fjenett
|
||||
* 2013 Warren Weckesser, https://github.com/warrenweckesser
|
||||
* 2013 Youssef Beddad, https://github.com/lifof
|
||||
* 2013 Lee Driscoll, https://github.com/lsdriscoll
|
||||
* 2013 Stefan Slonevskiy, https://github.com/stefslon
|
||||
* 2013 Jeremy Morel, https://github.com/jmorel
|
||||
* 2013 Christoph Hartmann, https://github.com/chris-rock
|
||||
* 2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
|
||||
* 2014 James Makes, https://github.com/dollaruw
|
||||
* 2014 Diego Casorran, https://github.com/diegocr
|
||||
* 2014 Steven Spungin, https://github.com/Flamenco
|
||||
* 2014 Kenneth Glassey, https://github.com/Gavvers
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* Contributor(s):
|
||||
* siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
|
||||
* kim3er, mfo, alnorth, Flamenco
|
||||
*/
|
||||
|
||||
/** @license
|
||||
* Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, sublicense, and/or sell copies of the Software, and to
|
||||
* permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
* ====================================================================
|
||||
*/
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2,8 +2,10 @@
|
||||
namespace OCA\Gestion\Controller;
|
||||
|
||||
use Exception;
|
||||
use OCA\Gestion\Service\ConfigurationService;
|
||||
use OCA\Gestion\Service\NavigationService;
|
||||
use OCA\Gestion\Service\Order\OrderService;
|
||||
use Psr\Log\LoggerInterface;
|
||||
defined("TAB1") or define("TAB1", "\t");
|
||||
|
||||
use OCP\IGroupManager;
|
||||
@ -42,6 +44,9 @@ class OrderController extends Controller {
|
||||
|
||||
/** @var \OCA\Gestion\Service\NavigationService */
|
||||
private $navigationService;
|
||||
private $configurationService;
|
||||
|
||||
private $logger;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -57,7 +62,9 @@ class OrderController extends Controller {
|
||||
IUserSession $userSession,
|
||||
IGroupManager $groupManager,
|
||||
OrderService $orderService,
|
||||
NavigationService $navigationService
|
||||
NavigationService $navigationService,
|
||||
ConfigurationService $configurationService,
|
||||
LoggerInterface $logger
|
||||
){
|
||||
|
||||
parent::__construct($AppName, $request);
|
||||
@ -69,7 +76,8 @@ class OrderController extends Controller {
|
||||
$this->config = $config;
|
||||
$this->orderService = $orderService;
|
||||
$this->navigationService = $navigationService;
|
||||
//$this->fpdf = $fpdf;
|
||||
$this->configurationService = $configurationService;
|
||||
$this->logger = $logger;
|
||||
|
||||
if ($userSession->isLoggedIn()) {
|
||||
$this->user = $userSession->getUser();
|
||||
@ -90,6 +98,20 @@ class OrderController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
private function getLogo(){
|
||||
try {
|
||||
if(isset($this->storage)){
|
||||
$file = $this->storage->get('/.gestion/logo.png');
|
||||
}else{
|
||||
return "nothing";
|
||||
}
|
||||
} catch(\OCP\Files\NotFoundException $e) {
|
||||
return "nothing";
|
||||
}
|
||||
|
||||
return base64_encode($file->getContent());
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
@ -131,7 +153,6 @@ class OrderController extends Controller {
|
||||
return true;
|
||||
}
|
||||
catch(Exception $e){
|
||||
var_dump($e->getMessage());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -166,4 +187,48 @@ class OrderController extends Controller {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
* @param string $orderId
|
||||
*/
|
||||
public function orderDetails($orderId) {
|
||||
$this->logger->debug("logId");
|
||||
$this->logger->debug("$orderId");
|
||||
$orderWithDetail = $this->orderService->getOrderByIdWithDetails($orderId);
|
||||
return new TemplateResponse(
|
||||
'gestion',
|
||||
'orderDetails',
|
||||
array(
|
||||
'groups' => $this->groups,
|
||||
'user' => $this->user,
|
||||
"configuration" => json_decode(json_encode($this->configurationService->getDefaultConfiguration())),
|
||||
'order'=>json_decode(json_encode($orderWithDetail)),
|
||||
'path' => $this->idNextcloud,
|
||||
'url' => $this->navigationService->getNavigationLink(),
|
||||
'logo' => $this->getLogo()
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
* @param string $orderId
|
||||
*/
|
||||
public function getOrderProductsById($orderId) {
|
||||
$orderProducts = $this->orderService->getOrderProductsById($orderId);
|
||||
return json_encode($orderProducts);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
* @param string $orderId
|
||||
*/
|
||||
public function getOrderTotalAmount($orderId) {
|
||||
$configuration = $this->configurationService->getDefaultConfiguration();
|
||||
$orderTotalAmount = $this->orderService->getOrderTotalAmount($orderId,$configuration["tva_default"] ?? 0);
|
||||
return json_encode($orderTotalAmount);
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,6 +71,15 @@ class Bdd {
|
||||
return $this->execSQL($sql, array($idNextcloud));
|
||||
}
|
||||
|
||||
public function getConfigurationByIdNextcloud($idNextcloud){
|
||||
$sql = "SELECT * FROM `".$this->tableprefix."configuration` WHERE id_nextcloud = ?";
|
||||
$result = $this->execSQLNoJsonReturn($sql, array($idNextcloud));
|
||||
if(!empty($result)){
|
||||
return $result[0];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getTotalDevis($iddevis, $idNextcloud) {
|
||||
$articles = json_decode($this->getListArticle($iddevis, $idNextcloud));
|
||||
$produits = json_decode($this->getListProduit($iddevis, $idNextcloud));
|
||||
|
||||
@ -81,6 +81,21 @@ class OrderBdd {
|
||||
$this->execSQLNoData($sql,[$orderDate,$orderId]);
|
||||
}
|
||||
|
||||
private function getProductPriceByThanatoId($thanatoId,$productId){
|
||||
$sql = "SELECT *
|
||||
FROM ".$this->orderTablePrefix ."thanato_product_discount as thanato_product_discount
|
||||
WHERE thanato_product_discount.fk_thanato_id = ? AND
|
||||
thanato_product_discount.fk_product_id = ?;
|
||||
";
|
||||
$thanatoProductDiscount = $this->execSQLNoJsonReturn(
|
||||
$sql,
|
||||
[$thanatoId,$productId]);
|
||||
if(!empty($thanatoProductDiscount)){
|
||||
return $thanatoProductDiscount[0]['ht_price'];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getOrderByCalendarUuid($calendarUuid){
|
||||
$sql = "SELECT * FROM ".$this->orderTablePrefix."orders as orders
|
||||
WHERE orders.fk_calendar_uuid = ? LIMIT 1";
|
||||
@ -150,19 +165,30 @@ class OrderBdd {
|
||||
public function getOrderProductsByOrderId($orderId){
|
||||
$sql = "SELECT
|
||||
order_product.id as order_product_id,
|
||||
order_product.quantity as order_product_quantity,
|
||||
produit.id as produit_id,
|
||||
produit.reference as produit_reference,
|
||||
produit.description as produit_description
|
||||
produit.description as produit_description,
|
||||
produit.prix_unitaire as produit_ht_price,
|
||||
orders.fk_thanato_id as order_thanato_id
|
||||
FROM ".$this->orderTablePrefix."order_product as order_product
|
||||
LEFT JOIN ".$this->orderTablePrefix."produit as produit on order_product.fk_product_id = produit.id
|
||||
LEFT JOIN ".$this->orderTablePrefix."orders as orders on order_product.fk_order_id = orders.id
|
||||
WHERE order_product.fk_order_id = ?;";
|
||||
$produitsList = $this->execSQLNoJsonReturn(
|
||||
$sql,
|
||||
[$orderId]);
|
||||
|
||||
$finalProduitList = [];
|
||||
foreach($produitsList as $produit){
|
||||
foreach($produitsList as &$produit){
|
||||
if($produit['produit_id'] != null){
|
||||
$htPrice = $produit['produit_ht_price'];
|
||||
$orderThanatoId = $produit["order_thanato_id"];
|
||||
if($orderThanatoId != null){
|
||||
$productPrice = $this->getProductPriceByThanatoId($orderThanatoId,$produit['id']);
|
||||
$htPrice = $productPrice ?? $htPrice;
|
||||
$produit['produit_ht_price'] = $htPrice * $produit['order_product_quantity'];
|
||||
}
|
||||
$finalProduitList[] = $produit;
|
||||
}
|
||||
}
|
||||
@ -287,4 +313,72 @@ class OrderBdd {
|
||||
return $count;
|
||||
}
|
||||
|
||||
public function getOrderByIdWithDetails($orderId){
|
||||
$sql = "SELECT
|
||||
orders.id,
|
||||
orders.order_date,
|
||||
orders.order_number,
|
||||
orders.order_full_number,
|
||||
orders.order_comment,
|
||||
orders.fk_defunt_id,
|
||||
orders.fk_lieu_id,
|
||||
orders.fk_client_id,
|
||||
orders.fk_thanato_id,
|
||||
orders.fk_order_status_key,
|
||||
thanato.id as thanato_id,
|
||||
thanato.nom as thanato_nom,
|
||||
thanato.prenom as thanato_prenom,
|
||||
client.id as client_id,
|
||||
client.nom as client_nom,
|
||||
client.prenom as client_prenom,
|
||||
client.entreprise as client_entreprise,
|
||||
client.adresse as client_adresse,
|
||||
client.mail as client_mail,
|
||||
client.telephone as client_phone,
|
||||
client.legal_one as client_legal_one,
|
||||
defunt.id as defunt_id,
|
||||
defunt.nom as defunt_nom,
|
||||
lieu.id as lieu_id,
|
||||
lieu.adresse as lieu_adresse,
|
||||
lieu.nom as lieu_nom,
|
||||
order_status.status_label as order_status_label
|
||||
FROM "
|
||||
.$this->orderTablePrefix."orders as orders
|
||||
LEFT JOIN ".$this->orderTablePrefix."thanato as thanato on orders.fk_thanato_id = thanato.id
|
||||
LEFT JOIN ".$this->orderTablePrefix."client as client on orders.fk_client_id = client.id
|
||||
LEFT JOIN ".$this->orderTablePrefix."defunt as defunt on orders.fk_defunt_id = defunt.id
|
||||
LEFT JOIN ".$this->orderTablePrefix."lieu as lieu on orders.fk_lieu_id = lieu.id
|
||||
LEFT JOIN ".$this->orderTablePrefix."order_status as order_status on orders.fk_order_status_key = order_status.status_key
|
||||
WHERE orders.id = ?
|
||||
LIMIT 1;
|
||||
"
|
||||
;
|
||||
|
||||
$result = $this->execSQLNoJsonReturn($sql,[$orderId]);
|
||||
if(!empty($result)){
|
||||
return $result[0];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function getOrderTotalAmount($orderId,$tva){
|
||||
$totalHt = 0;
|
||||
$totalTtc = 0;
|
||||
$totalTvaAmount = 0;
|
||||
$orderProducts = $this->getOrderProductsByOrderId($orderId);
|
||||
foreach($orderProducts as $orderProduct){
|
||||
$totalHt += $orderProduct["produit_ht_price"] * $orderProduct["order_product_quantity"];
|
||||
$totalTvaAmount += $orderProduct["produit_ht_price"] * $tva / 100;
|
||||
$totalTtc += ($totalHt * ($tva + 100)) / 100;
|
||||
}
|
||||
|
||||
return [
|
||||
"totalHt" => $totalHt,
|
||||
"totalTtc" => $totalTtc,
|
||||
"totalTvaAmount" => $totalTvaAmount,
|
||||
"tva" => $tva
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
52
gestion/lib/Service/ConfigurationService.php
Normal file
52
gestion/lib/Service/ConfigurationService.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* Calendar App
|
||||
*
|
||||
* @copyright 2021 Anna Larch <anna.larch@gmx.net>
|
||||
*
|
||||
* @author Anna Larch <anna.larch@gmx.net>
|
||||
* @author Richard Steinmetz <richard@steinmetz.cloud>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OCA\Gestion\Service;
|
||||
|
||||
use OCA\Gestion\Constants\BddConstant;
|
||||
use OCA\Gestion\Db\Bdd;
|
||||
use OCP\IURLGenerator;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class ConfigurationService {
|
||||
|
||||
private $gestionBdd;
|
||||
|
||||
public function __construct(
|
||||
Bdd $gestionBdd
|
||||
) {
|
||||
$this->gestionBdd = $gestionBdd;
|
||||
}
|
||||
|
||||
public function getConfigurationByIdNextcloud($idNextCloud){
|
||||
return $this->gestionBdd->getConfigurationByIdNextcloud($idNextCloud);
|
||||
}
|
||||
|
||||
public function getDefaultConfiguration(){
|
||||
return $this->getConfigurationByIdNextcloud(BddConstant::DEFAULT_ADMIN_APP_ID_NEXTCLOUD);
|
||||
}
|
||||
|
||||
}
|
||||
@ -83,4 +83,16 @@ class OrderService {
|
||||
public function getThanatoProductFeeCount(){
|
||||
return $this->orderBdd->getThanatoProductFeeCount();
|
||||
}
|
||||
|
||||
public function getOrderByIdWithDetails($orderId){
|
||||
return $this->orderBdd->getOrderByIdWithDetails($orderId);
|
||||
}
|
||||
|
||||
public function getOrderProductsById($orderId){
|
||||
return $this->orderBdd->getOrderProductsByOrderId($orderId);
|
||||
}
|
||||
|
||||
public function getOrderTotalAmount($orderId,$tva){
|
||||
return $this->orderBdd->getOrderTotalAmount($orderId,$tva);
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,3 +62,31 @@ table.dataTable.display tbody tr.odd > [class*="sorting_"] {
|
||||
table.dataTable.display tbody tr.even > [class*="sorting_"] {
|
||||
background-color: var(--color-main-background);
|
||||
}
|
||||
|
||||
.loader-container {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 9999;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.loader-center {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border: 5px solid #fff;
|
||||
border-top-color: #3498db;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
@ -266,3 +266,11 @@ export function removeOptions(selectElement) {
|
||||
selectElement.remove(i);
|
||||
}
|
||||
}
|
||||
|
||||
export function showLoader(){
|
||||
$('#loader-center').css('display', 'flex');
|
||||
}
|
||||
|
||||
export function hideLoader(){
|
||||
$('#loader-center').hide();
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
import { showSuccess, showError } from "@nextcloud/dialogs";
|
||||
import { translate as t, translatePlural as n } from '@nextcloud/l10n'
|
||||
import { baseUrl } from "../mainFunction.mjs";
|
||||
import { baseUrl, showLoader , cur} from "../mainFunction.mjs";
|
||||
|
||||
/**
|
||||
* Update order date
|
||||
@ -24,3 +24,52 @@ export function updateOrderDate(orderId,dateValue) {
|
||||
showError(t('gestion', 'Erreur dans la mise à jour de la date du commande'));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get order products
|
||||
*/
|
||||
export function getOrderProductsByOrderId(orderId) {
|
||||
$.ajax({
|
||||
url: baseUrl + '/order/'+orderId+'/products',
|
||||
type: 'PROPFIND',
|
||||
async: false,
|
||||
contentType: 'application/json'
|
||||
}).done(function (response, code) {
|
||||
$('#orderProducts tbody').empty();
|
||||
|
||||
$.each(JSON.parse(response), function (arrayID, myresp) {
|
||||
$('#orderProducts tbody').append(
|
||||
'<tr><td><div data-modifier="getOrderProductsByOrderId" data-id="' + myresp.order_product_id + '" data-table="order_product" class="deleteItem icon-delete"></div><div style="display:inline;">' + myresp.produit_reference + '</div></td>' +
|
||||
'<td>' + myresp.produit_description + '</td>' +
|
||||
'<td><div style="display:inline;" data-modifier="getProduitsById">' + myresp.order_product_quantity + '</div> </td>' +
|
||||
'<td>' + cur.format(myresp.produit_ht_price) + '</td>' +
|
||||
'<td>' + cur.format((myresp.order_product_quantity * myresp.produit_ht_price)) + '</td></tr>');
|
||||
});
|
||||
|
||||
$("#totalOrderProducts tbody").empty();
|
||||
getTotalAmountOfOrder(orderId);
|
||||
}).fail(function (response, code) {
|
||||
showError(response);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {*} orderId
|
||||
*/
|
||||
export function getTotalAmountOfOrder(orderId) {
|
||||
$.ajax({
|
||||
url: baseUrl + '/order/'+orderId+'/totalAmount',
|
||||
type: 'PROPFIND',
|
||||
contentType: 'application/json'
|
||||
}).done((function (totalAmountResult) {
|
||||
var totalAmount = JSON.parse(totalAmountResult);
|
||||
$('#totalOrderProducts tbody').empty();
|
||||
$('#totalOrderProducts tbody').append(
|
||||
'<tr>'+
|
||||
'<td style="text-align:center;">' + cur.format(totalAmount.totalHt)+'</td>'+
|
||||
'<td id="tva" style="text-align:center;">' + totalAmount.tva + ' %</td>'+
|
||||
'<td id="totaltva" style="text-align:center;">' + cur.format(Math.round((totalAmount.totalHt * totalAmount.tva)) / 100) + '</td>'+
|
||||
'<td style="text-align:center;">' + cur.format(Math.round((totalAmount.totalHt * (totalAmount.tva + 100))) / 100) + '</td></tr>');
|
||||
}));
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
import { showError } from "@nextcloud/dialogs";
|
||||
import { baseUrl, checkSelectPurJs, LoadDT, showDone } from "../modules/mainFunction.mjs";
|
||||
import { OrderStatusOrdered,OrderStatusNew,OrderStatusCanceled } from "../constants/orderConstant.js";
|
||||
import { generateUrl } from "@nextcloud/router";
|
||||
export class Order {
|
||||
|
||||
/**
|
||||
@ -22,6 +23,7 @@ export class Order {
|
||||
this.locationId = ((myresp.fk_lieu_id == null || myresp.fk_lieu_id.length === 0) ? '-' : myresp.fk_lieu_id);
|
||||
this.statusKey = ((myresp.fk_order_status_key == null || myresp.fk_order_status_key.length === 0) ? '-' : myresp.fk_order_status_key);
|
||||
this.productReferences = ((myresp.product_references == null || myresp.product_references.length === 0) ? '-' : myresp.product_references);
|
||||
this.orderDetailsUrl = generateUrl(`/apps/gestion/order/${this.id}/details`);
|
||||
}
|
||||
|
||||
static getClientFullname(myresp){
|
||||
@ -89,7 +91,7 @@ export class Order {
|
||||
'<div class="loadSelect_listlieu" data-table="orders" data-column="fk_lieu_id" data-id="' + this.id + '" data-current="' + this.locationId + '">'+ this.locationName + '</div>',
|
||||
'<div>' + this.productReferences + '</div>',
|
||||
'<div style="'+ Order.getComandStatusCssSytle(this.statusKey) +'">' + this.statusLabel + '</div>',
|
||||
'<div data-modifier="orders" data-id=' + this.id + ' data-table="orders" style="display:inline-block;margin-right:0px;" class="deleteItem icon-delete"></div>'
|
||||
'<div style="display:inline-block;margin-right:0px;width:80%;"><a href="' + this.orderDetailsUrl + '"><button>' + t('gestion', 'Open') + '</button></a>'+'<div data-modifier="orders" data-id=' + this.id + ' data-table="orders" style="display:inline-block;margin-right:0px;" class="deleteItem icon-delete"></div>'
|
||||
];
|
||||
|
||||
return orderRow;
|
||||
|
||||
18
gestion/src/js/orderDetails.js
Normal file
18
gestion/src/js/orderDetails.js
Normal file
@ -0,0 +1,18 @@
|
||||
import "@nextcloud/dialogs/dist/index.css";
|
||||
import "datatables.net-dt/css/jquery.dataTables.css";
|
||||
import "../css/mycss.css";
|
||||
|
||||
import { getArticlesById, getMailServerFrom, getProduitsById, savePdfToNextcloud,exportDevisToPdf} from "./modules/ajaxRequest.mjs";
|
||||
import { globalConfiguration } from "./modules/mainFunction.mjs";
|
||||
import "./listener/main_listener";
|
||||
import { Client } from "./objects/client.mjs";
|
||||
import { capture, sendMail, captureDevisFacture } from "./pdf";
|
||||
import { showError } from "@nextcloud/dialogs";
|
||||
import { getOrderProductsByOrderId } from "./modules/order/orderAjaxRequest.mjs";
|
||||
|
||||
window.addEventListener("DOMContentLoaded", function () {
|
||||
globalConfiguration();
|
||||
|
||||
const orderId = $("#orderId").data("id");
|
||||
getOrderProductsByOrderId(orderId);
|
||||
});
|
||||
109
gestion/templates/content/orderDetails.php
Normal file
109
gestion/templates/content/orderDetails.php
Normal file
@ -0,0 +1,109 @@
|
||||
<?php
|
||||
$order = $_['order'];
|
||||
$configuration = $_['configuration'];
|
||||
$orderComment = $order->order_comment == null || $order->order_comment == "" ? "-": $order->order_comment;
|
||||
?>
|
||||
<div class="bootstrap-iso">
|
||||
<h2 class="mt-3 mb-3 text-center"> <?php p($l->t('Commande'));?>
|
||||
<div id="orderId" style="display:inline" data-id="<?php echo $order->id; ?>">sur le defunt <?php echo $order->defunt_nom; ?></div>
|
||||
<span>(</span> <div style="display:inline"><?php echo $order->lieu_nom; ?>)</div>
|
||||
</h2>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-5 h-100 m-0" style="min-height:250px;">
|
||||
<h5 class="p-3 m-0 text-dark text-center border border-2 border-dark"><?php p($l->t('FROM'));?> <?php echo $configuration->entreprise; ?></h5>
|
||||
<p style="min-height:180px;" class="p-3 m-0 h-100 text-center text-dark text-center border border-top-0 border-2 border-dark">
|
||||
<?php echo $configuration->prenom . " " . $configuration->nom; ?><br />
|
||||
<?php echo $configuration->adresse; ?><br />
|
||||
<?php echo $configuration->mail; ?><br />
|
||||
<?php echo $configuration->telephone; ?><br/>
|
||||
<span id="nothing"></span><br />
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-2 h-100 m-0" style="min-height:250px;">
|
||||
<?php
|
||||
if(isset($_['logo']) && $_['logo'] !== "nothing"){
|
||||
echo "<center><a><img alt='".$l->t('Company logo')."' class=\"img-fluid\" src=\"data:image/png;base64, ".$_['logo']."\"/></a></center>";
|
||||
}else{
|
||||
echo "<span style='font-size:12px' id='Company-logo' data-html2canvas-ignore><b><center>".$l->t('You can add your company logo here.')."</center></b><br/><i>".$l->t('To add a logo, drop the logo.png file in ".gestion" folder at the root of your Nextcloud Files app. Remember to set "Show hidden files".')."</i><br/><br/><center>".$l->t('This message will not appear on generated PDF.')."</center></span>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="col-5 h-100 m-0" style="min-height:250px;">
|
||||
<h5 class="p-3 m-0 text-dark text-center border border-2 border-dark"><?php p($l->t('TO'));?> <span><?php echo $order->client_entreprise; ?></span></h5>
|
||||
<p style="min-height:180px;" class="p-3 m-0 h-100 text-center text-dark text-center border border-top-0 border-2 border-dark">
|
||||
<span><?php echo $order->client_prenom . " " . $order->client_nom; ?></span><br/>
|
||||
<span><?php echo $order->client_adresse; ?></span><br/>
|
||||
<span><?php echo $order->client_mail; ?></span><br/>
|
||||
<span><?php echo $order->client_phone; ?></span><br/>
|
||||
<span><?php echo $order->client_legal_one; ?></span><br/>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col col-md">
|
||||
<div class="col col-xl text-center">
|
||||
<span>Date de soin : <b><?php echo (new DateTime($order->order_date))->format('d-m-Y');?></b>,</span> <span>Défunt associé : <b><?php echo $order->defunt_nom;?></b></span><br/>
|
||||
<span>Lieu : <b><?php echo $order->lieu_nom;?> (<?php echo $order->lieu_adresse;?>)</b>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col col-md">
|
||||
<label class="fw-bold">Commentaires :</label>
|
||||
<div class="col col-xl mb-3 text-center editable"
|
||||
style="display:inline"
|
||||
data-table="orders" data-column="order_comment"
|
||||
data-id="<?php echo $order->id;?>">
|
||||
<?php echo $orderComment; ?>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div><h2>Articles</h2></div>
|
||||
<button id="addProductToOrder" type="button" class="mb-2 btn btn-outline-success">Ajouter un article</button>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="table-responsive">
|
||||
<table id="orderProducts" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php p($l->t('Reference'));?></th>
|
||||
<th><?php p($l->t('Designation'));?></th>
|
||||
<th><?php p($l->t('Quantity'));?></th>
|
||||
<th><?php p($l->t('Unit price without VAT'));?></th>
|
||||
<th><?php p($l->t('Total without VAT'));?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<hr>
|
||||
<div>
|
||||
<button id="exportOrderToPdf" type="button" class="mb-2 btn btn-outline-success"><?php p($l->t('Save in Nextcloud'));?></button>
|
||||
</div>
|
||||
<div class="mt-0 table-responsive">
|
||||
<table id="totalOrderProducts" class="table table-striped table-xl">
|
||||
<thead class="bg-dark text-white">
|
||||
<tr>
|
||||
<th class="text-center"><?php p($l->t('Total without VAT'));?></th>
|
||||
<th class="text-center"><?php p($l->t('VAT Rate'));?></th>
|
||||
<th class="text-center"><?php p($l->t('Total VAT'));?></th>
|
||||
<th class="text-center"><?php p($l->t('Total Price'));?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col m-0 pb-0 alert alert-info text-center">
|
||||
<p><span id="mentions_default"><?php p($l->t('Please set in global configuration'));?></span></p>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="col m-0 pb-0 alert alert-info text-center">
|
||||
<p><?php echo $configuration->entreprise; ?><br /><?php echo $configuration->adresse; ?><br /><?php echo $configuration->legal_one; ?><br/><?php echo $configuration->legal_two; ?></p>
|
||||
</div>
|
||||
</div>
|
||||
3
gestion/templates/loader.php
Normal file
3
gestion/templates/loader.php
Normal file
@ -0,0 +1,3 @@
|
||||
<div id="loader-center" class="loader-container">
|
||||
<div class="loader-center"></div>
|
||||
</div>
|
||||
19
gestion/templates/orderDetails.php
Normal file
19
gestion/templates/orderDetails.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
style('gestion', array('style'));
|
||||
script('gestion', array('orderDetails.app', '814.app', '856.app'));
|
||||
?>
|
||||
<div id="app">
|
||||
<div id="app-navigation">
|
||||
<?php print_unescaped($this->inc('navigation/index')); ?>
|
||||
<?php print_unescaped($this->inc('settings/index')); ?>
|
||||
</div>
|
||||
|
||||
<div id="app-content">
|
||||
<div id="app-content-wrapper">
|
||||
<?php print_unescaped($this->inc('content/changelog')); ?>
|
||||
<?php print_unescaped($this->inc('content/orderDetails')); ?>
|
||||
<?php print_unescaped($this->inc('loader')); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -32,7 +32,8 @@ module.exports =
|
||||
thanatoProductFee: './src/js/thanatoProductFee.js',
|
||||
clientGroupDiscount: './src/js/clientGroupDiscount.js',
|
||||
clientGroup: './src/js/clientGroup.js',
|
||||
clientGroupFacturation : './src/js/clientGroupFacturation.js'
|
||||
clientGroupFacturation : './src/js/clientGroupFacturation.js',
|
||||
orderDetails : './src/js/orderDetails.js'
|
||||
},
|
||||
output: {
|
||||
filename: '../js/[name].app.js',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user