Esempio n. 1
0
 /**
  * Validate bankgiro and customer number of section
  */
 public function beforeOpeningNode(OpeningNode $node)
 {
     if (!$this->bankgiro) {
         $this->bankgiro = $node->getChild('bankgiro')->getValue();
     }
     if (!$this->custNr) {
         $this->custNr = $node->getChild('customer_number')->getValue();
     }
     if ($node->getChild('bankgiro')->getValue() != $this->bankgiro) {
         $this->addError("Non-matching payee bankgiro numbers within file (%s and %s) on line %s", $this->bankgiro, $node->getChild('bankgiro')->getValue(), (string) $node->getLineNr());
     }
     if ($node->getChild('customer_number')->getValue() != $this->custNr) {
         $this->addError("Non-matching payee BGC customer numbers within file (%s and %s) on line %s", $this->custNr, $node->getChild('customer_number')->getValue(), (string) $node->getLineNr());
     }
 }
Esempio n. 2
0
 /**
  * Collect the current valid bankgiro number
  */
 public function beforeOpeningNode(OpeningNode $node)
 {
     $this->currentBankgiro = $node->getChild('bankgiro')->getValue();
 }