Browse Source

Poprawa dla zwrotów

waldek 3 years ago
parent
commit
e137c30bea
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      JPK_VDEK/Ogolne.xaml.cs

+ 5
- 1
JPK_VDEK/Ogolne.xaml.cs View File

1941
                             {
1941
                             {
1942
                                 d1.P_51 = Math.Round(war, 0).ToString();
1942
                                 d1.P_51 = Math.Round(war, 0).ToString();
1943
                             }
1943
                             }
1944
+                            else
1945
+                            {
1946
+                                d1.P_51 = "0";
1947
+                            }
1944
                             war = Convert.ToDecimal(atr[44].Replace('.', ',')); ;
1948
                             war = Convert.ToDecimal(atr[44].Replace('.', ',')); ;
1945
                             if (war != 0)
1949
                             if (war != 0)
1946
                             {
1950
                             {
2155
 
2159
 
2156
                             spw.NrKontrahenta = atr[48];
2160
                             spw.NrKontrahenta = atr[48];
2157
 
2161
 
2158
-                            if (!atr[50].Equals("PL"))
2162
+                            if (!atr[50].Equals("PL") && !atr[50].Equals(""))
2159
                             {
2163
                             {
2160
                                 spw.KodKrajuNadaniaTIN = atr[50];
2164
                                 spw.KodKrajuNadaniaTIN = atr[50];
2161
                             }
2165
                             }