Merge branch 'dev' into 5712-workerDms_integrateDocuware
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2023-05-31 09:40:32 +00:00
commit 9ebac5a3f8
17 changed files with 48 additions and 29 deletions

View File

@ -625,6 +625,7 @@ export default {
selectAllSalesCheckbox: 'vn-ticket-sale vn-thead vn-check',
secondSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(2) vn-check[ng-model="sale.checked"]',
thirdSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(3) vn-check[ng-model="sale.checked"]',
fourthSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(4) vn-check[ng-model="sale.checked"]',
deleteSaleButton: 'vn-ticket-sale vn-tool-bar > vn-button[icon="delete"]',
transferSaleButton: 'vn-ticket-sale vn-tool-bar > vn-button[icon="call_split"]',
moveToTicketInput: 'form vn-input-number[ng-model="$ctrl.transfer.ticketId"] input',

View File

@ -251,7 +251,6 @@ describe('Ticket Edit sale path', () => {
await page.waitToClick(selectors.ticketSales.moreMenu);
await page.waitToClick(selectors.ticketSales.moreMenuCreateClaim);
await page.waitToClick(selectors.globalItems.acceptButton);
await page.waitToClick(selectors.globalItems.acceptButton);
await page.waitForState('claim.card.basicData');
});

View File

@ -172,5 +172,6 @@
"Comment added to client": "Comment added to client",
"This ticket is already a refund": "This ticket is already a refund",
"A claim with that sale already exists": "A claim with that sale already exists",
"ASSIGN_ZONE_FIRST": "Assign zone first"
"Can't transfer claimed sales": "Can't transfer claimed sales",
"Invalid quantity": "Invalid quantity"
}

View File

@ -34,7 +34,7 @@
<vn-autocomplete vn-one required="true"
label="Warehouse"
ng-model="$ctrl.dms.warehouseId"
data="Warehouses"
data="warehouses"
show-field="name"
value-field="id">
</vn-autocomplete>

View File

@ -157,14 +157,14 @@
<vn-autocomplete
label="Warehouse Out"
ng-model="$ctrl.travelFilterParams.warehouseOutFk"
data="Warehouses"
data="warehouses"
show-field="name"
value-field="id">
</vn-autocomplete>
<vn-autocomplete
label="Warehouse In"
ng-model="$ctrl.travelFilterParams.warehouseInFk"
data="Warehouses"
data="warehouses"
show-field="name"
value-field="id">
</vn-autocomplete>

View File

@ -115,7 +115,7 @@
ng-model="$ctrl.warehouseFk"
data="warehouses"
show-field="name"
value="id">>
value="id">
</vn-autocomplete>
</tpl-body>
<tpl-buttons>

View File

@ -88,7 +88,7 @@
vn-one
label="Warehouse"
ng-model="filter.warehouseFk"
data="Warehouses">
data="warehouses">
</vn-autocomplete>
<vn-autocomplete
vn-one

View File

@ -84,7 +84,7 @@
vn-one
label="Warehouse"
ng-model="filter.warehouseFk"
data="Warehouses"
data="warehouses"
show-field="name"
value-field="id">
</vn-autocomplete>

View File

@ -101,6 +101,9 @@ module.exports = Self => {
}
}
const query = `CALL vn.ticket_recalc(?)`;
await Self.rawSql(query, [refundTicket.id], myOptions);
if (tx) await tx.commit();
return refundTicket;

View File

@ -30,7 +30,7 @@
</vn-autocomplete>
<vn-autocomplete vn-one
required="true"
data="Warehouses"
data="warehouses"
label="Warehouse"
show-field="name"
value-field="id"

View File

@ -34,7 +34,7 @@
<vn-autocomplete vn-one required="true"
label="Warehouse"
ng-model="$ctrl.dms.warehouseId"
data="Warehouses"
data="warehouses"
show-field="name"
value-field="id">
</vn-autocomplete>

