Browse Source

poprawki dodatkowe pola

waldek 4 years ago
parent
commit
5ec65d0037

+ 33
- 0
JPK_VDEK/AddDec.xaml View File

@@ -0,0 +1,33 @@
1
+<UserControl x:Class="JPK_VDEK.AddDec"
2
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
5
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
6
+             xmlns:local="clr-namespace:JPK_VDEK"
7
+             mc:Ignorable="d" d:DesignWidth="800" Height="254">
8
+    <Grid>
9
+        <Label Content="Uzasadnienie korekty" HorizontalAlignment="Left" Margin="34,149,0,0" VerticalAlignment="Top" Height="25" Width="123" RenderTransformOrigin="0.37,0.48">
10
+            <Label.RenderTransform>
11
+                <TransformGroup>
12
+                    <ScaleTransform/>
13
+                    <SkewTransform/>
14
+                    <RotateTransform/>
15
+                    <TranslateTransform X="0.001"/>
16
+                </TransformGroup>
17
+            </Label.RenderTransform>
18
+        </Label>
19
+        <TextBox x:Name="tkor" HorizontalAlignment="Left" Height="67" Margin="162,149,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="536"/>
20
+        <Label Content="Nadwyżka(P_39)" HorizontalAlignment="Left" Margin="25,10,0,0" VerticalAlignment="Top"/>
21
+        <TextBox x:Name="nadwyzka" HorizontalAlignment="Left" Height="23" Margin="200,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120"  Text="{Binding P39}"/>
22
+        <Label Content="Wysokość zwrotu do zaliczenia na poczet przyszłych zobowiązań" HorizontalAlignment="Left" Margin="33,87,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.451,1.781"/>
23
+        <Label Content="Wysokosc zaliczki do przeniesienia na następny miesiąc" HorizontalAlignment="Left" Margin="33,118,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.451,1.781"/>
24
+        <RadioButton Content="Zwrot na rachunek VAT" HorizontalAlignment="Left" Margin="33,47,0,0" VerticalAlignment="Top"/>
25
+        <RadioButton Content="Zwrot w terminie 25" HorizontalAlignment="Left" Margin="200,47,0,0" VerticalAlignment="Top"/>
26
+        <RadioButton Content="Zwrot w terminie 60" HorizontalAlignment="Left" Margin="351,47,0,0" VerticalAlignment="Top"/>
27
+        <RadioButton Content="Zwrot w terminie 180" HorizontalAlignment="Left" Margin="500,47,0,0" VerticalAlignment="Top"/>
28
+        <RadioButton Content="Zaliczka na poczet przyszłych zobowiązań" HorizontalAlignment="Left" Margin="33,67,0,0" VerticalAlignment="Top"/>
29
+        <TextBox HorizontalAlignment="Left" Height="23" Margin="382,90,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="120"/>
30
+        <TextBox HorizontalAlignment="Left" Height="23" Margin="382,121,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="120"/>
31
+
32
+    </Grid>
33
+</UserControl>

+ 28
- 0
JPK_VDEK/AddDec.xaml.cs View File

@@ -0,0 +1,28 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+using System.Windows;
7
+using System.Windows.Controls;
8
+using System.Windows.Data;
9
+using System.Windows.Documents;
10
+using System.Windows.Input;
11
+using System.Windows.Media;
12
+using System.Windows.Media.Imaging;
13
+using System.Windows.Navigation;
14
+using System.Windows.Shapes;
15
+
16
+namespace JPK_VDEK
17
+{
18
+    /// <summary>
19
+    /// Logika interakcji dla klasy AddDec.xaml
20
+    /// </summary>
21
+    public partial class AddDec : UserControl
22
+    {
23
+        public AddDec()
24
+        {
25
+            InitializeComponent();
26
+        }
27
+    }
28
+}

+ 2
- 2
JPK_VDEK/Core/JG.cs View File

@@ -68,9 +68,9 @@ namespace JPK_VDEK.Core
68 68
             s.Kraj = "PL";
69 69
             s.MiastoPoczta = "Wrocław";
70 70
             s.Miejscowosc = "Wrocław";
71
-            s.Poczta = "53-413";
71
+            s.Poczta = "53-611";
72 72
             s.Powiat = "wrocławski";
73
-            s.Ulica = "Gwiaździsta";
73
+            s.Ulica = "Strzegomska";
74 74
             s.Wojewodztwo = "dolnośląskie";
75 75
             s.Dom = "";
76 76
             s.Budynek = "66";

+ 136
- 4
JPK_VDEK/Core/JpkData.cs View File

@@ -2,6 +2,7 @@
2 2
 using System;
3 3
 using System.Collections.Generic;
4 4
 using System.Collections.ObjectModel;
5
+using System.ComponentModel;
5 6
 using System.Linq;
6 7
 using System.Text;
7 8
 using System.Threading.Tasks;
@@ -56,7 +57,7 @@ namespace JPK_VDEK
56 57
             aJpk.ZakupWiersz = new List<JPKZakupWiersz>();
57 58
 
58 59
             aJpk.ZakupCtrl = new JPKZakupCtrl();
59
-            aJpk.ViewSP = new ObservableCollection<JPKSprzedazWiersz>();
60
+            aJpk.ViewSP = new ObservableCollection<JPKSprzedazWierszExt>();
60 61
             aJpk.ViewZA = new ObservableCollection<JPKZakupWiersz>();
61 62
 
62 63
             aJpk.Sumy = new JPKSumyKontrola();
@@ -65,12 +66,127 @@ namespace JPK_VDEK
65 66
             aJpk.Urz = new US();
66 67
         }
67 68
     }
