Merge branch '2402-entry_create' of https://gitea.verdnatura.es/verdnatura/salix into 2402-entry_create

This commit is contained in:
Carlos Jimenez Ruiz 2020-09-03 16:59:41 +02:00
commit 0116adeddb
3 changed files with 10 additions and 9 deletions

View File

@ -33,8 +33,8 @@
ng-model="$ctrl.entry.travelFk" ng-model="$ctrl.entry.travelFk"
url="Travels/filter" url="Travels/filter"
search-function="$ctrl.searchFunction($search)" search-function="$ctrl.searchFunction($search)"
value-field="t.id" value-field="id"
order="t.id" order="id"
label="Travel" label="Travel"
required="true"> required="true">
<tpl-item> <tpl-item>

View File

@ -26,11 +26,11 @@ export default class Controller extends Section {
searchFunction($search) { searchFunction($search) {
return {or: [ return {or: [
{'am.name': {like: `%${$search}%`}}, {'agencyModeName': {like: `%${$search}%`}},
{'win.name': {like: `%${$search}%`}}, {'warehouseInName': {like: `%${$search}%`}},
{'wout.name': {like: `%${$search}%`}}, {'warehouseOutName': {like: `%${$search}%`}},
{'t.shipped': new Date($search)}, {'shipped': new Date($search)},
{'t.landed': new Date($search)} {'landed': new Date($search)}
]}; ]};
} }
} }

View File

@ -112,7 +112,8 @@ module.exports = Self => {
let stmts = []; let stmts = [];
let stmt; let stmt;
stmt = new ParameterizedSQL( stmt = new ParameterizedSQL(
`SELECT `SELECT * FROM
(SELECT
t.id, t.id,
t.shipped, t.shipped,
t.landed, t.landed,
@ -132,7 +133,7 @@ module.exports = Self => {
FROM vn.travel t FROM vn.travel t
JOIN vn.agencyMode am ON am.id = t.agencyFk JOIN vn.agencyMode am ON am.id = t.agencyFk
JOIN vn.warehouse win ON win.id = t.warehouseInFk JOIN vn.warehouse win ON win.id = t.warehouseInFk
JOIN vn.warehouse wout ON wout.id = t.warehouseOutFk` JOIN vn.warehouse wout ON wout.id = t.warehouseOutFk) AS t`
); );
stmt.merge(conn.makeSuffix(filter)); stmt.merge(conn.makeSuffix(filter));