fixes #4866 más detalle en faltas #1201

Merged
alexandre merged 14 commits from 4866-detalle-faltas into dev 2023-01-17 07:37:50 +00:00
10 changed files with 5 additions and 148 deletions
Showing only changes of commit 30197e9e15 - Show all commits

View File

@ -9,8 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
-
-
### Changed
-
- Se ha eliminado la sección "Control clientes" dentro de Ticket

View File

@ -0,0 +1,2 @@
DELETE FROM `salix`.`ACL` WHERE model="SaleChecked";
DROP TABLE IF EXISTS `vn`.`saleChecked`;

View File

@ -32,9 +32,6 @@
"Sale": {
"dataSource": "vn"
},
"SaleChecked": {
"dataSource": "vn"
},
"SaleCloned": {
"dataSource": "vn"
},

View File

@ -1,24 +0,0 @@
{
"name": "SaleChecked",
"base": "VnModel",
"options": {
"mysql": {
"table": "saleChecked"
}
},
"properties": {
"isChecked": {
"type": "number"
},
"saleFk": {
"id": true
}
},
"relations": {
"sale": {
"type": "belongsTo",
"model": "Sale",
"foreignKey": "saleFk"
}
}
}

View File

@ -56,11 +56,6 @@
"foreignKey": "ticketFk",
"required": true
},
"isChecked": {
"type": "hasOne",
"model": "SaleChecked",
"foreignKey": "saleFk"
},
"components": {
"type": "hasMany",
"model": "SaleComponent",
@ -80,6 +75,6 @@
"type": "hasOne",
"model": "ItemShelvingSale",
"foreignKey": "saleFk"
}
}
}
}

View File

@ -20,7 +20,6 @@ import './package/index';
import './sale';
import './tracking/index';
import './tracking/edit';
import './sale-checked';
import './services';
import './component';
import './sale-tracking';

View File

@ -23,7 +23,6 @@
{"state": "ticket.card.expedition", "icon": "icon-package"},
{"state": "ticket.card.service", "icon": "icon-services"},
{"state": "ticket.card.package", "icon": "icon-bucket"},
{"state": "ticket.card.saleChecked", "icon": "assignment"},
{"state": "ticket.card.components", "icon": "icon-components"},
{"state": "ticket.card.saleTracking", "icon": "assignment"},
{"state": "ticket.card.dms.index", "icon": "cloud_download"},
@ -159,15 +158,6 @@
},
"acl": ["production", "administrative", "salesPerson"]
},
{
"url" : "/sale-checked",
"state": "ticket.card.saleChecked",
"component": "vn-ticket-sale-checked",
"description": "Sale checked",
"params": {
"ticket": "$ctrl.ticket"
}
},
{
"url" : "/components",
"state": "ticket.card.components",

View File

@ -1,60 +0,0 @@
<vn-crud-model
vn-id="model"
url="sales"
filter="::$ctrl.filter"
link="{ticketFk: $ctrl.$params.id}"
limit="20"
data="sales"
order="concept ASC"
auto-load="true">
</vn-crud-model>
<vn-data-viewer model="model">
<vn-card class="vn-w-lg">
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th field="isChecked" center>Is checked</vn-th>
<vn-th field="itemFk" number>Item</vn-th>
<vn-th field="concept">Description</vn-th>
<vn-th field="quantity" number>Quantity</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="sale in sales">
<vn-td center shrink>
<vn-check
vn-one ng-model="sale.isChecked.isChecked"
disabled="true">
</vn-check>
</vn-td>
<vn-td number>
<span
ng-click="$ctrl.showItemDescriptor($event, sale)"
class="link">
{{::sale.itemFk | zeroFill:6}}
</span>
</vn-td>
<vn-td vn-fetched-tags>
<div>
<vn-one title="{{::sale.item.name}}">{{::sale.item.name}}</vn-one>
<vn-one ng-if="::sale.item.subName">
<h3 title="{{::sale.item.subName}}">{{::sale.item.subName}}</h3>
</vn-one>
</div>
<vn-fetched-tags
max-length="6"
item="::sale.item"
tabindex="-1">
</vn-fetched-tags>
</vn-td>
<vn-td number>{{::sale.quantity}}</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-card>
</vn-data-viewer>
<vn-item-descriptor-popover
vn-id="item-descriptor"
warehouse-fk="$ctrl.ticket.warehouseFk"
ticket-fk="$ctrl.ticket.id">
</vn-item-descriptor-popover>

View File

@ -1,42 +0,0 @@
import ngModule from '../module';
import Section from 'salix/components/section';
class Controller extends Section {
constructor($element, $) {
super($element, $);
this.filter = {
include: [
{
relation: 'item'
}, {
relation: 'isChecked',
scope: {
fields: ['isChecked']
}
}
]
};
}
showItemDescriptor(event, sale) {
this.quicklinks = {
btnThree: {
icon: 'icon-transaction',
state: `item.card.diary({
id: ${sale.itemFk},
warehouseFk: ${this.ticket.warehouseFk},
lineFk: ${sale.id}
})`,
tooltip: 'Item diary'
}
};
this.$.itemDescriptor.show(event.target, sale.itemFk);
}
}
ngModule.vnComponent('vnTicketSaleChecked', {
template: require('./index.html'),
controller: Controller,
bindings: {
ticket: '<'
}
});