69
+    public class JJPKZakupWierszExt: JPKZakupWiersz
70
+    {
71
+        public string TypDokumentuExt { get; set; }
72
+        public JJPKZakupWierszExt()
73
+        {
74
+            TypDokumentuExt = "";
75
+        }
76
+        public void CopyFromBase(JPKZakupWiersz a)
77
+        {
78
+            LpZakupu = a.LpZakupu;
79
+            DowodZakupu = a.DowodZakupu;
80
+            NazwaDostawcy = a.NazwaDostawcy;
81
+            NrDostawcy = a.NrDostawcy;
82
+            DataWplywu = a.DataWplywu;
83
+            DataZakupu = a.DataZakupu;
84
+            K_40 = a.K_40;
85
+            K_41 = a.K_41;
86
+            K_42 = a.K_42;
87
+            K_43 = a.K_43;
88
+            K_44 = a.K_44;
89
+            K_45 = a.K_45;
90
+            K_46 = a.K_46;
91
+            K_47 = a.K_47;
92
+            KodKrajuNadaniaTIN = a.KodKrajuNadaniaTIN;
93
+            DokumentZakupu = a.DokumentZakupu;
94
+            MPP = a.MPP;
95
+            IMP = a.IMP;
96
+            ZakupVAT_Marza = a.ZakupVAT_Marza;
97
+         
98
+        }
68 99
 
69
-    public class JpkExt : JPK
100
+    }
101
+    public class JPKSprzedazWierszExt : JPKSprzedazWiersz
70 102
     {
103
+        public string TypDokumentuExt { get; set; }
104
+
105
+        public JPKSprzedazWierszExt()
106
+        {
107
+            TypDokumentuExt = "";
108
+        }
109
+        public void CopyFromBase(JPKSprzedazWiersz a)
110
+        {
111
+            LpSprzedazy = a.LpSprzedazy;
112
+            DataSprzedazy = a.DataSprzedazy;
113
+            DataWystawienia = a.DataWystawienia;
114
+            DowodSprzedazy = a.DowodSprzedazy;
115
+            NazwaKontrahenta = a.NazwaKontrahenta;
116
+            K_10 = a.K_10;
117
+            K_11 = a.K_11;
118
+            K_12 = a.K_12;
119
+            K_13 = a.K_13;
120
+            K_14 = a.K_14;
121
+            K_15 = a.K_15;
122
+            K_16 = a.K_16;
123
+            K_17 = a.K_17;
124
+            K_18 = a.K_18;
125
+            K_19 = a.K_19;
126
+            K_20 = a.K_20;
127
+            K_21 = a.K_21;
128
+            K_22 = a.K_22;
129
+            K_23 = a.K_23;
130
+            K_24 = a.K_24;
131
+            K_25 = a.K_25;
132
+            K_26 = a.K_26;
133
+            K_27 = a.K_27;
134
+            K_28 = a.K_28;
135
+            K_29 = a.K_29;
136
+            K_30 = a.K_30;
137
+            K_31 = a.K_31;
138
+            K_32 = a.K_32;
139
+            K_33 = a.K_33;
140
+            K_34 = a.K_34;
141
+            K_35 = a.K_35;
142
+            K_36 = a.K_36;
143
+            SprzedazVAT_Marza = a.SprzedazVAT_Marza;
144
+            NrKontrahenta = a.NrKontrahenta;
145
+            KodKrajuNadaniaTIN = a.KodKrajuNadaniaTIN;
146
+            TypDokumentu = a.TypDokumentu;
147
+            GTU_01 = a.GTU_01;
148
+            GTU_02 = a.GTU_02;
149
+            GTU_03 = a.GTU_03;
150
+            GTU_04 = a.GTU_04;
151
+            GTU_05 = a.GTU_05;
152
+            GTU_06 = a.GTU_06;
153
+            GTU_07 = a.GTU_07;
154
+            GTU_08 = a.GTU_08;
155
+            GTU_09 = a.GTU_09;
156
+            GTU_10 = a.GTU_10;
157
+            GTU_11 = a.GTU_11;
158
+            GTU_12 = a.GTU_12;
159
+            GTU_13 = a.GTU_13;
160
+            SW = a.SW;
161
+            EE = a.EE;
162
+            TP = a.TP;
163
+            TT_WNT = a.TT_WNT;
164
+            TT_D = a.TT_D;
165
+            MR_T = a.MR_T;
166
+            MR_UZ = a.MR_UZ;
167
+            I_42 = a.I_42;
168
+            I_63 = a.I_63;
169
+            B_SPV = a.B_SPV;
170
+            B_SPV_DOSTAWA = a.B_SPV_DOSTAWA;
171
+            B_MPV_PROWIZJA = a.B_MPV_PROWIZJA;
172
+            MPP = a.MPP;
173
+            KorektaPodstawyOpodt = a.KorektaPodstawyOpodt;
174
+
175
+        }
176
+
177
+    }
178
+    public class JpkExt : JPK , INotifyPropertyChanged
179
+    {
180
+        public event PropertyChangedEventHandler PropertyChanged;
181
+
182
+        private void NotifyPropertyChanged( String propertyName = "")
183
+        {
184
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
185
+        }
71 186
         public void setCel(int poz)
72 187
         {
73 188
             this.Naglowek.CelZlozenia.Value = Convert.ToSByte(this.Cel.Cel[poz].Key);
189
+            NotifyPropertyChanged();
74 190
         }
75 191
         public void setUrzad(int poz)
76 192
         {
@@ -78,13 +194,29 @@ namespace JPK_VDEK
78 194
             if(kod.Equals("0271"))
79 195
             {
80 196
                 this.Naglowek.KodUrzedu = TKodUS.Item0271;
197
+                this.UsNazwa = this.Urz.Lista[poz].Describe;
81 198
             }
82 199
             if (kod.Equals("0225"))
83 200
             {
84
-                this.Naglowek.KodUrzedu = TKodUS.Item0271;
201
+                this.Naglowek.KodUrzedu = TKodUS.Item0225;
202
+                this.UsNazwa = this.Urz.Lista[poz].Describe;
85 203
             }
204
+            NotifyPropertyChanged();
86 205
         }
87
-        public ObservableCollection<JPKSprzedazWiersz> ViewSP { get; set; }
206
+        private Decimal p39;
207
+        public Decimal P39 {
208
+            get 
209
+            {
210
+                return p39;
211
+            }
212
+            set
213
+                {
214
+                p39 = value;
215
+                this.Deklaracja.PozycjeSzczegolowe.P_39 = P39.ToString();
216
+                    NotifyPropertyChanged();
217
+                }
218
+             }
219
+        public ObservableCollection<JPKSprzedazWierszExt> ViewSP { get; set; }
88 220
         public ObservableCollection<JPKZakupWiersz> ViewZA { get; set; }
89 221
 
90 222
         public JPKSumyKontrola Sumy { get; set; }

+ 1
- 1
JPK_VDEK/Deklaracja.xaml View File

@@ -119,7 +119,7 @@
119 119
         <Label Content="P_69" HorizontalAlignment="Left" Margin="574,426,0,0" VerticalAlignment="Top"/>
120 120
         <TextBox x:Name="tp18_Copy6" HorizontalAlignment="Left" Height="23" Margin="609,420,0,0" TextWrapping="Wrap" Text="{Binding Deklaracja.PozycjeSzczegolowe.P_69}" VerticalAlignment="Top" Width="120" ToolTip="Wysokość podatku należnego z tytułu dostawy towarów oraz świadczenia usług na terytorium kraju, opodatkowanych stawką 7% albo 8%, oraz korekty dokonanej zgodnie z art. 89a ust. 1 i 4 ustawy" IsReadOnly="True"/>
121 121
         <Label Content="P_ORDZU" HorizontalAlignment="Left" Margin="548,455,0,0" VerticalAlignment="Top"/>
122
-        <TextBox x:Name="tp18_Copy7" HorizontalAlignment="Left" Height="23" Margin="609,450,0,0" TextWrapping="Wrap" Text="{Binding Deklaracja.PozycjeSzczegolowe.P_ORDZU}" VerticalAlignment="Top" Width="191" ToolTip="Wysokość podatku należnego z tytułu dostawy towarów oraz świadczenia usług na terytorium kraju, opodatkowanych stawką 7% albo 8%, oraz korekty dokonanej zgodnie z art. 89a ust. 1 i 4 ustawy" IsReadOnly="True"/>
122
+        <TextBox x:Name="tp18_Copy7" HorizontalAlignment="Left" Height="74" Margin="609,450,0,0" TextWrapping="Wrap" Text="{Binding Deklaracja.PozycjeSzczegolowe.P_ORDZU}" VerticalAlignment="Top" Width="237" ToolTip="Wysokość podatku należnego z tytułu dostawy towarów oraz świadczenia usług na terytorium kraju, opodatkowanych stawką 7% albo 8%, oraz korekty dokonanej zgodnie z art. 89a ust. 1 i 4 ustawy" IsReadOnly="True"/>
123 123
         <CheckBox Content="P55" IsChecked="{Binding P55}" HorizontalAlignment="Left" Margin="609,57,0,0" VerticalAlignment="Top"/>
124 124
         <CheckBox Content="P56" IsChecked="{Binding P56}" HorizontalAlignment="Left" Margin="609,78,0,0" VerticalAlignment="Top"/>
125 125
         <CheckBox Content="P57" IsChecked="{Binding P57}" HorizontalAlignment="Left" Margin="609,100,0,0" VerticalAlignment="Top"/>

+ 0
- 1
JPK_VDEK/Header.xaml View File

@@ -3,7 +3,6 @@
3 3
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4 4
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
5 5
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
6
-             xmlns:local="clr-namespace:JPK_VDEK"
7 6
              mc:Ignorable="d" 
8 7
              d:DesignHeight="450" d:DesignWidth="800">
9 8
     <Grid>

+ 7
- 0
JPK_VDEK/JPK_VDEK.csproj View File

@@ -55,6 +55,9 @@
55 55
       <Generator>MSBuild:Compile</Generator>
56 56
       <SubType>Designer</SubType>
57 57
     </ApplicationDefinition>
58
+    <Compile Include="AddDec.xaml.cs">
59
+      <DependentUpon>AddDec.xaml</DependentUpon>
60
+    </Compile>
58 61
     <Compile Include="ConfigPopup.xaml.cs">
59 62
       <DependentUpon>ConfigPopup.xaml</DependentUpon>
60 63
     </Compile>
@@ -103,6 +106,10 @@
103 106
     <Compile Include="ZaWie.xaml.cs">
104 107
       <DependentUpon>ZaWie.xaml</DependentUpon>
105 108
     </Compile>
109
+    <Page Include="AddDec.xaml">
110
+      <SubType>Designer</SubType>
111
+      <Generator>MSBuild:Compile</Generator>
112
+    </Page>
106 113
     <Page Include="ConfigPopup.xaml">
107 114
       <SubType>Designer</SubType>
108 115
       <Generator>MSBuild:Compile</Generator>

+ 2
- 2
JPK_VDEK/JpkSap.xaml View File

@@ -10,8 +10,8 @@
10 10
         <Label Content="Cel złożenia" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top"/>
11 11
         <Label Content="Urząd" HorizontalAlignment="Left" Margin="10,41,0,0" VerticalAlignment="Top"/>
12 12
         <Button Content="5. Wygeneruj" HorizontalAlignment="Left" Margin="363,80,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
13
-        <ComboBox HorizontalAlignment="Left" Name="cCel" Margin="114,13,0,0" VerticalAlignment="Top" Width="324"/>
14
-        <ComboBox HorizontalAlignment="Left"  Name="cUrz" Margin="114,44,0,0" VerticalAlignment="Top" Width="324"/>
13
+        <ComboBox HorizontalAlignment="Left" Name="cCel" Margin="114,13,0,0" VerticalAlignment="Top" Width="324" SelectionChanged="cCel_SelectionChanged"/>
14
+        <ComboBox HorizontalAlignment="Left"  Name="cUrz" Margin="114,44,0,0" VerticalAlignment="Top" Width="324" SelectionChanged="cUrz_SelectionChanged"/>
15 15
 
16 16
     </Grid>
17 17
 </UserControl>

+ 17
- 0
JPK_VDEK/JpkSap.xaml.cs View File

@@ -20,6 +20,7 @@ namespace JPK_VDEK
20 20
     /// </summary>
21 21
     public partial class JpkSap : UserControl
22 22
     {
23
+ 
23 24
         public JpkSap()
24 25
         {
25 26
             InitializeComponent();
@@ -38,14 +39,30 @@ namespace JPK_VDEK
38 39
         {
39 40
             if (JpkData.getJpk().wczytalemGL == true)
40 41
             {
42
+                Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
41 43
                 string s = JpkData.getJpk().outScalony;
42 44
                 int scel = cCel.SelectedIndex;
43 45
                 int urz = cUrz.SelectedIndex;
44 46
                 JpkData.getJpk().setCel(scel);
45 47
                 JpkData.getJpk().setUrzad(urz);
46 48
                 JPK jpk = JpkData.getBaseJpk();
49
+                Mouse.OverrideCursor = null;
47 50
                 jpk.SaveToFile(s);
51
+                MessageBox.Show("Wygenerowano plik JPK", "JPK_VDEK");
48 52
             }
49 53
         }
54
+
55
+        private void cCel_SelectionChanged(object sender, SelectionChangedEventArgs e)
56
+        {
57
+            int scel = cCel.SelectedIndex;
58
+            JpkData.getJpk().setCel(scel);
59
+
60
+        }
61
+
62
+        private void cUrz_SelectionChanged(object sender, SelectionChangedEventArgs e)
63
+        {
64
+            int urz = cUrz.SelectedIndex;
65
+            JpkData.getJpk().setUrzad(urz);
66
+        }
50 67
     }
51 68
 }

+ 3
- 3
JPK_VDEK/MainWindow.xaml View File

@@ -5,17 +5,17 @@
5 5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6 6
         xmlns:local="clr-namespace:JPK_VDEK"
7 7
         mc:Ignorable="d"
8
-        Title="JPK_VDEK" Height="703.584" Width="907.168" Icon="trash_empty_ico.ico">
8
+        Title="JPK_VDEK" Height="766.251" Width="907.168" Icon="trash_empty_ico.ico">
9 9
     <Grid>
10 10
         <Grid.ColumnDefinitions>
11 11
             <ColumnDefinition Width="157*"/>
12 12
             <ColumnDefinition Width="239*"/>
13 13
         </Grid.ColumnDefinitions>
14 14
 
15
-        <TabControl HorizontalAlignment="Left" Height="647" Margin="10,27,-0.2,-0.4" VerticalAlignment="Top" Width="891" Grid.ColumnSpan="2" RenderTransformOrigin="0.482,-0.112">
15
+        <TabControl HorizontalAlignment="Left" Height="745" Margin="10,27,0,-35" VerticalAlignment="Top" Width="891" Grid.ColumnSpan="2" RenderTransformOrigin="0.482,-0.112">
16 16
             <TabItem Header="Ogólne">
17 17
                 <Grid Background="#FFE5E5E5" Margin="0,0,0.4,9.2">
18
-                    <local:Ogolne x:Name="ogolne" Margin="0,10,9.2,-40"/>
18
+                    <local:Ogolne x:Name="ogolne" Margin="0,10,8.6,-44.2"/>
19 19
                 </Grid>
20 20
             </TabItem>
21 21
             <TabItem Header="Nagłówek">

+ 1
- 0
JPK_VDEK/MainWindow.xaml.cs View File

@@ -26,6 +26,7 @@ namespace JPK_VDEK
26 26
         {
27 27
             InitializeComponent();
28 28
             this.ogolne.win = this;
29
+ 
29 30
         }
30 31
 
31 32
         private void MenuItem_Click(object sender, RoutedEventArgs e)

+ 35
- 21
JPK_VDEK/Ogolne.xaml View File

@@ -4,41 +4,55 @@
4 4
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
5 5
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
6 6
              xmlns:local="clr-namespace:JPK_VDEK"
7
-             mc:Ignorable="d" d:DesignWidth="750" Height="639.797">
8
-    <Grid Margin="0,0,0.4,-57.4">
9
-        <Label Content="Podaj plik jpk IGL" HorizontalAlignment="Left" Margin="20,10,0,0" VerticalAlignment="Top" Width="123"/>
10
-        <Label Content="Podaj plik jpk SAP" HorizontalAlignment="Left" Margin="20,41,0,0" VerticalAlignment="Top" Width="123"/>
11
-        <TextBox x:Name="tigl" HorizontalAlignment="Left" Height="23" Margin="164,13,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="411" Grid.ColumnSpan="2"/>
12
-        <TextBox x:Name="tgl" HorizontalAlignment="Left" Height="23" Margin="164,44,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="411" Grid.ColumnSpan="2"/>
13
-        <Label Content="Podaj plik jpk scalony" HorizontalAlignment="Left" Margin="20,67,0,0" VerticalAlignment="Top" Width="123"/>
14
-        <TextBox x:Name="tscal" HorizontalAlignment="Left" Height="23" Margin="164,72,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="411" Grid.ColumnSpan="2"/>
15
-        <Button HorizontalAlignment="Left" Margin="580,13,0,0" VerticalAlignment="Top" Width="26" Click="Button_Click">
7
+             mc:Ignorable="d" d:DesignWidth="750" Height="788.997">
8
+    <Grid Margin="0,0,0,127">
9
+        <Grid.ColumnDefinitions>
10
+            <ColumnDefinition Width="3*"/>
11
+            <ColumnDefinition Width="47*"/>
12
+        </Grid.ColumnDefinitions>
13
+        <Label Content="Podaj plik jpk IGL" HorizontalAlignment="Left" Margin="20,10,0,0" VerticalAlignment="Top" Width="123" Grid.ColumnSpan="2"/>
14
+        <Label Content="Podaj plik jpk SAP" HorizontalAlignment="Left" Margin="20,41,0,0" VerticalAlignment="Top" Width="123" Grid.ColumnSpan="2"/>
15
+        <TextBox x:Name="tigl" HorizontalAlignment="Left" Height="23" Margin="119,13,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="411" Grid.Column="1"/>
16
+        <TextBox x:Name="tgl" HorizontalAlignment="Left" Height="23" Margin="119,44,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="411" Grid.Column="1"/>
17
+        <Label Content="Podaj plik jpk scalony" HorizontalAlignment="Left" Margin="20,67,0,0" VerticalAlignment="Top" Width="123" Grid.ColumnSpan="2"/>
18
+        <TextBox x:Name="tscal" HorizontalAlignment="Left" Height="23" Margin="119,72,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="411" Grid.Column="1"/>
19
+        <Button HorizontalAlignment="Left" Margin="535,13,0,0" VerticalAlignment="Top" Width="26" Click="Button_Click" Grid.Column="1">
16 20
             <DockPanel>
17 21
                 <Image Source="icons8-browse-folder-32.png"/>
18 22
             </DockPanel>
19 23
         </Button>
20
-        <Button  HorizontalAlignment="Left" Margin="580,44,0,0" VerticalAlignment="Top" Width="26" RenderTransformOrigin="0.577,2.55" Click="Button_Click_1">
24
+        <Button  HorizontalAlignment="Left" Margin="535,44,0,0" VerticalAlignment="Top" Width="26" RenderTransformOrigin="0.577,2.55" Click="Button_Click_1" Grid.Column="1">
21 25
             <DockPanel>
22 26
                 <Image Source="icons8-browse-folder-32.png"/>
23 27
             </DockPanel>
24 28
         </Button>
25
-        <Button  HorizontalAlignment="Left" Margin="580,75,0,0" VerticalAlignment="Top" Width="26" Click="Button_Click_2">
29
+        <Button  HorizontalAlignment="Left" Margin="535,75,0,0" VerticalAlignment="Top" Width="26" Click="Button_Click_2" Grid.Column="1">
26 30
             <DockPanel>
27 31
                 <Image Source="icons8-browse-folder-32.png"/>
28 32
             </DockPanel>
29 33
         </Button>
30
-        <Button Content="1. Scal JPK" HorizontalAlignment="Left" Margin="152,273,0,0" VerticalAlignment="Top" Width="89" Click="Button_Click_4"/>
31
-        <Button Content="2. Zapisz JPK" HorizontalAlignment="Left" Margin="246,273,0,0" VerticalAlignment="Top" Width="89" Click="Button_Click_5"/>
32
-        <Button Content="3. Zapisz DB" HorizontalAlignment="Left" Margin="340,273,0,0" VerticalAlignment="Top" Width="89" RenderTransformOrigin="1.382,0.6" Click="Button_Click_6"/>
33
-        <Button Content="0. Wczytaj" HorizontalAlignment="Left" Margin="636,78,0,0" VerticalAlignment="Top" Width="89" Click="Button_Click_3"/>
34
-        <GroupBox Header="Pliki OUT" HorizontalAlignment="Left" Height="123" Margin="10,145,0,0" VerticalAlignment="Top" Width="730">
34
+        <Button Content="1. Scal JPK" HorizontalAlignment="Left" Margin="107,273,0,0" VerticalAlignment="Top" Width="89" Click="Button_Click_4" Grid.Column="1"/>
35
+        <Button Content="2. Zapisz JPK" HorizontalAlignment="Left" Margin="201,273,0,0" VerticalAlignment="Top" Width="89" Click="Button_Click_5" Grid.Column="1"/>
36
+        <Button Content="3. Zapisz DB" HorizontalAlignment="Left" Margin="295,273,0,0" VerticalAlignment="Top" Width="89" RenderTransformOrigin="1.382,0.6" Click="Button_Click_6" Grid.Column="1"/>
37
+        <Button Content="0. Wczytaj" HorizontalAlignment="Left" Margin="591,78,0,0" VerticalAlignment="Top" Width="89" Click="Button_Click_3" Grid.Column="1"/>
38
+        <GroupBox Header="Pliki OUT" HorizontalAlignment="Left" Height="123" Margin="10,145,0,0" VerticalAlignment="Top" Width="730" Grid.ColumnSpan="2">
35 39
             <local:OutFile HorizontalAlignment="Left" Height="100" Margin="10,0,0,0" VerticalAlignment="Top" Width="696"/>
36 40
         </GroupBox>
37
-        <Label Content="Numer JPK 0 - pierwszy 1,2... korekty " HorizontalAlignment="Left" Margin="20,114,0,0" VerticalAlignment="Top" RenderTransformOrigin="-4.789,-0.154"/>
38
-        <TextBox x:Name="tkor" HorizontalAlignment="Left" Height="23" Margin="232,114,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Top" Width="120"/>
39
-        <Button x:Name="bgen" Content="4. Wczytaj" HorizontalAlignment="Left" Margin="636,47,0,0" VerticalAlignment="Top" Width="89" Click="bgen_Click"/>
40
-        <GroupBox Header="Sap" HorizontalAlignment="Left" Height="154" Margin="10,297,0,0" VerticalAlignment="Top" Width="730">
41
-            <local:JpkSap HorizontalAlignment="Left" Height="127" Margin="10,0,0,0" VerticalAlignment="Top" Width="684"/>
41
+        <Label Content="Numer JPK 0 - pierwszy 1,2... korekty " HorizontalAlignment="Left" Margin="20,114,0,0" VerticalAlignment="Top" RenderTransformOrigin="-4.789,-0.154" Grid.ColumnSpan="2"/>
42
+        <TextBox x:Name="tkor" HorizontalAlignment="Left" Height="23" Margin="187,114,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Top" Width="120" Grid.Column="1"/>
43
+        <Button x:Name="bgen" Content="4. Wczytaj" HorizontalAlignment="Left" Margin="591,47,0,0" VerticalAlignment="Top" Width="89" Click="bgen_Click" Grid.Column="1"/>
44
+        <GroupBox Header="Sap" HorizontalAlignment="Left" Height="120" Margin="10,527,0,0" VerticalAlignment="Top" Width="730" Grid.ColumnSpan="2">
45
+            <local:JpkSap x:Name="jpksap" HorizontalAlignment="Left" Height="127" Margin="16,-6,0,0" VerticalAlignment="Top" Width="684" RenderTransformOrigin="0.5,0.5">
46
+                <local:JpkSap.RenderTransform>
47
+                    <TransformGroup>
48
+                        <ScaleTransform/>
49
+                        <SkewTransform AngleX="-0.355"/>
50
+                        <RotateTransform/>
51
+                        <TranslateTransform X="0.394"/>
52
+                    </TransformGroup>
53
+                </local:JpkSap.RenderTransform>
54
+            </local:JpkSap>
42 55
         </GroupBox>
56
+        <local:AddDec HorizontalAlignment="Left" Height="229" Margin="10,298,0,0" VerticalAlignment="Top" Width="715" Grid.ColumnSpan="2"/>
43 57
     </Grid>
44 58
 </UserControl>

+ 68
- 47
JPK_VDEK/Ogolne.xaml.cs View File

@@ -25,9 +25,11 @@ namespace JPK_VDEK
25 25
     public partial class Ogolne : UserControl
26 26
     {
27 27
         public MainWindow win { get; set; }
28
+        
28 29
         public Ogolne()
29 30
         {
30 31
             InitializeComponent();
32
+           
31 33
         }
32 34
 
33 35
         private void Button_Click(object sender, RoutedEventArgs e)
@@ -45,6 +47,7 @@ namespace JPK_VDEK
45 47
 
46 48
         private void Button_Click_1(object sender, RoutedEventArgs e)
47 49
         {
50
+
48 51
             OpenFileDialog openFileDialog = new OpenFileDialog();
49 52
             openFileDialog.Multiselect = false;
50 53
             openFileDialog.Title = "Podaj plik do przetworzenia GL";
@@ -106,18 +109,19 @@ namespace JPK_VDEK
106 109
             }
107 110
             try
108 111
             {
109
-                using (StreamReader sr = new StreamReader(path))
112
+                Mouse.OverrideCursor = System.Windows.Input.Cursors.Wait;
113
+                using (StreamReader sr = new StreamReader(path, Encoding.Default))
110 114
                 {
111 115
                     string line = sr.ReadLine();
112 116
                     atr = line.Split('|');
113 117
 
118
+
114 119
                     JpkData.getJpk().Naglowek.KodUrzedu = TKodUS.Item0271;
115 120
                     JpkData.getJpk().UsNazwa = "DOLNOŚLĄSKI URZĄD SKARBOWY WE WROCŁAWJU";
116 121
 
117 122
                     JpkData.getJpk().Naglowek.Rok = atr[1].Substring(0, 4);
118 123
                     JpkData.getJpk().Naglowek.Miesiac = Convert.ToSByte(atr[1].Substring(4, 2));
119 124
                     JpkData.getJpk().Naglowek.DataWytworzeniaJPK = new DateTime(Convert.ToInt16(atr[3].Substring(0, 4)), Convert.ToInt16(atr[3].Substring(4, 2)), Convert.ToInt16(atr[3].Substring(6, 2)));
120
-                    JpkData.getJpk().Naglowek.CelZlozenia.Value = 1;
121 125
 
122 126
                     TPodmiotDowolnyBezAdresuOsobaNiefizyczna fir = new TPodmiotDowolnyBezAdresuOsobaNiefizyczna();
123 127
                     JG jgos = new JG();
@@ -140,6 +144,7 @@ namespace JPK_VDEK
140 144
                         {
141 145
                             JpkData.getJpk().Deklaracja.PozycjeSzczegolowe = new PozycjeSzczegolowe();
142 146
                             PozycjeSzczegolowe d1 = JpkData.getJpk().Deklaracja.PozycjeSzczegolowe;
147
+                           
143 148
                             d1.P_10 = atr[2] ;
144 149
                             d1.P_11 = atr[3];
145 150
                             d1.P_12 = atr[4];
@@ -274,7 +279,7 @@ namespace JPK_VDEK
274 279
                             }
275 280
                             d1.P_68 = atr[60];
276 281
                             d1.P_69 = atr[61];
277
-                            d1.P_ORDZU = atr[62];
282
+                            d1.P_ORDZU = "";
278 283
                             JpkData.getJpk().Deklaracja.Pouczenia = Convert.ToDecimal(atr[63].Replace('.', ',')); 
279 284
                         }
280 285
                        
@@ -282,6 +287,7 @@ namespace JPK_VDEK
282 287
                         {
283 288
                             liczbaWSp++;
284 289
                             JPKSprzedazWiersz spw = new JPKSprzedazWiersz();
290
+                            JPKSprzedazWierszExt spwext = new JPKSprzedazWierszExt();
285 291
                             spw.LpSprzedazy = atr[0];
286 292
                             spw.DataSprzedazy = new DateTime(Convert.ToInt16(atr[3].Substring(0, 4)), Convert.ToInt16(atr[3].Substring(4, 2)), Convert.ToInt16(atr[3].Substring(6, 2)));
287 293
                             spw.DataWystawienia = new DateTime(Convert.ToInt16(atr[4].Substring(0, 4)), Convert.ToInt16(atr[4].Substring(4, 2)), Convert.ToInt16(atr[4].Substring(6, 2)));
@@ -350,25 +356,28 @@ namespace JPK_VDEK
350 356
                             JpkData.getJpk().Sumy.SprzedazVAT_Marza += spw.SprzedazVAT_Marza;
351 357
 
352 358
 
353
-                            spw.NrKontrahenta = atr[46];
359
+                            spw.NrKontrahenta = atr[48];
360
+
361
+                            spw.KodKrajuNadaniaTIN = atr[50];
354 362
 
355
-                            spw.KodKrajuNadaniaTIN = atr[48];
356
-                            if (atr[49].Equals("WEW"))
363
+                            if (atr[51].Equals("WEW"))
357 364
                             {
358 365
                                 spw.TypDokumentu = TDowoduSprzedazy.WEW;
366
+                                spwext.TypDokumentuExt = "WEW";
359 367
                             }
360
-                            if (atr[49].Equals("RO"))
368
+                            if (atr[51].Equals("RO"))
361 369
                             {
362 370
                                 spw.TypDokumentu = TDowoduSprzedazy.RO;
371
+                                spwext.TypDokumentuExt = "RO";
363 372
                             }
364
-                            if (atr[49].Equals("FP"))
373
+                            if (atr[51].Equals("FP"))
365 374
                             {
366 375
                                 spw.TypDokumentu = TDowoduSprzedazy.FP;
376
+                                spwext.TypDokumentuExt = "FP";
367 377
                             }
368
-
369 378
                             spw.GTU_01 = 0;
370 379
                             spw.GTU_02 = 0;
371
-                            if (atr[50].Equals("X"))
380
+                            if (atr[52].Equals("X"))
372 381
                             {
373 382
                                 spw.GTU_03 = 1;
374 383
                             }
@@ -377,7 +386,7 @@ namespace JPK_VDEK
377 386
                                 spw.GTU_03 = 0;
378 387
                             }
379 388
                             spw.GTU_04 = 0;
380
-                            if (atr[51].Equals("X"))
389
+                            if (atr[53].Equals("X"))
381 390
                             {
382 391
                                 spw.GTU_05 = 1;
383 392
                             }
@@ -385,7 +394,7 @@ namespace JPK_VDEK
385 394
                             {
386 395
                                 spw.GTU_05 = 0;
387 396
                             }
388
-                            if (atr[52].Equals("X"))
397
+                            if (atr[54].Equals("X"))
389 398
                             {
390 399
                                 spw.GTU_06 = 1;
391 400
                             }
@@ -393,7 +402,7 @@ namespace JPK_VDEK
393 402
                             {
394 403
                                 spw.GTU_06 = 0;
395 404
                             }
396
-                            if (atr[53].Equals("X"))
405
+                            if (atr[55].Equals("X"))
397 406
                             {
398 407
                                 spw.GTU_07 = 1;
399 408
                             }
@@ -403,7 +412,7 @@ namespace JPK_VDEK
403 412
                             }
404 413
                             spw.GTU_08 = 0;
405 414
                             spw.GTU_09 = 0;
406
-                            if (atr[54].Equals("X"))
415
+                            if (atr[56].Equals("X"))
407 416
                             {
408 417
                                 spw.GTU_10 = 1;
409 418
                             }
@@ -412,7 +421,7 @@ namespace JPK_VDEK
412 421
                                 spw.GTU_10 = 0;
413 422
                             }
414 423
                             spw.GTU_11 = 0;
415
-                            if (atr[55].Equals("X"))
424
+                            if (atr[57].Equals("X"))
416 425
                             {
417 426
                                 spw.GTU_12 = 1;
418 427
                             }
@@ -420,7 +429,7 @@ namespace JPK_VDEK
420 429
                             {
421 430
                                 spw.GTU_12 = 0;
422 431
                             }
423
-                            if (atr[56].Equals("X"))
432
+                            if (atr[58].Equals("X"))
424 433
                             {
425 434
                                 spw.GTU_13 = 1;
426 435
                             }
@@ -428,7 +437,7 @@ namespace JPK_VDEK
428 437
                             {
429 438
                                 spw.GTU_13 = 0;
430 439
                             }
431
-                            if (atr[57].Equals("X"))
440
+                            if (atr[59].Equals("X"))
432 441
                             {
433 442
                                 spw.SW = 1;
434 443
                             }
@@ -436,7 +445,7 @@ namespace JPK_VDEK
436 445
                             {
437 446
                                 spw.SW = 0;
438 447
                             }
439
-                            if (atr[58].Equals("X"))
448
+                            if (atr[60].Equals("X"))
440 449
                             {
441 450
                                 spw.EE = 1;
442 451
                             }
@@ -444,7 +453,7 @@ namespace JPK_VDEK
444 453
                             {
445 454
                                 spw.EE = 0;
446 455
                             }
447
-                            if (atr[59].Equals("X"))
456
+                            if (atr[61].Equals("X"))
448 457
                             {
449 458
                                 spw.TP = 1;
450 459
                             }
@@ -452,7 +461,7 @@ namespace JPK_VDEK
452 461
                             {
453 462
                                 spw.TP = 0;
454 463
                             }
455
-                            if (atr[60].Equals("X"))
464
+                            if (atr[62].Equals("X"))
456 465
                             {
457 466
                                 spw.TT_WNT = 1;
458 467
                             }
@@ -460,7 +469,7 @@ namespace JPK_VDEK
460 469
                             {
461 470
                                 spw.TT_WNT = 0;
462 471
                             }
463
-                            if (atr[61].Equals("X"))
472
+                            if (atr[63].Equals("X"))
464 473
                             {
465 474
                                 spw.TT_D = 1;
466 475
                             }
@@ -468,7 +477,7 @@ namespace JPK_VDEK
468 477
                             {
469 478
                                 spw.TT_D = 0;
470 479
                             }
471
-                            if (atr[62].Equals("X"))
480
+                            if (atr[64].Equals("X"))
472 481
                             {
473 482
                                 spw.MR_T = 1;
474 483
                             }
@@ -476,7 +485,7 @@ namespace JPK_VDEK
476 485
                             {
477 486
                                 spw.MR_T = 0;
478 487
                             }
479
-                            if (atr[63].Equals("X"))
488
+                            if (atr[65].Equals("X"))
480 489
                             {
481 490
                                 spw.MR_UZ = 1;
482 491
                             }
@@ -484,7 +493,7 @@ namespace JPK_VDEK
484 493
                             {
485 494
                                 spw.MR_UZ = 0;
486 495
                             }
487
-                            if (atr[64].Equals("X"))
496
+                            if (atr[66].Equals("X"))
488 497
                             {
489 498
                                 spw.I_42 = 1;
490 499
                             }
@@ -492,7 +501,7 @@ namespace JPK_VDEK
492 501
                             {
493 502
                                 spw.I_42 = 0;
494 503
                             }
495
-                            if (atr[65].Equals("X"))
504
+                            if (atr[67].Equals("X"))
496 505
                             {
497 506
                                 spw.I_63 = 1;
498 507
                             }
@@ -500,7 +509,7 @@ namespace JPK_VDEK
500 509
                             {
501 510
                                 spw.I_63 = 0;
502 511
                             }
503
-                            if (atr[65].Equals("X"))
512
+                            if (atr[68].Equals("X"))
504 513
                             {
505 514
                                 spw.B_SPV = 1;
506 515
                             }
@@ -508,7 +517,7 @@ namespace JPK_VDEK
508 517
                             {
509 518
                                 spw.B_SPV = 0;
510 519
                             }
511
-                            if (atr[66].Equals("X"))
520
+                            if (atr[69].Equals("X"))
512 521
                             {
513 522
                                 spw.B_SPV_DOSTAWA = 1;
514 523
                             }
@@ -516,7 +525,7 @@ namespace JPK_VDEK
516 525
                             {
517 526
                                 spw.B_SPV_DOSTAWA = 0;
518 527
                             }
519
-                            if (atr[67].Equals("X"))
528
+                            if (atr[70].Equals("X"))
520 529
                             {
521 530
                                 spw.B_MPV_PROWIZJA = 1;
522 531
                             }
@@ -524,7 +533,7 @@ namespace JPK_VDEK
524 533
                             {
525 534
                                 spw.B_MPV_PROWIZJA = 0;
526 535
                             }
527
-                            if (atr[68].Equals("X"))
536
+                            if (atr[71].Equals("X"))
528 537
                             {
529 538
                                 spw.MPP = 1;
530 539
                             }
@@ -532,7 +541,7 @@ namespace JPK_VDEK
532 541
                             {
533 542
                                 spw.MPP = 0;
534 543
                             }
535
-                            if (atr[69].Equals("X"))
544
+                            if (atr[72].Equals("X"))
536 545
                             {
537 546
                                 spw.KorektaPodstawyOpodt = 1;
538 547
                             }
@@ -540,46 +549,51 @@ namespace JPK_VDEK
540 549
                             {
541 550
                                 spw.KorektaPodstawyOpodt = 0;
542 551
                             }
552
+                            spwext.CopyFromBase(spw);
543 553
                             JpkData.getJpk().SprzedazWiersz.Add(spw);
544
-                            JpkData.getJpk().ViewSP.Add(spw);
554
+                            JpkData.getJpk().ViewSP.Add(spwext);
545 555
                         }
