Merge pull request '3948-invoceIn.index' (#956) from 3948-invoceIn.index into dev
gitea/salix/pipeline/head Build queued... Details

Reviewed-on: #956
Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
Joan Sanchez 2022-05-10 08:25:47 +00:00
commit 866834d1d7
6 changed files with 26 additions and 8 deletions

View File

@ -33,7 +33,7 @@
label="Social name" label="Social name"
ng-model="$ctrl.client.socialName" ng-model="$ctrl.client.socialName"
rule rule
info="You can use letters and spaces" info="Only letters, numbers and spaces can be used"
required="true"> required="true">
</vn-textfield> </vn-textfield>
<vn-textfield <vn-textfield

View File

@ -3,7 +3,7 @@ You changed the equalization tax: Has cambiado el recargo de equivalencia
Do you want to spread the change?: ¿Deseas propagar el cambio a sus consignatarios? Do you want to spread the change?: ¿Deseas propagar el cambio a sus consignatarios?
Frozen: Congelado Frozen: Congelado
In order to invoice, this field is not consulted, but the consignee's ET. When modifying this field if the invoice by address option is not checked, the change will be automatically propagated to all addresses, otherwise the user will be asked if he wants to propagate it or not.: Para facturar no se consulta este campo, sino el RE de consignatario. Al modificar este campo si no esta marcada la casilla Facturar por consignatario, se propagará automáticamente el cambio a todos los consignatarios, en caso contrario preguntará al usuario si quiere o no propagar. In order to invoice, this field is not consulted, but the consignee's ET. When modifying this field if the invoice by address option is not checked, the change will be automatically propagated to all addresses, otherwise the user will be asked if he wants to propagate it or not.: Para facturar no se consulta este campo, sino el RE de consignatario. Al modificar este campo si no esta marcada la casilla Facturar por consignatario, se propagará automáticamente el cambio a todos los consignatarios, en caso contrario preguntará al usuario si quiere o no propagar.
You can use letters and spaces: Se pueden utilizar letras y espacios Only letters, numbers and spaces can be used: Sólo se pueden usar letras, numeros y espacios
Found a client with this data: Se ha encontrado un cliente con estos datos Found a client with this data: Se ha encontrado un cliente con estos datos
Found a client with this phone or email: El cliente con id <a href="#!/client/{{clientId}}/summary" target="_blank">{{clientId}}</a> ya tiene este teléfono o email. <br/> ¿Quieres continuar? Found a client with this phone or email: El cliente con id <a href="#!/client/{{clientId}}/summary" target="_blank">{{clientId}}</a> ya tiene este teléfono o email. <br/> ¿Quieres continuar?
Sage tax type: Tipo de impuesto Sage Sage tax type: Tipo de impuesto Sage

View File

@ -144,6 +144,7 @@ module.exports = Self => {
ii.isBooked, ii.isBooked,
ii.supplierRef, ii.supplierRef,
ii.docFk AS dmsFk, ii.docFk AS dmsFk,
dm.file,
ii.supplierFk, ii.supplierFk,
ii.expenceFkDeductible deductibleExpenseFk, ii.expenceFkDeductible deductibleExpenseFk,
s.name AS supplierName, s.name AS supplierName,
@ -156,7 +157,8 @@ module.exports = Self => {
LEFT JOIN duaInvoiceIn dii ON dii.invoiceInFk = ii.id LEFT JOIN duaInvoiceIn dii ON dii.invoiceInFk = ii.id
LEFT JOIN dua d ON d.id = dii.duaFk LEFT JOIN dua d ON d.id = dii.duaFk
LEFT JOIN awb ON awb.id = d.awbFk LEFT JOIN awb ON awb.id = d.awbFk
LEFT JOIN company co ON co.id = ii.companyFk` LEFT JOIN company co ON co.id = ii.companyFk
LEFT JOIN dms dm ON dm.id = ii.docFk`
); );
const sqlWhere = conn.makeWhere(filter.where); const sqlWhere = conn.makeWhere(filter.where);

View File

@ -13,7 +13,7 @@
<vn-th field="supplierRef">Supplier ref.</vn-th> <vn-th field="supplierRef">Supplier ref.</vn-th>
<vn-th field="serialNumber">Serial number</vn-th> <vn-th field="serialNumber">Serial number</vn-th>
<vn-th field="serial">Serial</vn-th> <vn-th field="serial">Serial</vn-th>
<vn-th field="account">Account</vn-th> <vn-th field="dmsFk">File</vn-th>
<vn-th field="issued" expand>Issued</vn-th> <vn-th field="issued" expand>Issued</vn-th>
<vn-th field="isBooked" center>Is booked</vn-th> <vn-th field="isBooked" center>Is booked</vn-th>
<vn-th field="awbCode" vn-tooltip="Air Waybill">AWB</vn-th> <vn-th field="awbCode" vn-tooltip="Air Waybill">AWB</vn-th>
@ -27,7 +27,7 @@
class="clickable vn-tr search-result" class="clickable vn-tr search-result"
ui-sref="invoiceIn.card.summary({id: {{::invoiceIn.id}}})"> ui-sref="invoiceIn.card.summary({id: {{::invoiceIn.id}}})">
<vn-td>{{::invoiceIn.id}}</vn-td> <vn-td>{{::invoiceIn.id}}</vn-td>
<vn-td> <vn-td expand>
<span <span
class="link" class="link"
vn-click-stop="supplierDescriptor.show($event, invoiceIn.supplierFk)"> vn-click-stop="supplierDescriptor.show($event, invoiceIn.supplierFk)">
@ -36,8 +36,13 @@
</vn-td> </vn-td>
<vn-td>{{::invoiceIn.supplierRef | dashIfEmpty}}</vn-td> <vn-td>{{::invoiceIn.supplierRef | dashIfEmpty}}</vn-td>
<vn-td>{{::invoiceIn.serialNumber}}</vn-td> <vn-td>{{::invoiceIn.serialNumber}}</vn-td>
<vn-td>{{::invoiceIn.serial}}</vn-td> <vn-td>{{::invoiceIn.serial}}</vn-td>
<vn-td>{{::invoiceIn.account}}</vn-td> <vn-td>
<span title="{{'Download file' | translate}}" class="link"
ng-click="$ctrl.downloadFile(invoiceIn.dmsFk)">
{{::invoiceIn.file}}
</span>
</vn-td>
<vn-td expand>{{::invoiceIn.issued | date:'dd/MM/yyyy' | dashIfEmpty}}</vn-td> <vn-td expand>{{::invoiceIn.issued | date:'dd/MM/yyyy' | dashIfEmpty}}</vn-td>
<vn-td center> <vn-td center>
<vn-check disabled="true" <vn-check disabled="true"

View File

@ -2,6 +2,11 @@ import ngModule from '../module';
import Section from 'salix/components/section'; import Section from 'salix/components/section';
export default class Controller extends Section { export default class Controller extends Section {
constructor($element, $, vnFile) {
super($element, $, vnFile);
this.vnFile = vnFile;
}
exprBuilder(param, value) { exprBuilder(param, value) {
switch (param) { switch (param) {
case 'issued': case 'issued':
@ -39,8 +44,14 @@ export default class Controller extends Section {
this.selectedInvoiceIn = invoiceIn; this.selectedInvoiceIn = invoiceIn;
this.$.summary.show(); this.$.summary.show();
} }
downloadFile(dmsId) {
this.vnFile.download(`api/dms/${dmsId}/downloadFile`);
}
} }
Controller.$inject = ['$element', '$scope', 'vnFile'];
ngModule.vnComponent('vnInvoiceInIndex', { ngModule.vnComponent('vnInvoiceInIndex', {
template: require('./index.html'), template: require('./index.html'),
controller: Controller controller: Controller

View File

@ -38,7 +38,7 @@
vn-focus vn-focus
label="Social name" label="Social name"
ng-model="$ctrl.supplier.name" ng-model="$ctrl.supplier.name"
info="You can use letters and spaces" info="Only letters, numbers and spaces can be used"
required="true" required="true"
rule> rule>
</vn-textfield> </vn-textfield>