fixes #4926 item.basic-data añadir campo #1227

Merged
alexandre merged 6 commits from 4926-add-itemPackingOut into dev 2023-01-10 08:00:59 +00:00
5 changed files with 34 additions and 16 deletions

View File

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added ### Added
- [General](Inicio) Permite recuperar la contraseña - [General](Inicio) Permite recuperar la contraseña
- [Artículo](Datos Básicos) Añadido campo Unidades/Caja
### Changed ### Changed

View File

@ -463,6 +463,7 @@ export default {
generic: 'vn-autocomplete[ng-model="$ctrl.item.genericFk"]', generic: 'vn-autocomplete[ng-model="$ctrl.item.genericFk"]',
isFragile: 'vn-check[ng-model="$ctrl.item.isFragile"]', isFragile: 'vn-check[ng-model="$ctrl.item.isFragile"]',
longName: 'vn-textfield[ng-model="$ctrl.item.longName"]', longName: 'vn-textfield[ng-model="$ctrl.item.longName"]',
packingOut: 'vn-input-number[ng-model="$ctrl.item.packingOut"]',
isActiveCheckbox: 'vn-check[label="Active"]', isActiveCheckbox: 'vn-check[label="Active"]',
priceInKgCheckbox: 'vn-check[label="Price in kg"]', priceInKgCheckbox: 'vn-check[label="Price in kg"]',
newIntrastatButton: 'vn-item-basic-data vn-icon-button[vn-tooltip="New intrastat"] > button', newIntrastatButton: 'vn-item-basic-data vn-icon-button[vn-tooltip="New intrastat"] > button',

View File

@ -35,6 +35,7 @@ describe('Item Edit basic data path', () => {
await page.waitToClick(selectors.itemBasicData.isActiveCheckbox); await page.waitToClick(selectors.itemBasicData.isActiveCheckbox);
await page.waitToClick(selectors.itemBasicData.priceInKgCheckbox); await page.waitToClick(selectors.itemBasicData.priceInKgCheckbox);
await page.waitToClick(selectors.itemBasicData.isFragile); await page.waitToClick(selectors.itemBasicData.isFragile);
await page.write(selectors.itemBasicData.packingOut, '5');
await page.waitToClick(selectors.itemBasicData.submitBasicDataButton); await page.waitToClick(selectors.itemBasicData.submitBasicDataButton);
const message = await page.waitForSnackbar(); const message = await page.waitForSnackbar();
@ -128,4 +129,11 @@ describe('Item Edit basic data path', () => {
expect(result).toBe('checked'); expect(result).toBe('checked');
}); });
it(`should confirm the item packingOut was edited`, async() => {
const result = await page
.waitToGetProperty(selectors.itemBasicData.packingOut, 'value');
expect(result).toEqual('5');
});
}); });

View File