546 556
                         if (atr[1].Equals("Z"))
547 557
                         {
548 558
                             liczbaWZp++;
549 559
                             JPKZakupWiersz zaw = new JPKZakupWiersz();
560
+                            JJPKZakupWierszExt zawext = new JJPKZakupWierszExt();
550 561
                             zaw.LpZakupu = atr[0];
551 562
 
552 563
                             zaw.DowodZakupu = atr[5];
553 564
                             zaw.NazwaDostawcy = atr[6];
554
-                            zaw.NrDostawcy = atr[46];
565
+                            zaw.NrDostawcy = atr[48];
555 566
                             zaw.DataWplywu = new DateTime(Convert.ToInt16(atr[3].Substring(0, 4)), Convert.ToInt16(atr[3].Substring(4, 2)), Convert.ToInt16(atr[3].Substring(6, 2)));
556 567
                             zaw.DataZakupu = new DateTime(Convert.ToInt16(atr[4].Substring(0, 4)), Convert.ToInt16(atr[4].Substring(4, 2)), Convert.ToInt16(atr[4].Substring(6, 2)));
557 568
 
558 569
                             zaw.K_40 = Convert.ToDecimal(atr[38].Replace('.', ','));
559 570
                             zaw.K_41 = Convert.ToDecimal(atr[39].Replace('.', ','));
560
-                            zaw.K_42 = Convert.ToDecimal(atr[40].Replace('.', ','));
561
-                            zaw.K_43 = Convert.ToDecimal(atr[41].Replace('.', ','));
571
+                            zaw.K_42 = Convert.ToDecimal(atr[42].Replace('.', ','));
572
+                            zaw.K_43 = Convert.ToDecimal(atr[43].Replace('.', ','));
562 573
 
563
-                            zaw.K_44 = Convert.ToDecimal(atr[42].Replace('.', ','));
564
-                            zaw.K_45 = Convert.ToDecimal(atr[43].Replace('.', ','));
565
-                            zaw.K_46 = Convert.ToDecimal(atr[44].Replace('.', ','));
566
-                            zaw.K_47 = Convert.ToDecimal(atr[45].Replace('.', ','));
574
+                            zaw.K_44 = Convert.ToDecimal(atr[44].Replace('.', ','));
575
+                            zaw.K_45 = Convert.ToDecimal(atr[45].Replace('.', ','));
576
+                            zaw.K_46 = Convert.ToDecimal(atr[46].Replace('.', ','));
577
+                            zaw.K_47 = Convert.ToDecimal(atr[47].Replace('.', ','));
567 578
 
568
-                            zaw.KodKrajuNadaniaTIN = atr[48];
579
+                            zaw.KodKrajuNadaniaTIN = atr[50];
569 580
 
570
-                            if (atr[49].Equals("MK"))
581
+                            if (atr[51].Equals("MK"))
571 582
                             {
572 583
                                 zaw.DokumentZakupu = TDowoduZakupu.MK;
584
+                                zawext.TypDokumentuExt = "MK";
573 585
                             }
574
-                            if (atr[49].Equals("VAT_RR"))
586
+                            if (atr[51].Equals("VAT_RR"))
575 587
                             {
576 588
                                 zaw.DokumentZakupu = TDowoduZakupu.VAT_RR;
589
+                                zawext.TypDokumentuExt = "VAT_RR";
577 590
                             }
578
-                            if (atr[49].Equals("WEW"))
591
+                            if (atr[51].Equals("WEW"))
579 592
                             {
580 593
                                 zaw.DokumentZakupu = TDowoduZakupu.WEW;
594
+                                zawext.TypDokumentuExt = "WEW";
581 595
                             }
582
-                            if (atr[68].Equals("X"))
596
+                            if (atr[70].Equals("X"))
583 597
                             {
584 598
                                 zaw.MPP = 1;
585 599
                             }
@@ -587,7 +601,7 @@ namespace JPK_VDEK
587 601
                             {
588 602
                                 zaw.MPP = 0;
589 603
                             }
590
-                            if (atr[70].Equals("X"))
604
+                            if (atr[72].Equals("X"))
591 605
                             {
592 606
                                 zaw.IMP = 1;
593 607
                             }
@@ -595,8 +609,10 @@ namespace JPK_VDEK
595 609
                             {
596 610
                                 zaw.IMP = 0;
597 611
                             }
598
-                            zaw.ZakupVAT_Marza = Convert.ToDecimal(atr[71].Replace('.', ','));
599
-
612
+                            if (!atr[73].Equals(""))
613
+                            {
614
+                                zaw.ZakupVAT_Marza = Convert.ToDecimal(atr[73].Replace('.', ','));
615
+                            }
600 616
                             JpkData.getJpk().Sumy.K_40 += zaw.K_40;
601 617
                             JpkData.getJpk().Sumy.K_41 += zaw.K_41;
602 618
                             JpkData.getJpk().Sumy.K_42 += zaw.K_42;
@@ -609,16 +625,21 @@ namespace JPK_VDEK
609 625
 
610 626
                             podNali = podNali + zaw.K_41 + zaw.K_43 + zaw.K_44 + zaw.K_45 + zaw.K_46 + zaw.K_47;
611 627
                             JpkData.getJpk().ZakupWiersz.Add(zaw);
612
-                            JpkData.getJpk().ViewZA.Add(zaw);
628
+                            JpkData.getJpk().ZakupWiersz.Add(zaw);
629
+                            zawext.CopyFromBase(zaw);
630
+                            JpkData.getJpk().ViewZA.Add(zawext);
613 631
                         }
