Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/327_pagamento_multi_bene…
Browse files Browse the repository at this point in the history
…ficiario_tari_tefa' into 3.5.x
  • Loading branch information
nardil committed Oct 13, 2021
2 parents da92a94 + a005c33 commit de59c77
Show file tree
Hide file tree
Showing 15 changed files with 308 additions and 323 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ export class AppComponent implements OnInit, AfterContentChecked, IModalDialog,
case 'Anagrafica PagoPA':
UtilService.USER_ACL.hasPagoPA = (acl.autorizzazioni.indexOf(UtilService._CODE.SCRITTURA) !== -1);
this._sideNavSetup.secMenu.push({ link: UtilService.URL_REGISTRO_INTERMEDIARI, name: UtilService.TXT_REGISTRO_INTERMEDIARI, xhttp: false, icon: false, sort: 0 });
//this._sideNavSetup.secMenu.push({ link: UtilService.URL_RPPS, name: UtilService.TXT_RPPS, xhttp: false, icon: false, sort: # });
break;
case 'Anagrafica Ruoli':
UtilService.USER_ACL.hasRuoli = (acl.autorizzazioni.indexOf(UtilService._CODE.SCRITTURA) !== -1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ const _routes: Routes = [
{ path: UtilService.ROUTE(UtilService.URL_RENDICONTAZIONI)+UtilService.URL_DETTAGLIO, component: DetailViewComponent, canActivate: [ AuthGuardService ], data: { type: UtilService.RENDICONTAZIONI, title: '', search: false, back: true, actions: true, info: null, reuse: false } },
{ path: UtilService.ROUTE(UtilService.URL_INCASSI), component: ListViewComponent, canActivate: [ AuthGuardService ], data: { type: UtilService.INCASSI, title: UtilService.TXT_INCASSI, search: true, back: false, actions: true, info: null, reuse: false } },
{ path: UtilService.ROUTE(UtilService.URL_INCASSI)+UtilService.URL_DETTAGLIO, component: DetailViewComponent, canActivate: [ AuthGuardService ], data: { type: UtilService.INCASSI, title: '', search: false, back: true, actions: true, info: null, reuse: false } },
{ path: UtilService.ROUTE(UtilService.URL_RPPS), component: ListViewComponent, canActivate: [ AuthGuardService ], data: { type: UtilService.RPPS, title: UtilService.TXT_RPPS, search: true, back: false, actions: false, info: null, reuse: false } },
{ path: UtilService.ROUTE(UtilService.URL_RPPS)+UtilService.URL_DETTAGLIO, component: DetailViewComponent, canActivate: [ AuthGuardService ], data: { type: UtilService.RPPS, title: '', search: false, back: true, actions: false, info: null, reuse: false } },
{ path: UtilService.ROUTE(UtilService.URL_RUOLI), component: ListViewComponent, canActivate: [ AuthGuardService ], data: { type: UtilService.RUOLI, title: UtilService.TXT_RUOLI, search: true, back: false, actions: false, info: null, reuse: false } },
{ path: UtilService.ROUTE(UtilService.URL_RUOLI)+UtilService.URL_DETTAGLIO, component: DetailViewComponent, canActivate: [ AuthGuardService ], data: { type: UtilService.RUOLI, title: '', search: false, back: true, actions: false, info: null, reuse: false } },
//Restricted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ import { RiscossioniViewComponent } from '../elements/detail-view/views/riscossi
import { RendicontazioniViewComponent } from '../elements/detail-view/views/rendicontazioni-view/rendicontazioni-view.component';
import { IncassiViewComponent } from '../elements/detail-view/views/incassi-view/incassi-view.component';
import { IncassoViewComponent } from '../elements/detail-view/views/dialog-view/dialog-views/incasso-view/incasso-view.component';
import { RppsViewComponent } from '../elements/detail-view/views/rpps-view/rpps-view.component';
import { StandardCollapseViewComponent } from '../elements/item-view/views/standard-collapse-view/standard-collapse-view.component';
import { RuoloViewComponent } from '../elements/detail-view/views/dialog-view/dialog-views/ruolo-view/ruolo-view.component';
import { TracciatiViewComponent } from '../elements/detail-view/views/tracciati-view/tracciati-view.component';
Expand All @@ -69,7 +68,6 @@ export class EntryPointList {
RegistroIntermediariViewComponent,
TipiPendenzeViewComponent,
ApplicazioniViewComponent,
RppsViewComponent,
GiornaleEventiViewComponent,
RiscossioniViewComponent,
RendicontazioniViewComponent,
Expand Down Expand Up @@ -207,9 +205,6 @@ export class EntryPointList {
case UtilService.APPLICAZIONE:
_type = ApplicazioneViewComponent;
break;
case UtilService.RPPS:
_type = RppsViewComponent;
break;
case UtilService.OPERATORE:
_type = OperatoreViewComponent;
break;
Expand Down Expand Up @@ -322,9 +317,6 @@ export class EntryPointList {
case 'ApplicazioniViewComponent':
_name = UtilService.APPLICAZIONI;
break;
case 'RppsViewComponent':
_name = UtilService.RPPS;
break;
case 'GiornaleEventiViewComponent':
_name = UtilService.GIORNALE_EVENTI;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<mat-option *ngFor="let item of _domini" [value]="item">{{item.ragioneSociale}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="w-100" color="accent" [formGroup]="fGroup" *ngIf="_unitaOperativeDominio?.length !== 0">
<mat-form-field class="w-100" color="accent" [formGroup]="fGroup">
<mat-select [placeholder]="_voce.UNITA_OPERATIVA" formControlName="unitaOperative_ctrl"
(selectionChange)="_unitaOperativaChangeSelection($event)" [compareWith]="unitaOperativaCmpFn" required>
<mat-option *ngFor="let item of _unitaOperativeDominio" [value]="item">{{item.ragioneSociale}}</mat-option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
[search]="_paginatorOptions.pendenze.search" [refresh]="_paginatorOptions.pendenze.refresh" *ngIf="_isIntermediato"></link-filter-card>
<link-simple-list-card (over-icon-click)="_listCardIconClick($event)" (menu-action-click)="_listCardAction($event)" [trigger-icon]="'add'" [card-title]="'Connettori'"
[tooltip-trigger-icon]="'Connettori'" [data-list]="connettori" [show-actions]="_PLUS_CREDIT" [action-list]="['edit', 'delete']"
[show-menu-actions]="_PLUS_CREDIT && _availableConnectors.length !== 0" [menu-actions]="_availableConnectors" *ngIf="_isIntermediato"></link-simple-list-card>
[show-menu-actions]="_PLUS_CREDIT && _availableConnectors.length !== 0" [menu-actions]="_availableConnectors"></link-simple-list-card>
</div>
<button mat-fab class="fab-action" (click)="_editDominio()"><i class="material-icons">edit</i></button>
Original file line number Diff line number Diff line change
Expand Up @@ -273,44 +273,44 @@ export class DominiViewComponent implements IModalDialog, OnInit, AfterViewInit
this.informazioniExtra = _dettaglio.infoExtra.slice(0);

const _connettori: any[] = [];
if (json.intermediato) {
// MyPivot
if (json.servizioMyPivot && json.servizioMyPivot.abilitato) {
const p = new Parameters();
p.id = this._CONNETTORE_MY_PIVOT;
p.jsonP = json.servizioMyPivot;
p.model = this._mapNewItemByType(json.servizioMyPivot, this._CONNETTORE_MY_PIVOT);
_connettori.push(p);
}
// SECIM
if (json.servizioSecim && json.servizioSecim.abilitato) {
const p = new Parameters();
p.id = this._CONNETTORE_SECIM;
p.jsonP = json.servizioSecim;
p.model = this._mapNewItemByType(json.servizioSecim, this._CONNETTORE_SECIM);
_connettori.push(p);
}
// GOVPAY
if (json.servizioGovPay && json.servizioGovPay.abilitato) {
const p = new Parameters();
p.id = this._CONNETTORE_GOVPAY;
p.jsonP = json.servizioGovPay;
p.model = this._mapNewItemByType(json.servizioGovPay, this._CONNETTORE_GOVPAY);
_connettori.push(p);
}
// HyperSicAPKappa
if (json.servizioHyperSicAPKappa && json.servizioHyperSicAPKappa.abilitato) {
const p = new Parameters();
p.id = this._CONNETTORE_HYPERSIC;
p.jsonP = json.servizioHyperSicAPKappa;
p.model = this._mapNewItemByType(json.servizioHyperSicAPKappa, this._CONNETTORE_HYPERSIC);
_connettori.push(p);
}
this.connettori = [].concat(_connettori);
this.filtroConnettori();

this.associazioniDisponibili();
}
// MyPivot
if (json.servizioMyPivot && json.servizioMyPivot.abilitato) {
const p = new Parameters();
p.id = this._CONNETTORE_MY_PIVOT;
p.jsonP = json.servizioMyPivot;
p.model = this._mapNewItemByType(json.servizioMyPivot, this._CONNETTORE_MY_PIVOT);
_connettori.push(p);
}
// SECIM
if (json.servizioSecim && json.servizioSecim.abilitato) {
const p = new Parameters();
p.id = this._CONNETTORE_SECIM;
p.jsonP = json.servizioSecim;
p.model = this._mapNewItemByType(json.servizioSecim, this._CONNETTORE_SECIM);
_connettori.push(p);
}
// GOVPAY
if (json.servizioGovPay && json.servizioGovPay.abilitato) {
const p = new Parameters();
p.id = this._CONNETTORE_GOVPAY;
p.jsonP = json.servizioGovPay;
p.model = this._mapNewItemByType(json.servizioGovPay, this._CONNETTORE_GOVPAY);
_connettori.push(p);
}
// HyperSicAPKappa
if (json.servizioHyperSicAPKappa && json.servizioHyperSicAPKappa.abilitato) {
const p = new Parameters();
p.id = this._CONNETTORE_HYPERSIC;
p.jsonP = json.servizioHyperSicAPKappa;
p.model = this._mapNewItemByType(json.servizioHyperSicAPKappa, this._CONNETTORE_HYPERSIC);
_connettori.push(p);
}
this.connettori = [].concat(_connettori);
this.filtroConnettori();

this.associazioniDisponibili();

this.elencoMultiplo(json.intermediato);
this._isIntermediato = json.intermediato;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,65 +146,87 @@ export class PagamentiViewComponent implements IModalDialog, IExport, OnInit, Af

protected mapJsonDetail(_json: any) {
//Riepilogo
let _ist, _tv;
if(_json.rpp && _json.rpp.length != 0) {
const _rpp: any = _json.rpp[0];
_ist = (_rpp.rt)?_rpp.rt.istitutoAttestante.denominazioneAttestante:'';
_tv = (_rpp.rpt)?_rpp.rpt.datiVersamento.tipoVersamento:'';
}
let _debitore = Voce.UNDEFINED;
if(_json.soggettoVersante){
_debitore = Dato.concatStrings([ _json.soggettoVersante.anagrafica, _json.soggettoVersante.identificativo ], ', ');
let _istituto;
let _soggettoVersante: string = Voce.UNDEFINED;
if(_json.rpp && _json.rpp.length !== 0) {
const _rpp0: any = _json.rpp[0];
const versione620: boolean = !!(_rpp0.rpt && _rpp0.rpt.versioneOggetto && _rpp0.rpt.versioneOggetto === '6.2.0');
if (versione620) {
_istituto = (_rpp0.rt && _rpp0.rt.istitutoAttestante)?_rpp0.rt.istitutoAttestante.denominazioneAttestante:'';
if(_json.soggettoVersante){
_soggettoVersante = Dato.concatStrings([ _json.soggettoVersante.anagrafica, _json.soggettoVersante.identificativo ], ', ');
}
} else {
const soggetto: string[] = [];
if (_rpp0.rt && _rpp0.rt.receipt) {
_istituto = (_rpp0.rt.receipt.PSPCompanyName || '');
if (_rpp0.rt && _rpp0.rt.receipt && _rpp0.rt.receipt.payer) {
if (_rpp0.rt.receipt.payer.fullName) {
soggetto.push(_rpp0.rt.receipt.payer.fullName);
}
if (_rpp0.rt.receipt.payer.uniqueIdentifier && _rpp0.rt.receipt.payer.uniqueIdentifier.entityUniqueIdentifierValue) {
soggetto.push(_rpp0.rt.receipt.payer.uniqueIdentifier.entityUniqueIdentifierValue);
}
}
}
if (soggetto.length !== 0) {
_soggettoVersante = Dato.concatStrings(soggetto, ', ');
}
}
}
let _st = new Dato({ label: Voce.SOGGETTO_VERSANTE, value: _debitore });
const _st = new Dato({ label: Voce.SOGGETTO_VERSANTE, value: _soggettoVersante });
this.info = new Riepilogo({
titolo: new Dato({ label: Voce.DATA, value: _json.dataRichiestaPagamento?moment(_json.dataRichiestaPagamento).format('DD/MM/YYYY [ore] HH:mm'):Voce.NON_PRESENTE }),
sottotitolo: _st,
importo: this.us.currencyFormat(_json.importo),
stato: UtilService.STATI_PAGAMENTO[_json.stato],
extraInfo: []
});
if(_ist) {
this.info.extraInfo.push({ label: Voce.ISTITUTO+': ', value: _ist })
if(_istituto) {
this.info.extraInfo.push({ label: Voce.ISTITUTO+': ', value: _istituto })
}
if(_tv) {
this.info.extraInfo.push({ label: Voce.TIPO+': ', value: UtilService.TIPI_VERSAMENTO[_tv] })
if(_json.modello) {
this.info.extraInfo.push({ label: Voce.TIPO+': ', value: _json.modello })
}
if(_json.id) {
this.info.extraInfo.push({ label: Voce.ID_SESSIONE+': ', value: _json.id });
}
this._paymentsSum = 0;
if(_json.rpp) {
this.pagamenti = _json.rpp.map(function(item) {
let _stato, _dettaglio;
switch (item.stato) {
case 'RT_ACCETTATA_PA':
_stato = (item.rt)?UtilService.STATI_ESITO_PAGAMENTO[item.rt.datiPagamento.codiceEsitoPagamento]:-1;
break;
case 'RPT_RIFIUTATA_NODO':
case 'RPT_RIFIUTATA_PSP':
case 'RPT_ERRORE_INVIO_A_PSP':
_stato = UtilService.STATI_RPP.FALLITO;
_dettaglio = item.dettaglioStato;
break;
case 'RT_RIFIUTATA_PA':
case 'RT_ESITO_SCONOSCIUTO_PA':
_stato = UtilService.STATI_RPP.ANOMALO;
_dettaglio = item.dettaglioStato;
break;
default:
_stato = UtilService.STATI_RPP.IN_CORSO;
const versione620: boolean = !!(item.rpt && item.rpt.versioneOggetto && item.rpt.versioneOggetto === '6.2.0');
const ms: any = UtilService.MapStato(item, versione620);
const stStrings: string[] = [Voce.ENTE_CREDITORE+': '+item.pendenza.dominio.ragioneSociale];
let importoRpp: string = '0';
if (versione620) {
if (item.rpt.datiVersamento) {
if (item.rpt.datiVersamento.identificativoUnivocoVersamento) {
stStrings.push(Voce.IUV+': '+item.rpt.datiVersamento.identificativoUnivocoVersamento);
}
if (item.rpt.datiVersamento.identificativoUnivocoVersamento) {
importoRpp = item.rpt.datiVersamento.importoTotaleDaVersare;
}
}
} else {
if (item.rpt && item.rpt.data) {
if (item.rpt.data.creditorReferenceId) {
stStrings.push(Voce.IUV+': '+item.rpt.data.creditorReferenceId);
}
}
if (item.rt && item.rt.receipt) {
importoRpp = item.rt.receipt.paymentAmount;
}
}
let _st = new Dato({ value: Dato.concatStrings([ Voce.ENTE_CREDITORE+': '+item.pendenza.dominio.ragioneSociale, Voce.IUV+': '+item.rpt.datiVersamento.identificativoUnivocoVersamento ], ', ') });
let _st = new Dato({ value: Dato.concatStrings(stStrings, ', ') });
let _std = new StandardCollapse();
_std.titolo = new Dato({ value: item.pendenza.causale });
_std.sottotitolo = _st;
_std.stato = _stato;
_std.importo = this.us.currencyFormat(item.rpt.datiVersamento.importoTotaleDaVersare);
this._paymentsSum += UtilService.defaultDisplay({ value: parseFloat(item.rpt.datiVersamento.importoTotaleDaVersare), text: 0 });
//TODO: Disattivato collapse (_std.motivo)
// if (_dettaglio) {
// _std.motivo = _dettaglio;
_std.stato = ms.stato;
_std.importo = this.us.currencyFormat(parseFloat(importoRpp));
this._paymentsSum += UtilService.defaultDisplay({ value: parseFloat(importoRpp), text: 0 });
// Disattivato collapse (_std.motivo)
// if (ms.dettaglio) {
// _std.motivo = ms.dettaglio;
// }
let p = new Parameters();
p.model = _std;
Expand Down Expand Up @@ -333,33 +355,20 @@ export class PagamentiViewComponent implements IModalDialog, IExport, OnInit, Af
// /rpp/{idDominio}/{iuv}/{ccp}/rpt
// /rpp/{idDominio}/{iuv}/{ccp}/rt
const item = el.jsonP;
const _folder = UtilService.EncodeURIComponent(item.rpt.dominio.identificativoDominio)+'_'+UtilService.EncodeURIComponent(item.rpt.datiVersamento.identificativoUnivocoVersamento)+'_'+UtilService.EncodeURIComponent(item.rpt.datiVersamento.codiceContestoPagamento);
folders.push(_folder);
chunk.push({
url: '/rpp/'+UtilService.EncodeURIComponent(item.rpt.dominio.identificativoDominio)+'/'+UtilService.EncodeURIComponent(item.rpt.datiVersamento.identificativoUnivocoVersamento)+'/'+UtilService.EncodeURIComponent(item.rpt.datiVersamento.codiceContestoPagamento)+'/rpt',
content: 'application/xml',
name: 'Rpt.xml'+_folder,
type: 'text'
});
chunk.push({
url: UtilService.URL_GIORNALE_EVENTI+'?risultatiPerPagina='+UtilService.PREFERENCES['MAX_EXPORT_LIMIT']+'&idDominio='+UtilService.EncodeURIComponent(item.rpt.dominio.identificativoDominio)+'&iuv='+UtilService.EncodeURIComponent(item.rpt.datiVersamento.identificativoUnivocoVersamento)+'&ccp='+UtilService.EncodeURIComponent(item.rpt.datiVersamento.codiceContestoPagamento),
content: 'application/json',
name: 'Eventi.csv'+_folder,
type: 'json'
});
if(item.rt) {
chunk.push({
url: '/rpp/'+UtilService.EncodeURIComponent(item.rt.dominio.identificativoDominio)+'/'+UtilService.EncodeURIComponent(item.rt.datiPagamento.identificativoUnivocoVersamento)+'/'+UtilService.EncodeURIComponent(item.rt.datiPagamento.CodiceContestoPagamento)+'/rt',
content: 'application/xml',
name: 'Rt.xml'+_folder,
type: 'text'
});
chunk.push({
url: '/rpp/'+UtilService.EncodeURIComponent(item.rt.dominio.identificativoDominio)+'/'+UtilService.EncodeURIComponent(item.rt.datiPagamento.identificativoUnivocoVersamento)+'/'+UtilService.EncodeURIComponent(item.rt.datiPagamento.CodiceContestoPagamento)+'/rt',
content: 'application/pdf',
name: 'Rt.pdf'+_folder,
type: 'blob'
});
const ref: any = UtilService.ExportMapLoopCfg(item);
if (ref.idd && ref.iuv) {
const _folder = UtilService.ExportMapChunkLoopCfg('folder', ref);
if (folders.indexOf(_folder) == -1) {
folders.push(_folder);
}
if (ref.ccp && _folder) {
chunk.push(UtilService.ExportMapChunkLoopCfg('Rpt.xml', ref, _folder));
chunk.push(UtilService.ExportMapChunkLoopCfg('Eventi.csv', ref, _folder));
}
if(ref.iddRT && ref.iuvRT && ref.ccpRT && _folder) {
chunk.push(UtilService.ExportMapChunkLoopCfg('Rt.xml', ref, _folder));
chunk.push(UtilService.ExportMapChunkLoopCfg('Rt.pdf', ref, _folder));
}
}
}, this);
} catch (error) {
Expand Down

0 comments on commit de59c77

Please sign in to comment.