sigesp 0.9.46-20230713 → 0.9.48-20230717

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2290,10 +2290,18 @@ class MProviderBeneficiary extends MBasicModel {
2290
2290
  this.type = proben.tippro;
2291
2291
  this.observation = proben.obspro;
2292
2292
  this.contribuiterType = proben.tipconpro;
2293
- this.stateCode = proben.codest.trim();
2294
- this.parishCode = proben.codpar.trim();
2295
- this.countryCode = proben.codpai.trim();
2296
- this.municipalityCode = proben.codmun.trim();
2293
+ if (proben.codest) {
2294
+ this.stateCode = proben.codest.trim();
2295
+ }
2296
+ if (proben.codpar) {
2297
+ this.stateCode = proben.codpar.trim();
2298
+ }
2299
+ if (proben.codpai) {
2300
+ this.countryCode = proben.codpai.trim();
2301
+ }
2302
+ if (proben.codmun) {
2303
+ this.municipalityCode = proben.codmun.trim();
2304
+ }
2297
2305
  this.currencyCode = proben.codmon;
2298
2306
  this.organizationType = parseInt(proben.id_tiporg);
2299
2307
  this.systemLogDate = proben.fecregsis;
@@ -2324,7 +2332,9 @@ class MProviderBeneficiary extends MBasicModel {
2324
2332
  this.estpropri = proben.estpropri;
2325
2333
  this.sigecofCode = proben.codsigcof;
2326
2334
  this.passport = proben.pasaporte;
2327
- this.accounts = proben.cuentas.map(e => new MProviderBankAccount(e));
2335
+ if (proben.cuentas) {
2336
+ this.accounts = proben.cuentas.map(e => new MProviderBankAccount(e));
2337
+ }
2328
2338
  this.personType = proben.tipperpro;
2329
2339
  this.webAddress = proben.webpro;
2330
2340
  this.typeDesignation = this.type == 'P' ? 'PROVEEDOR' : this.type == 'B' ? 'BENEFICIARIO' : this.type == 'C' ? 'CONTRATISTA' : this.type == 'N' ? 'NINGUNO' : 'PROVEEDOR-CONTRATISTA';
@@ -6868,11 +6878,16 @@ class SigespService {
6868
6878
  }
6869
6879
  /**
6870
6880
  * @description Obtiene los proveedores y beneficiarios
6881
+ * @Note Si quiere solo los datos basicos use los parametros ('S','P','N')
6871
6882
  * @return Observable<IResponse>
6872
6883
  * @author Carlos Albornoz
6884
+ * @type ={'P','B','S'}
6885
+ * @destination ={'P','B','C','A','N'}≈{Proveedor,Beneficiario,Contatista,Ambos,Ninguno}
6886
+ * @account ={'S','N'} para traer las cuentas bancarias del proveedor por defecto esta en N
6887
+ * @modificado 17-07-2023
6873
6888
  */
6874
- getProvidersAndBeneficiaries(type = null) {
6875
- return this.http.get(`${this.URL}/dao/rpc/proveedor_beneficiario_dao.php${type ? `?provider_type=${type}` : ''}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => {
6889
+ getProvidersAndBeneficiaries(type = null, destination = null, account = 'N') {
6890
+ return this.http.get(`${this.URL}/dao/rpc/proveedor_beneficiario_dao.php${type ? `?provider_type=${type}` : ''}&destination=${destination}&account=${account}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => {
6876
6891
  if (res.success) {
6877
6892
  res.data = res.data.map(e => new MProviderBeneficiary(e));
6878
6893
  }