614 632
                     }
615 633
                     JpkData.getJpk().SprzedazCtrl.LiczbaWierszySprzedazy = liczbaWSp.ToString();
616 634
                     JpkData.getJpk().SprzedazCtrl.PodatekNalezny = podNal;
617 635
                     JpkData.getJpk().ZakupCtrl.LiczbaWierszyZakupow = liczbaWZp.ToString();
618 636
                     JpkData.getJpk().ZakupCtrl.PodatekNaliczony = podNali;
637
+
619 638
                 }
620 639
                 JpkData.getJpk().wczytalemGL = true;
621 640
                 win.DataContext = JpkData.getJpk();
641
+                Mouse.OverrideCursor = null;
642
+                MessageBox.Show("Wczytano plik","JPK_VDEK");
622 643
             }
623 644
             catch (FileNotFoundException ex)
624 645
             {

+ 1
- 1
JPK_VDEK/SPwiersz.xaml View File

@@ -27,7 +27,7 @@
27 27
                 <DataGridTextColumn Header="DowodSprzedazy"   Binding="{Binding DowodSprzedazy}" />
28 28
                 <DataGridTextColumn Header="DataWystawienia"  Binding="{Binding DataWystawienia, StringFormat=dd-MM-yyyy}"  />
29 29
                 <DataGridTextColumn Header="DataSprzedazy"   Binding="{Binding DataSprzedazy, StringFormat=dd-MM-yyyy}" />
30
-                <DataGridTextColumn Header="TypDokumentu"  Binding="{Binding TypDokumentu}" />
30
+                <DataGridTextColumn Header="TypDokumentu"  Binding="{Binding TypDokumentuExt}" />
31 31
                 <DataGridTextColumn Header="GTU_01"  Binding="{Binding GTU_01}" />
32 32
                 <DataGridTextColumn Header="GTU_02"  Binding="{Binding GTU_02}" />
33 33
                 <DataGridTextColumn Header="GTU_03"  Binding="{Binding GTU_03}"/>

+ 116
- 26
JPK_VDEK/Schemat_JPK_V7M(1)_v1-0.Designer.cs View File

@@ -1,7 +1,7 @@
1 1
 // ------------------------------------------------------------------------------
2 2
 //  <auto-generated>
3 3
 //    Generated by Xsd2Code++. Version 5.0.0.47. www.xsd2code.com
4
-//    <NameSpace>JPK_VDEK</NameSpace><Collection>List</Collection><codeType>CSharp</codeType><EnableDataBinding>False</EnableDataBinding><GenerateCloneMethod>False</GenerateCloneMethod><GenerateDataContracts>False</GenerateDataContracts><DataMemberNameArg>OnlyIfDifferent</DataMemberNameArg><DataMemberOnXmlIgnore>False</DataMemberOnXmlIgnore><CodeBaseTag>Net20</CodeBaseTag><InitializeFields>None</InitializeFields><GenerateUnusedComplexTypes>False</GenerateUnusedComplexTypes><GenerateUnusedSimpleTypes>True</GenerateUnusedSimpleTypes><GenerateXMLAttributes>True</GenerateXMLAttributes><OrderXMLAttrib>False</OrderXMLAttrib><EnableLazyLoading>False</EnableLazyLoading><VirtualProp>False</VirtualProp><PascalCase>False</PascalCase><AutomaticProperties>True</AutomaticProperties><PropNameSpecified>None</PropNameSpecified><PrivateFieldName>StartWithUnderscore</PrivateFieldName><PrivateFieldNamePrefix></PrivateFieldNamePrefix><EnableRestriction>False</EnableRestriction><RestrictionMaxLenght>False</RestrictionMaxLenght><RestrictionRegEx>False</RestrictionRegEx><RestrictionRange>False</RestrictionRange><ValidateProperty>False</ValidateProperty><ClassNamePrefix></ClassNamePrefix><ClassLevel>Public</ClassLevel><PartialClass>True</PartialClass><ClassesInSeparateFiles>False</ClassesInSeparateFiles><ClassesInSeparateFilesDir></ClassesInSeparateFilesDir><TrackingChangesEnable>False</TrackingChangesEnable><GenTrackingClasses>False</GenTrackingClasses><HidePrivateFieldInIDE>False</HidePrivateFieldInIDE><EnableSummaryComment>False</EnableSummaryComment><EnableAppInfoSettings>False</EnableAppInfoSettings><EnableExternalSchemasCache>False</EnableExternalSchemasCache><EnableDebug>False</EnableDebug><EnableWarn>False</EnableWarn><ExcludeImportedTypes>False</ExcludeImportedTypes><ExpandNesteadAttributeGroup>False</ExpandNesteadAttributeGroup><CleanupCode>False</CleanupCode><EnableXmlSerialization>True</EnableXmlSerialization><SerializeMethodName>Serialize</SerializeMethodName><DeserializeMethodName>Deserialize</DeserializeMethodName><SaveToFileMethodName>SaveToFile</SaveToFileMethodName><LoadFromFileMethodName>LoadFromFile</LoadFromFileMethodName><EnableEncoding>False</EnableEncoding><EnableXMLIndent>False</EnableXMLIndent><IndentChar>Indent2Space</IndentChar><NewLineAttr>False</NewLineAttr><OmitXML>False</OmitXML><Encoder>UTF8</Encoder><Serializer>XmlSerializer</Serializer><sspNullable>False</sspNullable><sspString>False</sspString><sspCollection>False</sspCollection><sspComplexType>False</sspComplexType><sspSimpleType>False</sspSimpleType><sspEnumType>False</sspEnumType><XmlSerializerEvent>False</XmlSerializerEvent><BaseClassName>EntityBase</BaseClassName><UseBaseClass>False</UseBaseClass><GenBaseClass>False</GenBaseClass><CustomUsings></CustomUsings><AttributesToExlude></AttributesToExlude>
4
+//    <NameSpace>JPK_VDEK</NameSpace><Collection>List</Collection><codeType>CSharp</codeType><EnableDataBinding>False</EnableDataBinding><GenerateCloneMethod>False</GenerateCloneMethod><GenerateDataContracts>False</GenerateDataContracts><DataMemberNameArg>OnlyIfDifferent</DataMemberNameArg><DataMemberOnXmlIgnore>False</DataMemberOnXmlIgnore><CodeBaseTag>Net20</CodeBaseTag><InitializeFields>None</InitializeFields><GenerateUnusedComplexTypes>False</GenerateUnusedComplexTypes><GenerateUnusedSimpleTypes>True</GenerateUnusedSimpleTypes><GenerateXMLAttributes>True</GenerateXMLAttributes><OrderXMLAttrib>False</OrderXMLAttrib><EnableLazyLoading>False</EnableLazyLoading><VirtualProp>False</VirtualProp><PascalCase>False</PascalCase><AutomaticProperties>True</AutomaticProperties><PropNameSpecified>None</PropNameSpecified><PrivateFieldName>StartWithUnderscore</PrivateFieldName><PrivateFieldNamePrefix></PrivateFieldNamePrefix><EnableRestriction>False</EnableRestriction><RestrictionMaxLenght>False</RestrictionMaxLenght><RestrictionRegEx>False</RestrictionRegEx><RestrictionRange>False</RestrictionRange><ValidateProperty>False</ValidateProperty><ClassNamePrefix></ClassNamePrefix><ClassLevel>Public</ClassLevel><PartialClass>True</PartialClass><ClassesInSeparateFiles>False</ClassesInSeparateFiles><ClassesInSeparateFilesDir></ClassesInSeparateFilesDir><TrackingChangesEnable>False</TrackingChangesEnable><GenTrackingClasses>False</GenTrackingClasses><HidePrivateFieldInIDE>False</HidePrivateFieldInIDE><EnableSummaryComment>False</EnableSummaryComment><EnableAppInfoSettings>False</EnableAppInfoSettings><EnableExternalSchemasCache>False</EnableExternalSchemasCache><EnableDebug>False</EnableDebug><EnableWarn>False</EnableWarn><ExcludeImportedTypes>False</ExcludeImportedTypes><ExpandNesteadAttributeGroup>False</ExpandNesteadAttributeGroup><CleanupCode>False</CleanupCode><EnableXmlSerialization>True</EnableXmlSerialization><SerializeMethodName>Serialize</SerializeMethodName><DeserializeMethodName>Deserialize</DeserializeMethodName><SaveToFileMethodName>SaveToFile</SaveToFileMethodName><LoadFromFileMethodName>LoadFromFile</LoadFromFileMethodName><EnableEncoding>False</EnableEncoding><EnableXMLIndent>False</EnableXMLIndent><IndentChar>Indent2Space</IndentChar><NewLineAttr>False</NewLineAttr><OmitXML>False</OmitXML><Encoder>UTF8</Encoder><Serializer>XmlSerializer</Serializer><sspNullable>True</sspNullable><sspString>False</sspString><sspCollection>False</sspCollection><sspComplexType>False</sspComplexType><sspSimpleType>False</sspSimpleType><sspEnumType>True</sspEnumType><XmlSerializerEvent>False</XmlSerializerEvent><BaseClassName>EntityBase</BaseClassName><UseBaseClass>False</UseBaseClass><GenBaseClass>False</GenBaseClass><CustomUsings></CustomUsings><AttributesToExlude></AttributesToExlude>
5 5
 //  </auto-generated>
6 6
 // ------------------------------------------------------------------------------
7 7
 #pragma warning disable
@@ -19,7 +19,7 @@ namespace JPK_VDEK
19 19
     using System.Collections.Generic;
20 20
 
21 21
 
22
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
22
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
23 23
     [System.SerializableAttribute()]
24 24
     [System.Diagnostics.DebuggerStepThroughAttribute()]
25 25
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -28,6 +28,8 @@ namespace JPK_VDEK
28 28
     public partial class PozycjeSzczegolowe
29 29
     {
30 30
 
31
+        private bool _shouldSerializeItemElementName;
32
+
31 33
         private string _p_10;
32 34
 
33 35
         private string _p_11;
@@ -760,6 +762,7 @@ namespace JPK_VDEK
760 762
             set
761 763
             {
762 764
                 this._itemElementName = value;
765
+                _shouldSerializeItemElementName = true;
763 766
             }
764 767
         }
765 768
 
@@ -925,6 +928,18 @@ namespace JPK_VDEK
925 928
             }
