Lines 443-458
isnt( exists( $suppliers{$id_supplier4} ), 1, "Supplier4 hasnt late orders" )
Link Here
|
443 |
|
443 |
|
444 |
#Case 2: With $delay = 4 |
444 |
#Case 2: With $delay = 4 |
445 |
# today + 0 > now-$delay -NOT LATE- |
445 |
# today + 0 > now-$delay -NOT LATE- |
446 |
# (today-5) + 2 <= now() - $delay -NOT LATE- |
446 |
# (today-5) <= now() - $delay -NOT LATE- |
447 |
# (today-10) + 3 <= now() - $delay -LATE- |
447 |
# (today-10) <= now() - $delay -LATE- |
448 |
# quantityreceived = quantity -NOT LATE- |
448 |
# quantityreceived = quantity -NOT LATE- |
449 |
%suppliers = C4::Bookseller::GetBooksellersWithLateOrders( 4, undef, undef ); |
449 |
%suppliers = C4::Bookseller::GetBooksellersWithLateOrders( 4, undef, undef ); |
450 |
isnt( exists( $suppliers{$id_supplier1} ), |
450 |
isnt( exists( $suppliers{$id_supplier1} ), |
451 |
1, "Supplier1 has late orders but today > now() - 4 days" ); |
451 |
1, "Supplier1 has late orders but today > now() - 4 days" ); |
452 |
isnt( exists( $suppliers{$id_supplier2} ), |
452 |
isnt( exists( $suppliers{$id_supplier2} ), |
453 |
1, "Supplier2 has late orders and $daysago5 <= now() - (4 days+2)" ); |
453 |
1, "Supplier2 has late orders and $daysago5 <= now() - (4 days)" ); |
454 |
ok( exists( $suppliers{$id_supplier3} ), |
454 |
ok( exists( $suppliers{$id_supplier3} ), |
455 |
"Supplier3 has late orders and $daysago10 <= now() - (4 days+3)" ); |
455 |
"Supplier3 has late orders and $daysago10 <= now() - (4 days)" ); |
456 |
isnt( exists( $suppliers{$id_supplier4} ), 1, "Supplier4 hasnt late orders" ); |
456 |
isnt( exists( $suppliers{$id_supplier4} ), 1, "Supplier4 hasnt late orders" ); |
457 |
|
457 |
|
458 |
#Case 3: With $delay = -1 |
458 |
#Case 3: With $delay = -1 |
459 |
- |
|
|