Mariusz Muszyński 8 лет назад
Родитель
Сommit
4cddb0cae1
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      SE/se-lib/Route/UrlAction/JPK.php

+ 3 - 3
SE/se-lib/Route/UrlAction/JPK.php

@@ -9,7 +9,7 @@ class Route_UrlAction_JPK extends RouteBase {
 	private $JPK, $BO;
 	private $NIPerrors = array();
 	private $JPK_VAT_Wariant = null;
-	const tns = [
+	private $tns = [
 		2 => "http://jpk.mf.gov.pl/wzor/2016/10/26/10261/",
 		3 => "http://jpk.mf.gov.pl/wzor/2017/11/13/1113/",
 	];
@@ -449,7 +449,7 @@ format: 'YYYY-MM'
 
 	private function getSummaryJPK_VAT($xml) {
 		$ns = $xml->getNamespaces(true);
-		$tns = self::tns[$this->JPK_VAT_Wariant];
+		$tns = $this->tns[$this->JPK_VAT_Wariant];
 		if (array_search($tns, $ns) === false) throw new Exception("Błąd struktury pliku XML - błędny namespace");
 
 		$PodatekNaleznyFields = array("K_16" => "1", "K_18" => "1", "K_20" => "1", "K_24" => "1", "K_26" => "1", "K_28" => "1",
@@ -910,7 +910,7 @@ EOT;
 			self::removeTnsNamespace($xmlInsert);
 			$xmlL1 = simplexml_load_string($this->JPK['IN_L1']);
 			$xml = simplexml_load_string($xmlSchema);
-			$tns = self::tns[$this->JPK_VAT_Wariant];
+			$tns = $this->tns[$this->JPK_VAT_Wariant];
 
 			switch (V::get('SRC_PODMIOT','',$_POST)) {
 				case "Insert":