926 929
         }
927 930
 
931
+        /// <summary>
932
+        /// Test whether ItemElementName should be serialized
933
+        /// </summary>
934
+        public virtual bool ShouldSerializeItemElementName()
935
+        {
936
+            if (_shouldSerializeItemElementName)
937
+            {
938
+                return true;
939
+            }
940
+            return (ItemElementName != default(ItemChoiceType));
941
+        }
942
+
928 943
         #region Serialize/Deserialize
929 944
         /// <summary>
930 945
         /// Serializes current PozycjeSzczegolowe object into an XML string
@@ -1106,7 +1121,7 @@ namespace JPK_VDEK
1106 1121
         }
1107 1122
     }
1108 1123
 
1109
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
1124
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
1110 1125
     [System.SerializableAttribute()]
1111 1126
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://jpk.mf.gov.pl/wzor/2019/11/06/11061/", IncludeInSchema = false)]
1112 1127
     public enum ItemChoiceType
@@ -1125,7 +1140,7 @@ namespace JPK_VDEK
1125 1140
         P_58,
1126 1141
     }
1127 1142
 
1128
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
1143
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
1129 1144
     [System.SerializableAttribute()]
1130 1145
     [System.Diagnostics.DebuggerStepThroughAttribute()]
1131 1146
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -1429,7 +1444,7 @@ namespace JPK_VDEK
1429 1444
         }
1430 1445
     }
1431 1446
 
1432
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
1447
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
1433 1448
     [System.SerializableAttribute()]
1434 1449
     [System.Diagnostics.DebuggerStepThroughAttribute()]
1435 1450
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -1632,7 +1647,7 @@ namespace JPK_VDEK
1632 1647
         }
1633 1648
     }
1634 1649
 
1635
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
1650
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
1636 1651
     [System.SerializableAttribute()]
1637 1652
     [System.Diagnostics.DebuggerStepThroughAttribute()]
1638 1653
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -1640,6 +1655,8 @@ namespace JPK_VDEK
1640 1655
     public partial class TNaglowek
1641 1656
     {
1642 1657
 
1658
+        private bool _shouldSerializeKodUrzedu;
1659
+
1643 1660
         private TNaglowekKodFormularza _kodFormularza;
1644 1661
 
1645 1662
         private sbyte _wariantFormularza;
@@ -1732,6 +1749,7 @@ namespace JPK_VDEK
1732 1749
             set
1733 1750
             {
1734 1751
                 this._kodUrzedu = value;
1752
+                _shouldSerializeKodUrzedu = true;
1735 1753
             }
1736 1754
         }
1737 1755
 
@@ -1796,6 +1814,18 @@ namespace JPK_VDEK
1796 1814
             }
1797 1815
         }
1798 1816
 
1817
+        /// <summary>
1818
+        /// Test whether KodUrzedu should be serialized
1819
+        /// </summary>
1820
+        public virtual bool ShouldSerializeKodUrzedu()
1821
+        {
1822
+            if (_shouldSerializeKodUrzedu)
1823
+            {
1824
+                return true;
1825
+            }
1826
+            return (KodUrzedu != default(TKodUS));
1827
+        }
1828
+
1799 1829
         #region Serialize/Deserialize
1800 1830
         /// <summary>
1801 1831
         /// Serializes current TNaglowek object into an XML string
@@ -1977,7 +2007,7 @@ namespace JPK_VDEK
1977 2007
         }
1978 2008
     }
1979 2009
 
1980
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
2010
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
1981 2011
     [System.SerializableAttribute()]
1982 2012
     [System.Diagnostics.DebuggerStepThroughAttribute()]
1983 2013
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -1985,6 +2015,8 @@ namespace JPK_VDEK
1985 2015
     public partial class TNaglowekKodFormularza
1986 2016
     {
1987 2017
 
2018
+        private bool _shouldSerializeValue;
2019
+
1988 2020
         private string _kodSystemowy;
1989 2021
 
1990 2022
         private string _wersjaSchemy;
@@ -2035,6 +2067,7 @@ namespace JPK_VDEK
2035 2067
             set
2036 2068
             {
2037 2069
                 this._value = value;
2070
+                _shouldSerializeValue = true;
2038 2071
             }
2039 2072
         }
2040 2073
 
@@ -2050,6 +2083,18 @@ namespace JPK_VDEK
2050 2083
             }
2051 2084
         }
2052 2085
 
2086
+        /// <summary>
2087
+        /// Test whether Value should be serialized
2088
+        /// </summary>
2089
+        public virtual bool ShouldSerializeValue()
2090
+        {
2091
+            if (_shouldSerializeValue)
2092
+            {
2093
+                return true;
2094
+            }
2095
+            return (Value != default(TKodFormularza));
2096
+        }
2097
+
2053 2098
         #region Serialize/Deserialize
2054 2099
         /// <summary>
2055 2100
         /// Serializes current TNaglowekKodFormularza object into an XML string
@@ -2231,7 +2276,7 @@ namespace JPK_VDEK
2231 2276
         }
2232 2277
     }
2233 2278
 
2234
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
2279
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
2235 2280
     [System.SerializableAttribute()]
2236 2281
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://jpk.mf.gov.pl/wzor/2019/11/06/11061/")]
2237 2282
     public enum TKodFormularza
@@ -2241,7 +2286,7 @@ namespace JPK_VDEK
2241 2286
         JPK_VAT,
2242 2287
     }
2243 2288
 
2244
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
2289
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
2245 2290
     [System.SerializableAttribute()]
2246 2291
     [System.Diagnostics.DebuggerStepThroughAttribute()]
2247 2292
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -2479,7 +2524,7 @@ namespace JPK_VDEK
2479 2524
         }
2480 2525
     }
2481 2526
 
2482
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
2527
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
2483 2528
     [System.SerializableAttribute()]
2484 2529
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://crd.gov.pl/xml/schematy/dziedzinowe/mf/2018/08/24/eD/DefinicjeTypy/")]
2485 2530
     public enum TKodUS
@@ -4086,7 +4131,7 @@ namespace JPK_VDEK
4086 4131
         Item3271,
4087 4132
     }
4088 4133
 
4089
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
4134
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
4090 4135
     [System.SerializableAttribute()]
4091 4136
     [System.Diagnostics.DebuggerStepThroughAttribute()]
4092 4137
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -4094,6 +4139,8 @@ namespace JPK_VDEK
4094 4139
     public partial class TNaglowekKodFormularzaDekl
4095 4140
     {
4096 4141
 
4142
+        private bool _shouldSerializeValue;
4143
+
4097 4144
         private string _kodSystemowy;
4098 4145
 
4099 4146
         private string _kodPodatku;
@@ -4176,6 +4223,7 @@ namespace JPK_VDEK
4176 4223
             set
4177 4224
             {
4178 4225
                 this._value = value;
4226
+                _shouldSerializeValue = true;
4179 4227
             }
4180 4228
         }
4181 4229
 
@@ -4191,6 +4239,18 @@ namespace JPK_VDEK
4191 4239
             }
