This commit is contained in:
parent
7f9d8da7a7
commit
24ea18aeb0
|
@ -60,6 +60,7 @@ module.exports = Self => {
|
||||||
DISTINCT c.id clientFk,
|
DISTINCT c.id clientFk,
|
||||||
c.name clientName,
|
c.name clientName,
|
||||||
c.salesPersonFk,
|
c.salesPersonFk,
|
||||||
|
c.businessTypeFk businessType,
|
||||||
u.name salesPersonName,
|
u.name salesPersonName,
|
||||||
d.amount,
|
d.amount,
|
||||||
co.created,
|
co.created,
|
||||||
|
|
|
@ -39,6 +39,11 @@
|
||||||
"type": "belongsTo",
|
"type": "belongsTo",
|
||||||
"model": "PayMethod",
|
"model": "PayMethod",
|
||||||
"foreignKey": "payMethod"
|
"foreignKey": "payMethod"
|
||||||
|
},
|
||||||
|
"businessType": {
|
||||||
|
"type":"belongsTo",
|
||||||
|
"model": "businessType",
|
||||||
|
"foreignKey": "businessTypeFk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -54,7 +54,7 @@
|
||||||
<th field="clientFk">
|
<th field="clientFk">
|
||||||
<span translate>Client</span>
|
<span translate>Client</span>
|
||||||
</th>
|
</th>
|
||||||
<th field="businessTypeFk">
|
<th field="businessType">
|
||||||
<span translate>Es trabajador</span>
|
<span translate>Es trabajador</span>
|
||||||
</th>
|
</th>
|
||||||
<th field="salesPersonFk">
|
<th field="salesPersonFk">
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
<td>
|
<td>
|
||||||
<vn-check
|
<vn-check
|
||||||
label="isWorker"
|
label="isWorker"
|
||||||
ng-model="$ctrl.summary.isWorker"
|
ng-model="$ctrl.isWorker"
|
||||||
disabled="true">
|
disabled="true">
|
||||||
</vn-check>
|
</vn-check>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -62,6 +62,14 @@ export default class Controller extends Section {
|
||||||
{
|
{
|
||||||
field: 'defaulterSinced',
|
field: 'defaulterSinced',
|
||||||
datepicker: true
|
datepicker: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'businessType',
|
||||||
|
autocomplete: {
|
||||||
|
url: 'Clients',
|
||||||
|
showField: 'businessTypeFk',
|
||||||
|
valueField: 'id'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
@ -152,6 +160,7 @@ export default class Controller extends Section {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case 'creditInsurance':
|
case 'creditInsurance':
|
||||||
case 'amount':
|
case 'amount':
|
||||||
|
case 'businessTypeFk':
|
||||||
case 'clientFk':
|
case 'clientFk':
|
||||||
case 'workerFk':
|
case 'workerFk':
|
||||||
case 'country':
|
case 'country':
|
||||||
|
@ -179,7 +188,7 @@ export default class Controller extends Section {
|
||||||
}
|
}
|
||||||
|
|
||||||
isWorker() {
|
isWorker() {
|
||||||
if (businessFk === 'worker')
|
if (businessType === 'worker')
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue