Merge branch 'dev' into 5112-entryUpdateComission
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Robert Ferrús 2023-06-20 10:00:34 +00:00
commit e83396de11
10 changed files with 31 additions and 29 deletions

View File

@ -4,4 +4,4 @@ apps:
instances: 1
max_restarts: 3
restart_delay: 15000
node_args: --tls-min-v1.0
node_args: --tls-min-v1.0 --openssl-legacy-provider

View File

@ -200,22 +200,20 @@ module.exports = function(Self) {
const connector = this.dataSource.connector;
let conn;
let res;
const opts = Object.assign({}, options);
try {
if (userId) {
conn = await new Promise((resolve, reject) => {
connector.client.getConnection(function(err, conn) {
if (err)
reject(err);
else
resolve(conn);
if (!options.transaction) {
options = Object.assign({}, options);
conn = await new Promise((resolve, reject) => {
connector.client.getConnection(function(err, conn) {
if (err)
reject(err);
else
resolve(conn);
});
});
});
const opts = Object.assign({}, options);
if (!opts.transaction) {
opts.transaction = {
options.transaction = {
connection: conn,
connector
};
@ -223,15 +221,14 @@ module.exports = function(Self) {
await connector.executeP(
'CALL account.myUser_loginWithName((SELECT name FROM account.user WHERE id = ?))',
[userId], opts
[userId], options
);
}
res = await connector.executeP(query, params, opts);
res = await connector.executeP(query, params, options);
if (userId) {
await connector.executeP('CALL account.myUser_logout()', null, opts);
}
if (userId)
await connector.executeP('CALL account.myUser_logout()', null, options);
} finally {
if (conn) conn.release();
}

View File

@ -50,13 +50,13 @@
<th field="salesPersonFk">
<span translate>Salesperson</span>
</th>
<th field="shippedDate" shrink-date>
<th field="shippedDate" shrink-date filter-enabled="false">
<span translate>Date</span>
</th>
<th field="theoreticalHour">
<th field="theoreticalHour" filter-enabled="false">
<span translate>Theoretical</span>
</th>
<th field="practicalHour">
<th field="practicalHour" filter-enabled="false">
<span translate>Practical</span>
</th>
<th field="preparationHour" filter-enabled="false">

View File

@ -21,7 +21,6 @@ module.exports = Self => {
Self.confirm = async(ctx, orderFk) => {
const userId = ctx.req.accessToken.userId;
const query = `CALL hedera.order_confirmWithUser(?, ?)`;
const response = await Self.rawSql(query, [orderFk, userId], {userId});

View File

@ -5,3 +5,4 @@ columns:
beneficiary: beneficiary
supplierFk: supplier
bankEntityFk: bank entity
accountingFk: ledger account

View File

@ -5,3 +5,4 @@ columns:
beneficiary: beneficiario
supplierFk: proveedor
bankEntityFk: entidad bancaria
accountingFk: cuenta contable

View File

@ -69,7 +69,7 @@
<vn-th ng-click="$ctrl.sortBy('price')" field="price" number>Price</vn-th>
<vn-th ng-click="$ctrl.sortBy('discount')" field="discount" number>Disc</vn-th>
<vn-th ng-click="$ctrl.sortBy('amount')" field="amount" number>Amount</vn-th>
<vn-th ng-click="$ctrl.sortBy('itemPackingTypeFk')" field="itemPackingTypeFk" shrink>Packaging</vn-th>
<vn-th ng-click="$ctrl.sortBy('item.itemPackingTypeFk')" field="itemPackingTypeFk" shrink>Packaging</vn-th>
<vn-th shrink></vn-th>
</vn-tr>
</vn-thead>
@ -202,7 +202,7 @@
</span>
</vn-td>
<vn-td number>
{{$ctrl.getSaleTotal(sale) | currency: 'EUR':2}}
{{sale.amount | currency: 'EUR':2}}
</vn-td>
<vn-td shrink>
{{::sale.item.itemPackingTypeFk | dashIfEmpty}}

View File

@ -34,6 +34,11 @@ class Controller extends Section {
}
get sales() {
if (this._sales) {
for (let sale of this._sales)
sale.amount = this.getSaleTotal(sale);
}
return this._sales;
}
@ -49,6 +54,7 @@ class Controller extends Section {
return ticketState && ticketState.state.code;
}
getConfig() {
let filter = {
fields: ['daysForWarningClaim'],

View File

@ -1,5 +1,5 @@
module.exports = Self => {
Self.remoteMethodCtx, ('getLeaves', {
Self.remoteMethodCtx('getLeaves', {
description: 'Returns the nodes for a department',
accepts: [{
arg: 'parentId',

View File

@ -242,7 +242,7 @@
</tfoot>
</table>
</div>
<div class="columns vn-mt-xl" v-if="invoice.payMethodCode == 'wireTransfer' && invoice.iban">
<div class="columns vn-mt-lg" v-if="(invoice.payMethodCode == 'wireTransfer' && invoice.iban) || ticketObservations">
<div class="size50 pull-left no-page-break">
<div class="panel">
<div class="header">{{$t('observations')}}</div>
@ -267,9 +267,7 @@
v-bind:left-text="$t('invoiceRef', [invoice.ref])"
v-bind:center-text="client.socialName"
v-bind:recipient-id="client.id"
v-bind="$props"
>
v-bind="$props">
</report-footer>
</template>
</report-body>