4192 4240
         }
4193 4241
 
4242
+        /// <summary>
4243
+        /// Test whether Value should be serialized
4244
+        /// </summary>
4245
+        public virtual bool ShouldSerializeValue()
4246
+        {
4247
+            if (_shouldSerializeValue)
4248
+            {
4249
+                return true;
4250
+            }
4251
+            return (Value != default(TKodFormularzaVAT7));
4252
+        }
4253
+
4194 4254
         #region Serialize/Deserialize
4195 4255
         /// <summary>
4196 4256
         /// Serializes current TNaglowekKodFormularzaDekl object into an XML string
@@ -4372,7 +4432,7 @@ namespace JPK_VDEK
4372 4432
         }
4373 4433
     }
4374 4434
 
4375
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
4435
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
4376 4436
     [System.SerializableAttribute()]
4377 4437
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://jpk.mf.gov.pl/wzor/2019/11/06/11061/")]
4378 4438
     public enum TKodFormularzaVAT7
@@ -4383,7 +4443,7 @@ namespace JPK_VDEK
4383 4443
         VAT7,
4384 4444
     }
4385 4445
 
4386
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
4446
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
4387 4447
     [System.SerializableAttribute()]
4388 4448
     [System.Diagnostics.DebuggerStepThroughAttribute()]
4389 4449
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -4606,7 +4666,7 @@ namespace JPK_VDEK
4606 4666
         }
4607 4667
     }
4608 4668
 
4609
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
4669
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
4610 4670
     [System.SerializableAttribute()]
4611 4671
     [System.Diagnostics.DebuggerStepThroughAttribute()]
4612 4672
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -4825,7 +4885,7 @@ namespace JPK_VDEK
4825 4885
         }
4826 4886
     }
4827 4887
 
4828
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
4888
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
4829 4889
     [System.SerializableAttribute()]
4830 4890
     [System.Diagnostics.DebuggerStepThroughAttribute()]
4831 4891
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -5058,7 +5118,7 @@ namespace JPK_VDEK
5058 5118
         }
5059 5119
     }
5060 5120
 
5061
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
5121
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
5062 5122
     [System.SerializableAttribute()]
5063 5123
     [System.Diagnostics.DebuggerStepThroughAttribute()]
5064 5124
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -5320,7 +5380,7 @@ namespace JPK_VDEK
5320 5380
         }
5321 5381
     }
5322 5382
 
5323
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
5383
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
5324 5384
     [System.SerializableAttribute()]
5325 5385
     [System.Diagnostics.DebuggerStepThroughAttribute()]
5326 5386
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -5553,7 +5613,7 @@ namespace JPK_VDEK
5553 5613
         }
5554 5614
     }
5555 5615
 
5556
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
5616
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
5557 5617
     [System.SerializableAttribute()]
5558 5618
     [System.Diagnostics.DebuggerStepThroughAttribute()]
5559 5619
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -5785,7 +5845,7 @@ namespace JPK_VDEK
5785 5845
         }
5786 5846
     }
5787 5847
 
5788
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
5848
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
5789 5849
     [System.SerializableAttribute()]
5790 5850
     [System.Diagnostics.DebuggerStepThroughAttribute()]
5791 5851
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -6016,7 +6076,7 @@ namespace JPK_VDEK
6016 6076
         }
6017 6077
     }
6018 6078
 
6019
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
6079
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
6020 6080
     [System.SerializableAttribute()]
6021 6081
     [System.Diagnostics.DebuggerStepThroughAttribute()]
6022 6082
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -6024,6 +6084,8 @@ namespace JPK_VDEK
6024 6084
     public partial class JPKSprzedazWiersz
6025 6085
     {
6026 6086
 
6087
+        private bool _shouldSerializeTypDokumentu;
6088
+
6027 6089
         private string _lpSprzedazy;
6028 6090
 
6029 6091
         private string _kodKrajuNadaniaTIN;
@@ -6256,6 +6318,7 @@ namespace JPK_VDEK
6256 6318
             set
6257 6319
             {
6258 6320
                 this._typDokumentu = value;
6321
+                _shouldSerializeTypDokumentu = true;
6259 6322
             }
6260 6323
         }
6261 6324
 
@@ -6931,6 +6994,18 @@ namespace JPK_VDEK
6931 6994
             }
6932 6995
         }
6933 6996
 
6997
+        /// <summary>
6998
+        /// Test whether TypDokumentu should be serialized
6999
+        /// </summary>
7000
+        public virtual bool ShouldSerializeTypDokumentu()
7001
+        {
7002
+            if (_shouldSerializeTypDokumentu)
7003
+            {
7004
+                return true;
7005
+            }
7006
+            return (TypDokumentu != default(TDowoduSprzedazy));
7007
+        }
7008
+
6934 7009
         #region Serialize/Deserialize
6935 7010
         /// <summary>
6936 7011
         /// Serializes current JPKSprzedazWiersz object into an XML string
@@ -7112,7 +7187,7 @@ namespace JPK_VDEK
7112 7187
         }
7113 7188
     }
7114 7189
 
7115
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
7190
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
7116 7191
     [System.SerializableAttribute()]
7117 7192
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://jpk.mf.gov.pl/wzor/2019/11/06/11061/")]
7118 7193
     public enum TDowoduSprzedazy
@@ -7128,7 +7203,7 @@ namespace JPK_VDEK
7128 7203
         FP,
7129 7204
     }
7130 7205
 
7131
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
7206
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
7132 7207
     [System.SerializableAttribute()]
7133 7208
     [System.Diagnostics.DebuggerStepThroughAttribute()]
7134 7209
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -7360,7 +7435,7 @@ namespace JPK_VDEK
7360 7435
         }
7361 7436
     }
7362 7437
 
7363
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
7438
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
7364 7439
     [System.SerializableAttribute()]
7365 7440
     [System.Diagnostics.DebuggerStepThroughAttribute()]
7366 7441
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -7368,6 +7443,8 @@ namespace JPK_VDEK
7368 7443
     public partial class JPKZakupWiersz
7369 7444
     {
7370 7445
 
7446
+        private bool _shouldSerializeDokumentZakupu;
7447
+
7371 7448
         private string _lpZakupu;
7372 7449
 
7373 7450
         private string _kodKrajuNadaniaTIN;
@@ -7506,6 +7583,7 @@ namespace JPK_VDEK
7506 7583
             set
7507 7584
             {
7508 7585
                 this._dokumentZakupu = value;
7586
+                _shouldSerializeDokumentZakupu = true;
7509 7587
             }
7510 7588
         }
7511 7589
 
@@ -7653,6 +7731,18 @@ namespace JPK_VDEK
7653 7731
             }
7654 7732
         }
7655 7733
 
7734
+        /// <summary>
7735
+        /// Test whether DokumentZakupu should be serialized
7736
+        /// </summary>
7737
+        public virtual bool ShouldSerializeDokumentZakupu()
7738
+        {
7739
+            if (_shouldSerializeDokumentZakupu)
7740
+            {
7741
+                return true;
7742
+            }
7743
+            return (DokumentZakupu != default(TDowoduZakupu));
7744
+        }
7745
+
7656 7746
         #region Serialize/Deserialize
7657 7747
         /// <summary>
7658 7748
         /// Serializes current JPKZakupWiersz object into an XML string
@@ -7834,7 +7924,7 @@ namespace JPK_VDEK
7834 7924
         }
7835 7925
     }
7836 7926
 
7837
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
7927
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
7838 7928
     [System.SerializableAttribute()]
7839 7929
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://jpk.mf.gov.pl/wzor/2019/11/06/11061/")]
7840 7930
     public enum TDowoduZakupu
@@ -7850,7 +7940,7 @@ namespace JPK_VDEK
7850 7940
         WEW,
7851 7941
     }
7852 7942
 
7853
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
7943
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
7854 7944
     [System.SerializableAttribute()]
7855 7945
     [System.Diagnostics.DebuggerStepThroughAttribute()]
7856 7946
     [System.ComponentModel.DesignerCategoryAttribute("code")]
@@ -8082,7 +8172,7 @@ namespace JPK_VDEK
8082 8172
         }
8083 8173
     }
8084 8174
 
8085
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3752.0")]
8175
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.8.3761.0")]
8086 8176
     [System.SerializableAttribute()]
8087 8177
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://jpk.mf.gov.pl/wzor/2019/11/06/11061/")]
8088 8178
     [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://jpk.mf.gov.pl/wzor/2019/11/06/11061/", IsNullable = false)]

+ 1
- 1
JPK_VDEK/ZaWie.xaml View File

@@ -25,7 +25,7 @@
25 25
                 <DataGridTextColumn Header="DowodZakupu" Binding="{Binding Path=DowodZakupu}"/>
26 26
                 <DataGridTextColumn Header="DataZakupu" Binding="{Binding Path=DataZakupu , StringFormat=dd-MM-yyyy}"/>
27 27
                 <DataGridTextColumn Header="DataWplywu" Binding="{Binding Path=DataWplywu , StringFormat=dd-MM-yyyy}"/>
28
-                <DataGridTextColumn Header="DokumentZakupu" Binding="{Binding Path=DokumentZakupu}"/>
28
+                <DataGridTextColumn Header="DokumentZakupu" Binding="{Binding Path=TypDokumentuExt}"/>
29 29
                 <DataGridTextColumn Header="MPP" Binding="{Binding Path=MPP}"/>
30 30
                 <DataGridTextColumn Header="IMP" Binding="{Binding Path=IMP}"/>
31 31
                 <DataGridTextColumn Header="K_40" Binding="{Binding Path=K_40}"/>