Revision 19df37e1
Von Bernd Bleßmann vor etwa 6 Jahren hinzugefügt
t/db_helper/convert_invoice.t | ||
---|---|---|
157 | 157 |
ok(($do1->closed) , 'Delivery Order is closed after conversion'); |
158 | 158 |
is($invoice->payment_terms->description, "14Tage 2%Skonto, 30Tage netto", 'payment term description check'); |
159 | 159 |
|
160 |
# some test data from original client invoice console (!) |
|
161 |
# my $invoice3 = SL::DB::Manager::Invoice->find_by( ordnumber => 'A16399' ); |
|
162 |
# which will fail due to PTC Calculation differs from GUI-Calculation, see issue: http://redmine.kivitendo-premium.de/issues/82 |
|
163 |
# pp $invoice3 |
|
164 |
# values from gui should be: |
|
165 |
#ok($invoice->amount == 1354.20000, 'amount check'); |
|
166 |
#ok($invoice->marge_percent == 50.88666, 'marge percent check'); |
|
167 |
#ok($invoice->marge_total == 579.08000, 'marge total check'); |
|
168 |
#ok($invoice->netamount == 1137.98000, 'netamount check'); |
|
169 |
|
|
170 |
|
|
171 |
# the values change if one reloads the object |
|
172 |
# without reloading we get this failures |
|
173 |
#not ok 17 - amount check |
|
174 |
# Failed test 'amount check' |
|
175 |
# at t/db_helper/convert_invoice.t line 272. |
|
176 |
# got: '1354.17' |
|
177 |
# expected: '1354.17000' |
|
178 |
#not ok 18 - marge percent check |
|
179 |
# Failed test 'marge percent check' |
|
180 |
# at t/db_helper/convert_invoice.t line 273. |
|
181 |
# got: '50.8857956342929' |
|
182 |
# expected: '50.88580' |
|
183 |
#not ok 19 - marge total check |
|
184 |
# Failed test 'marge total check' |
|
185 |
# at t/db_helper/convert_invoice.t line 274. |
|
186 |
# got: '579.06' |
|
187 |
# expected: '579.06000' |
|
188 |
#not ok 20 - netamount check |
|
189 |
# Failed test 'netamount check' |
|
190 |
# at t/db_helper/convert_invoice.t line 275. |
|
191 |
# got: '1137.96' |
|
192 |
# expected: '1137.96000' |
|
193 |
|
|
194 | 160 |
$invoice->load; |
195 | 161 |
|
196 | 162 |
is($invoice->cusordnumber , 'b84da' , 'cusordnumber check'); |
197 | 163 |
is($invoice->department->description , "Test Department" , 'department description ok'); |
198 |
is($invoice->amount , '1354.17000' , 'amount check');
|
|
199 |
is($invoice->marge_percent , '50.88580' , 'marge percent check');
|
|
200 |
is($invoice->marge_total , '579.06000' , 'marge total check');
|
|
201 |
is($invoice->netamount , '1137.96000' , 'netamount check');
|
|
164 |
is($invoice->amount , '1354.20000' , 'amount check');
|
|
165 |
is($invoice->marge_percent , '50.88666' , 'marge percent check');
|
|
166 |
is($invoice->marge_total , '579.08000' , 'marge total check');
|
|
167 |
is($invoice->netamount , '1137.98000' , 'netamount check');
|
|
202 | 168 |
|
203 | 169 |
# some item checks |
204 | 170 |
is($invoice->items_sorted->[0]->parts_id , $parts[0]->id , 'invoiceitem 1 linked with part'); |
... | ... | |
267 | 233 |
clear_up(); |
268 | 234 |
|
269 | 235 |
1; |
236 |
|
|
237 |
|
|
238 |
# vim: ft=perl |
|
239 |
# set emacs to perl mode |
|
240 |
# Local Variables: |
|
241 |
# mode: perl |
|
242 |
# End: |
Auch abrufbar als: Unified diff
t/db_helper/convert_invoice.t: Zahlen nach Rundungs-Patch f. PTC angepasst.
Neue Zahlen mit (zahlengleichen) Beispielen an der Oberfläche ermittelt.