Esempio n. 1
0
 public function testMixedBatch()
 {
     // when
     $this->batch->addCreditEntry((new CcdEntry())->setTransactionCode(27)->setReceivingDfiId('09101298')->setCheckDigit(7)->setReceivingDFiAccountNumber('46479999')->setAmount('600.00')->setReceivingCompanyId('Location 23')->setReceivingCompanyName('Best Co 23')->setDiscretionaryData('S')->setAddendaRecordIndicator(0)->setTraceNumber('09936340', 15));
     $this->batch->addDebitEntry((new DebitEntry())->setTransactionCode(27)->setReceivingDfiId('09101298')->setCheckDigit(7)->setDFiAccountNumber('46479999')->setAmount('550.00')->setIndividualId('SomePerson1255')->setIdividualName('Alex Dubrovsky')->setDiscretionaryData('S')->setAddendaRecordIndicator(0)->setTraceNumber('09936340', 15));
     // then
     $output = (string) $this->batch;
     $this->assertEquals((string) $this->batch->getHeader()->getServiceClassCode(), Batch::MIXED);
     $this->assertEquals("5200MY BEST COMP    INCLUDES OVERTIME   1419871234PPDPAYROLL   0602  0112     2010212340000001\n" . "62709101298746479999         0000055000SOMEPERSON1255 ALEX DUBROVSKY        S 0099363400000015\n" . "62709101298746479999         0000060000LOCATION 23    BEST CO 23            S 0099363400000015\n" . "820000000200182025960000000550000000000600001419871234                         010212340000001", $output);
 }
Esempio n. 2
0
 private function getBatch()
 {
     $batch = new Batch();
     $batch->getHeader()->setCompanyName('MY BEST COMP')->setCompanyDiscretionaryData('INCLUDES OVERTIME')->setCompanyId('1419871234')->setStandardEntryClassCode('PPD')->setCompanyEntryDescription('PAYROLL')->setCompanyDescriptiveDate('0602')->setEffectiveEntryDate('0112')->setOriginatorStatusCode('2')->setOriginatingDFiId('01021234');
     $batch->addDebitEntry((new DebitEntry())->setTransactionCode(27)->setReceivingDfiId('09101298')->setCheckDigit(7)->setDFiAccountNumber('46479999')->setAmount('550.00')->setIndividualId('SomePerson1255')->setIdividualName('Alex Dubrovsky')->setDiscretionaryData('S')->setAddendaRecordIndicator(0)->setTraceNumber('99936340', 15));
     return $batch;
 }
Esempio n. 3
0
 public function addBatch(Batch $batch)
 {
     $this->batches[] = $batch;
     $batch->getHeader()->setBatchNumber(count($this->batches));
 }