@ -1,6 +1,6 @@
<mg-ajax <mg-ajax
path="Items/{{patch.params.id}}" path="Items/{{patch.params.id}}"
options="vnPatch" options="vnPatch"
override="{filter: {include: [{relation: 'itemType'}, {relation: 'origin'}, {relation: 'ink'}, {relation: 'producer'}, {relation: 'expense'}]}}"> override="{filter: {include: [{relation: 'itemType'}, {relation: 'origin'}, {relation: 'ink'}, {relation: 'producer'}, {relation: 'expense'}]}}">
</mg-ajax> </mg-ajax>
<vn-watcher <vn-watcher
@ -26,8 +26,8 @@
rule rule
vn-focus> vn-focus>
</vn-textfield> </vn-textfield>
<vn-textfield <vn-textfield
vn-one label="Full name" vn-one label="Full name"
ng-model="$ctrl.item.longName" ng-model="$ctrl.item.longName"
rule rule
info="Full name calculates based on tags 1-3. Is not recommended to change it manually"> info="Full name calculates based on tags 1-3. Is not recommended to change it manually">
@ -95,7 +95,7 @@
<vn-input-number <vn-input-number
vn-one vn-one
min="0" min="0"
label="Relevancy" label="Relevancy"
ng-model="$ctrl.item.relevancy" ng-model="$ctrl.item.relevancy"
rule> rule>
</vn-input-number> </vn-input-number>
@ -108,15 +108,15 @@
</vn-input-number> </vn-input-number>
<vn-input-number <vn-input-number
vn-one vn-one
min="0" min="0"
label="stems" label="stems"
ng-model="$ctrl.item.stems" ng-model="$ctrl.item.stems"
rule> rule>
</vn-input-number> </vn-input-number>
<vn-input-number <vn-input-number
vn-one vn-one
min="0" min="0"
label="Multiplier" label="Multiplier"
ng-model="$ctrl.item.stemMultiplier"> ng-model="$ctrl.item.stemMultiplier">
</vn-input-number> </vn-input-number>
</vn-horizontal> </vn-horizontal>
@ -124,10 +124,17 @@
<vn-input-number <vn-input-number
vn-one vn-one
min="0" min="0"
label="Weight/Piece" label="Weight/Piece"
ng-model="$ctrl.item.weightByPiece" ng-model="$ctrl.item.weightByPiece"
rule> rule>
</vn-input-number> </vn-input-number>
<vn-input-number
vn-one
min="0"
label="Units/Box"
ng-model="$ctrl.item.packingOut"
rule>
</vn-input-number>
<vn-autocomplete <vn-autocomplete
vn-one vn-one
label="Generic" label="Generic"
@ -192,7 +199,7 @@
</form> </form>
<!-- Create custom agent dialog --> <!-- Create custom agent dialog -->
<vn-dialog class="edit" <vn-dialog class="edit"
vn-id="intrastat" vn-id="intrastat"
on-accept="$ctrl.onIntrastatAccept()" on-accept="$ctrl.onIntrastatAccept()"
message="New intrastat"> message="New intrastat">
@ -225,12 +232,12 @@
<tpl-body class="itemFilter"> <tpl-body class="itemFilter">
<vn-horizontal> <vn-horizontal>
<vn-textfield <vn-textfield
label="Name" label="Name"
ng-model="$ctrl.itemFilterParams.name" ng-model="$ctrl.itemFilterParams.name"
vn-focus> vn-focus>
</vn-textfield> </vn-textfield>
<vn-textfield <vn-textfield
label="Size" label="Size"
ng-model="$ctrl.itemFilterParams.size"> ng-model="$ctrl.itemFilterParams.size">
</vn-textfield> </vn-textfield>
<vn-autocomplete <vn-autocomplete
@ -262,7 +269,7 @@
</vn-button> </vn-button>
</vn-horizontal> </vn-horizontal>
<vn-crud-model <vn-crud-model
vn-id="itemsModel" vn-id="itemsModel"
url="Items/withName" url="Items/withName"
filter="$ctrl.itemFilter" filter="$ctrl.itemFilter"
data="items" data="items"
@ -305,4 +312,4 @@
warehouse-fk="$ctrl.vnConfig.warehouseFk"> warehouse-fk="$ctrl.vnConfig.warehouseFk">
</vn-item-descriptor-popover> </vn-item-descriptor-popover>
</tpl-body> </tpl-body>
</vn-dialog> </vn-dialog>

View File

@ -44,6 +44,7 @@ Weight/Piece: Peso/tallo
Search items by id, name or barcode: Buscar articulos por identificador, nombre o codigo de barras Search items by id, name or barcode: Buscar articulos por identificador, nombre o codigo de barras
SalesPerson: Comercial SalesPerson: Comercial
Concept: Concepto Concept: Concepto
Units/Box: Unidades/Caja
# Sections # Sections
Items: Artículos Items: Artículos
@ -61,4 +62,4 @@ Item diary: Registro de compra-venta
Last entries: Últimas entradas Last entries: Últimas entradas
Tags: Etiquetas Tags: Etiquetas
Waste breakdown: Desglose de mermas Waste breakdown: Desglose de mermas
Waste breakdown by item: Desglose de mermas por artículo Waste breakdown by item: Desglose de mermas por artículo