Lines 71-78
subtest 'total_outstanding() tests' => sub {
Link Here
|
71 |
|
71 |
|
72 |
my $credit_1 = Koha::Account::Line->new( |
72 |
my $credit_1 = Koha::Account::Line->new( |
73 |
{ borrowernumber => $patron->id, |
73 |
{ borrowernumber => $patron->id, |
74 |
debit_type_code => "OVERDUE", |
74 |
credit_type_code => "PAYMENT", |
75 |
status => "RETURNED", |
|
|
76 |
amount => -10, |
75 |
amount => -10, |
77 |
amountoutstanding => -10, |
76 |
amountoutstanding => -10, |
78 |
interface => 'commandline', |
77 |
interface => 'commandline', |
Lines 84-91
subtest 'total_outstanding() tests' => sub {
Link Here
|
84 |
|
83 |
|
85 |
my $credit_2 = Koha::Account::Line->new( |
84 |
my $credit_2 = Koha::Account::Line->new( |
86 |
{ borrowernumber => $patron->id, |
85 |
{ borrowernumber => $patron->id, |
87 |
debit_type_code => "OVERDUE", |
86 |
credit_type_code => "PAYMENT", |
88 |
status => "RETURNED", |
|
|
89 |
amount => -10, |
87 |
amount => -10, |
90 |
amountoutstanding => -10, |
88 |
amountoutstanding => -10, |
91 |
interface => 'commandline', |
89 |
interface => 'commandline', |
Lines 97-104
subtest 'total_outstanding() tests' => sub {
Link Here
|
97 |
|
95 |
|
98 |
my $credit_3 = Koha::Account::Line->new( |
96 |
my $credit_3 = Koha::Account::Line->new( |
99 |
{ borrowernumber => $patron->id, |
97 |
{ borrowernumber => $patron->id, |
100 |
debit_type_code => "OVERDUE", |
98 |
credit_type_code => "PAYMENT", |
101 |
status => "RETURNED", |
|
|
102 |
amount => -100, |
99 |
amount => -100, |
103 |
amountoutstanding => -100, |
100 |
amountoutstanding => -100, |
104 |
interface => 'commandline', |
101 |
interface => 'commandline', |
Lines 147-154
subtest 'total() tests' => sub {
Link Here
|
147 |
|
144 |
|
148 |
my $credit_1 = Koha::Account::Line->new( |
145 |
my $credit_1 = Koha::Account::Line->new( |
149 |
{ borrowernumber => $patron->id, |
146 |
{ borrowernumber => $patron->id, |
150 |
debit_type_code => "OVERDUE", |
147 |
credit_type_code => "PAYMENT", |
151 |
status => "RETURNED", |
|
|
152 |
amount => -10, |
148 |
amount => -10, |
153 |
amountoutstanding => -10, |
149 |
amountoutstanding => -10, |
154 |
interface => 'commandline', |
150 |
interface => 'commandline', |
Lines 160-167
subtest 'total() tests' => sub {
Link Here
|
160 |
|
156 |
|
161 |
my $credit_2 = Koha::Account::Line->new( |
157 |
my $credit_2 = Koha::Account::Line->new( |
162 |
{ borrowernumber => $patron->id, |
158 |
{ borrowernumber => $patron->id, |
163 |
debit_type_code => "OVERDUE", |
159 |
credit_type_code => "PAYMENT", |
164 |
status => "RETURNED", |
|
|
165 |
amount => -10, |
160 |
amount => -10, |
166 |
amountoutstanding => -10, |
161 |
amountoutstanding => -10, |
167 |
interface => 'commandline', |
162 |
interface => 'commandline', |
Lines 173-180
subtest 'total() tests' => sub {
Link Here
|
173 |
|
168 |
|
174 |
my $credit_3 = Koha::Account::Line->new( |
169 |
my $credit_3 = Koha::Account::Line->new( |
175 |
{ borrowernumber => $patron->id, |
170 |
{ borrowernumber => $patron->id, |
176 |
debit_type_code => "OVERDUE", |
171 |
credit_type_code => "PAYMENT", |
177 |
status => "RETURNED", |
|
|
178 |
amount => -100, |
172 |
amount => -100, |
179 |
amountoutstanding => -100, |
173 |
amountoutstanding => -100, |
180 |
interface => 'commandline', |
174 |
interface => 'commandline', |
Lines 223-230
subtest 'credits_total() tests' => sub {
Link Here
|
223 |
|
217 |
|
224 |
my $credit_1 = Koha::Account::Line->new( |
218 |
my $credit_1 = Koha::Account::Line->new( |
225 |
{ borrowernumber => $patron->id, |
219 |
{ borrowernumber => $patron->id, |
226 |
debit_type_code => "OVERDUE", |
220 |
credit_type_code => "PAYMENT", |
227 |
status => "RETURNED", |
|
|
228 |
amount => -10, |
221 |
amount => -10, |
229 |
amountoutstanding => -10, |
222 |
amountoutstanding => -10, |
230 |
interface => 'commandline', |
223 |
interface => 'commandline', |
Lines 236-243
subtest 'credits_total() tests' => sub {
Link Here
|
236 |
|
229 |
|
237 |
my $credit_2 = Koha::Account::Line->new( |
230 |
my $credit_2 = Koha::Account::Line->new( |
238 |
{ borrowernumber => $patron->id, |
231 |
{ borrowernumber => $patron->id, |
239 |
debit_type_code => "OVERDUE", |
232 |
credit_type_code => "PAYMENT", |
240 |
status => "RETURNED", |
|
|
241 |
amount => -10, |
233 |
amount => -10, |
242 |
amountoutstanding => -10, |
234 |
amountoutstanding => -10, |
243 |
interface => 'commandline', |
235 |
interface => 'commandline', |
Lines 249-256
subtest 'credits_total() tests' => sub {
Link Here
|
249 |
|
241 |
|
250 |
my $credit_3 = Koha::Account::Line->new( |
242 |
my $credit_3 = Koha::Account::Line->new( |
251 |
{ borrowernumber => $patron->id, |
243 |
{ borrowernumber => $patron->id, |
252 |
debit_type_code => "OVERDUE", |
244 |
credit_type_code => "PAYMENT", |
253 |
status => "RETURNED", |
|
|
254 |
amount => -100, |
245 |
amount => -100, |
255 |
amountoutstanding => -100, |
246 |
amountoutstanding => -100, |
256 |
interface => 'commandline', |
247 |
interface => 'commandline', |
Lines 299-306
subtest 'debits_total() tests' => sub {
Link Here
|
299 |
|
290 |
|
300 |
my $credit_1 = Koha::Account::Line->new( |
291 |
my $credit_1 = Koha::Account::Line->new( |
301 |
{ borrowernumber => $patron->id, |
292 |
{ borrowernumber => $patron->id, |
302 |
debit_type_code => "OVERDUE", |
293 |
credit_type_code => "PAYMENT", |
303 |
status => "RETURNED", |
|
|
304 |
amount => -10, |
294 |
amount => -10, |
305 |
amountoutstanding => 0, |
295 |
amountoutstanding => 0, |
306 |
interface => 'commandline', |
296 |
interface => 'commandline', |
Lines 312-319
subtest 'debits_total() tests' => sub {
Link Here
|
312 |
|
302 |
|
313 |
my $credit_2 = Koha::Account::Line->new( |
303 |
my $credit_2 = Koha::Account::Line->new( |
314 |
{ borrowernumber => $patron->id, |
304 |
{ borrowernumber => $patron->id, |
315 |
debit_type_code => "OVERDUE", |
305 |
credit_type_code => "PAYMENT", |
316 |
status => "RETURNED", |
|
|
317 |
amount => -10, |
306 |
amount => -10, |
318 |
amountoutstanding => 0, |
307 |
amountoutstanding => 0, |
319 |
interface => 'commandline', |
308 |
interface => 'commandline', |
Lines 325-332
subtest 'debits_total() tests' => sub {
Link Here
|
325 |
|
314 |
|
326 |
my $credit_3 = Koha::Account::Line->new( |
315 |
my $credit_3 = Koha::Account::Line->new( |
327 |
{ borrowernumber => $patron->id, |
316 |
{ borrowernumber => $patron->id, |
328 |
debit_type_code => "OVERDUE", |
317 |
credit_type_code => "PAYMENT", |
329 |
status => "RETURNED", |
|
|
330 |
amount => -100, |
318 |
amount => -100, |
331 |
amountoutstanding => 0, |
319 |
amountoutstanding => 0, |
332 |
interface => 'commandline', |
320 |
interface => 'commandline', |
333 |
- |
|
|