|
@@ -369,6 +369,7 @@ format: 'YYYY-MM'
|
|
|
<?php
|
|
<?php
|
|
|
if ($this->JPK['IN_INSERT']) {
|
|
if ($this->JPK['IN_INSERT']) {
|
|
|
$xmlIN_INSERT = simplexml_load_string($this->JPK['IN_INSERT']);
|
|
$xmlIN_INSERT = simplexml_load_string($this->JPK['IN_INSERT']);
|
|
|
|
|
+ self::removeTnsNamespace($xmlIN_INSERT);
|
|
|
$IN_INSERT = $this->showJPK_VAT($xmlIN_INSERT);
|
|
$IN_INSERT = $this->showJPK_VAT($xmlIN_INSERT);
|
|
|
}
|
|
}
|
|
|
if ($this->JPK['IN_L1']) {
|
|
if ($this->JPK['IN_L1']) {
|
|
@@ -589,18 +590,12 @@ format: 'YYYY-MM'
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private function getSummaryJPK_VAT($xml) {
|
|
private function getSummaryJPK_VAT($xml) {
|
|
|
- $ns = self::getNamespaces($xml);
|
|
|
|
|
-// $ns = $xml->getNamespaces(true);
|
|
|
|
|
- $tns = $this->tns[(string) $xml->xpath('//tns:Naglowek/tns:KodFormularza/@kodSystemowy')[0]];
|
|
|
|
|
- if (array_search($tns, $ns) === false) throw new Exception("Błąd struktury pliku XML - błędny namespace");
|
|
|
|
|
-
|
|
|
|
|
switch ($this->JPK_wersjaSchemy) {
|
|
switch ($this->JPK_wersjaSchemy) {
|
|
|
case '1-0':
|
|
case '1-0':
|
|
|
case '1-1':
|
|
case '1-1':
|
|
|
$PodatekNaleznyFields = array("K_16" => "1", "K_18" => "1", "K_20" => "1", "K_24" => "1", "K_26" => "1", "K_28" => "1",
|
|
$PodatekNaleznyFields = array("K_16" => "1", "K_18" => "1", "K_20" => "1", "K_24" => "1", "K_26" => "1", "K_28" => "1",
|
|
|
"K_30" => "1", "K_33" => "1", "K_35" => "1", "K_36" => "1", "K_37" => "1", "K_38" => "-1", "K_39" => "-1");
|
|
"K_30" => "1", "K_33" => "1", "K_35" => "1", "K_36" => "1", "K_37" => "1", "K_38" => "-1", "K_39" => "-1");
|
|
|
$PodatekNaliczonyFields = array("K_44" => 1, "K_46" => 1, "K_47" => 1, "K_48" => 1, "K_49" => 1, "K_50" => 1);
|
|
$PodatekNaliczonyFields = array("K_44" => 1, "K_46" => 1, "K_47" => 1, "K_48" => 1, "K_49" => 1, "K_50" => 1);
|
|
|
- $ewidencjaXpath = '/tns:JPK';
|
|
|
|
|
$Sprzedaz = $xml->SprzedazWiersz;
|
|
$Sprzedaz = $xml->SprzedazWiersz;
|
|
|
$Zakup = $xml->ZakupWiersz;
|
|
$Zakup = $xml->ZakupWiersz;
|
|
|
break;
|
|
break;
|
|
@@ -608,7 +603,6 @@ format: 'YYYY-MM'
|
|
|
$PodatekNaleznyFields = array("K_16" => "1", "K_18" => "1", "K_20" => "1", "K_24" => "1", "K_26" => "1", "K_28" => "1",
|
|
$PodatekNaleznyFields = array("K_16" => "1", "K_18" => "1", "K_20" => "1", "K_24" => "1", "K_26" => "1", "K_28" => "1",
|
|
|
"K_30" => "1", "K_32" => "1", "K_33" => "1", "K_34" => "1", "K_35" => "-1", "K_36" => "-1");
|
|
"K_30" => "1", "K_32" => "1", "K_33" => "1", "K_34" => "1", "K_35" => "-1", "K_36" => "-1");
|
|
|
$PodatekNaliczonyFields = array("K_41" => 1, "K_43" => 1, "K_44" => 1, "K_45" => 1, "K_46" => 1, "K_47" => 1);
|
|
$PodatekNaliczonyFields = array("K_41" => 1, "K_43" => 1, "K_44" => 1, "K_45" => 1, "K_46" => 1, "K_47" => 1);
|
|
|
- $ewidencjaXpath = '/tns:JPK/tns:Ewidencja';
|
|
|
|
|
$Sprzedaz = $xml->Ewidencja->SprzedazWiersz;
|
|
$Sprzedaz = $xml->Ewidencja->SprzedazWiersz;
|
|
|
$Zakup = $xml->Ewidencja->ZakupWiersz;
|
|
$Zakup = $xml->Ewidencja->ZakupWiersz;
|
|
|
break;
|
|
break;
|