View File

@ -61,20 +61,20 @@
</vn-th>
<vn-th shrink></vn-th>
<vn-th shrink></vn-th>
<vn-th shrink>Visible</vn-th>
<vn-th shrink>Available</vn-th>
<vn-th>Id</vn-th>
<vn-th shrink>Quantity</vn-th>
<vn-th expand>Item</vn-th>
<vn-th number>Price</vn-th>
<vn-th number>Disc</vn-th>
<vn-th number>Amount</vn-th>
<vn-th shrink>Packaging</vn-th>
<vn-th ng-click="$ctrl.sortBy('visible')" field="visible" shrink>Visible</vn-th>
<vn-th ng-click="$ctrl.sortBy('available')" field="available" shrink>Available</vn-th>
<vn-th ng-click="$ctrl.sortBy('itemFk')" field="itemFk">Id</vn-th>
<vn-th ng-click="$ctrl.sortBy('quantity')" field="quantity" shrink>Quantity</vn-th>
<vn-th ng-click="$ctrl.sortBy('concept')" field="concept" expand>Item</vn-th>
<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 shrink></vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="sale in $ctrl.sales">
<vn-tr ng-repeat="sale in $ctrl.sales | orderBy: $ctrl.propertyName:$ctrl.reverse">
<vn-td shrink>
<vn-check tabindex="-1"
ng-model="sale.checked">
@ -491,7 +491,7 @@
<vn-confirm
vn-id="claimSure"
message="Do you want to create a claim?"
on-accept="$ctrl.createClaim()">
on-accept="$ctrl.onCreateClaimAccepted()">
</vn-confirm>
<vn-menu vn-id="moreOptions">
@ -513,7 +513,7 @@
</vn-item>
<vn-item translate
name="claim"
ng-click="claimSure.show()"
ng-click="$ctrl.createClaim()"
ng-if="$ctrl.isClaimable">
Add claim
</vn-item>

View File

@ -10,6 +10,11 @@ class Controller extends Section {
this.getConfig();
}
sortBy(propertyName) {
this.reverse = (this.propertyName === propertyName) ? !this.reverse : false;
this.propertyName = propertyName;
}
get manaCode() {
return this._manaCode;
}
@ -203,7 +208,7 @@ class Controller extends Section {
if (pastDays >= this.ticketConfig[0].daysForWarningClaim)
this.$.claimConfirm.show();
else
this.onCreateClaimAccepted();
this.$.claimSure.show();
}
onCreateClaimAccepted() {

View File

@ -758,5 +758,15 @@ describe('Ticket', () => {
expect(controller.$.editDiscount.hide).toHaveBeenCalledWith();
});
});
describe('sortBy()', () => {
it('should set reverse and propertyName properties', () => {
const propertyName = 'id';
controller.sortBy(propertyName);
expect(controller.propertyName).toEqual(propertyName);
expect(controller.reverse).toEqual(false);
});
});
});
});

View File

@ -107,7 +107,7 @@
vn-one
label="Warehouse"
ng-model="filter.warehouseFk"
data="Warehouses">
data="warehouses">
</vn-autocomplete>
<vn-autocomplete
vn-one

View File

@ -57,14 +57,14 @@
<vn-autocomplete vn-one
label="Warehouse Out"
ng-model="filter.warehouseOutFk"
data="Warehouses"
data="warehouses"
show-field="name"
value-field="id">
</vn-autocomplete>
<vn-autocomplete vn-one
label="Warehouse In"
ng-model="filter.warehouseInFk"
data="Warehouses"
data="warehouses"
show-field="name"
value-field="id">
</vn-autocomplete>

View File

@ -34,7 +34,7 @@
<vn-autocomplete vn-one required="true"
label="Warehouse"
ng-model="$ctrl.dms.warehouseId"
data="Warehouses"
data="warehouses"
show-field="name"
value-field="id">
</vn-autocomplete>