@@ -372,27 +372,25 @@ public function aggiungiDebitoDirettoSEPA(int $identifier, Anagrafica $contropar
372372 public function aggiungiDebitoDiretto (int $ identifier , Anagrafica $ controparte , Banca $ banca_controparte , string $ descrizione , $ totale , \DateTime $ data_prevista , $ method , $ codice_sequenza )
373373 {
374374 $ date_key = $ data_prevista ->format ('Y-m-d ' );
375- $ customer_key = $ controparte ->id ;
376- $ group_key = $ date_key .'_ ' .$ customer_key ;
377375
378- if (!isset ($ this ->payment_info_by_date_customer [$ group_key ])) {
376+ if (!isset ($ this ->payment_info_by_date_customer [$ date_key ])) {
379377 $ paymentInformation = new PaymentInformationCBI ();
380378 $ paymentInformation
381379 ->setCreditorName ($ this ->azienda ->ragione_sociale )
382380 ->setCreditorIBAN ($ this ->banca_azienda ->iban )
383381 ->setCreditorId ($ this ->banca_azienda ->creditor_id )
384- ->setPaymentInformationIdentification ($ group_key )
382+ ->setPaymentInformationIdentification ($ date_key )
385383 ->setRequestedExecutionDate ($ date_key )
386384 ->setLocalMethod ($ method )
387385 ->setServiceLevel ('SEPA ' )
388386 ->setSeqType ($ codice_sequenza != '' ? $ codice_sequenza : 'RCUR ' );
389387
390- $ this ->payment_info_by_date_customer [$ group_key ] = $ paymentInformation ;
388+ $ this ->payment_info_by_date_customer [$ date_key ] = $ paymentInformation ;
391389
392390 $ this ->debito_diretto ->addPaymentInformation ($ paymentInformation );
393391 }
394392
395- $ paymentInformation = $ this ->payment_info_by_date_customer [$ group_key ];
393+ $ paymentInformation = $ this ->payment_info_by_date_customer [$ date_key ];
396394 $ mandato = $ this ->getMandato ($ banca_controparte );
397395 $ payment = new PaymentCBI ();
398396 $ payment
0 commit comments