Ver Fonte

Merge branch 'master' of bn.git:plabudda/se

Piotr Labudda há 8 anos atrás
pai
commit
ab5049f605
2 ficheiros alterados com 4 adições e 2 exclusões
  1. 1 1
      SE/bash_sync_perms.php
  2. 3 1
      SE/se-lib/Route/UrlAction/JPK.php

+ 1 - 1
SE/bash_sync_perms.php

@@ -545,7 +545,7 @@ class SyncPerms {
 		echo "DBG: UrlAction_WmsGenerate->doGenerate() END\n";
 
 		echo "DBG: UrlAction_BiAuditGenerate->doGenerate() START...\n";
-		Router::getRoute('UrlAction_BiAuditGenerate')->doGenerate(); //musze przetestowac raport!
+		//Router::getRoute('UrlAction_BiAuditGenerate')->doGenerate(); //musze przetestowac raport!
 		echo "DBG: UrlAction_BiAuditGenerate->doGenerate() END\n";
 	}
 

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

@@ -319,7 +319,9 @@ format: 'YYYY-MM'
 				$xml = simplexml_load_string($this->JPK['OUT_MERGED']);
 				$ns = $xml->getNamespaces(true);
 				$this->validateJPK_VAT($xml);
-				$fileName = preg_replace("/[: \.]/", "_", "JPK_VAT_{$this->JPK['MONTH']}_" . str_replace('"', '', $xml->Podmiot1->IdentyfikatorPodmiotu->children($ns['etd'])->PelnaNazwa));
+				if ($this->JPK_VAT_Wariant == 2) $pelnaNazwa = $xml->Podmiot1->IdentyfikatorPodmiotu->children($ns['etd'])->PelnaNazwa;
+				elseif ($this->JPK_VAT_Wariant == 3) $pelnaNazwa = $xml->Podmiot1->PelnaNazwa;
+				$fileName = preg_replace("/[: \.]/", "_", "JPK_VAT_{$this->JPK['MONTH']}_" . str_replace('"', '', $pelnaNazwa)) . ".xml";
 				$output = $xml->asXml();
 				header("Content-Type: application/xml");
 				header("Content-Disposition: attachment; filename={$fileName};");