View | Details | Raw Unified | Return to bug 17564
Collapse All | Expand All

(-)a/t/db_dependent/Acquisition/OrderUsers.t (-6 / +7 lines)
Lines 41-48 my $budget = C4::Budgets::GetBudget($budgetid); Link Here
41
my @ordernumbers;
41
my @ordernumbers;
42
my ( $biblionumber, $biblioitemnumber ) = C4::Biblio::AddBiblio( MARC::Record->new, '' );
42
my ( $biblionumber, $biblioitemnumber ) = C4::Biblio::AddBiblio( MARC::Record->new, '' );
43
43
44
my $ordernumber;
44
my $order = Koha::Acquisition::Order->new(
45
$ordernumber = Koha::Acquisition::Order->new(
46
    {
45
    {
47
        basketno         => $basketno,
46
        basketno         => $basketno,
48
        quantity         => 2,
47
        quantity         => 2,
Lines 57-63 $ordernumber = Koha::Acquisition::Order->new( Link Here
57
        rrp              => 10,
56
        rrp              => 10,
58
        ecost            => 10,
57
        ecost            => 10,
59
    }
58
    }
60
)->insert->{ordernumber};
59
)->insert;
60
my $ordernumber = $order->{ordernumber};
61
61
62
my $invoiceid = AddInvoice(
62
my $invoiceid = AddInvoice(
63
    invoicenumber => 'invoice',
63
    invoicenumber => 'invoice',
Lines 83-92 C4::Acquisition::ModOrderUsers( $ordernumber, $borrowernumber ); Link Here
83
my $is_added = grep { /^$borrowernumber$/ } C4::Acquisition::GetOrderUsers( $ordernumber );
83
my $is_added = grep { /^$borrowernumber$/ } C4::Acquisition::GetOrderUsers( $ordernumber );
84
is( $is_added, 1, 'ModOrderUsers should link patrons to an order' );
84
is( $is_added, 1, 'ModOrderUsers should link patrons to an order' );
85
85
86
$order = Koha::Acquisition::Order->fetch({ ordernumber => $ordernumber });
86
ModReceiveOrder(
87
ModReceiveOrder(
87
    {
88
    {
88
        biblionumber      => $biblionumber,
89
        biblionumber      => $biblionumber,
89
        ordernumber       => $ordernumber,
90
        order             => $order,
90
        quantityreceived  => 1,
91
        quantityreceived  => 1,
91
        cost              => 10,
92
        cost              => 10,
92
        ecost             => 10,
93
        ecost             => 10,
Lines 99-108 ModReceiveOrder( Link Here
99
my $messages = C4::Letters::GetQueuedMessages({ borrowernumber => $borrowernumber });
100
my $messages = C4::Letters::GetQueuedMessages({ borrowernumber => $borrowernumber });
100
is( scalar( @$messages ), 0, 'The letter has not been sent to message queue on receiving the order, the order is not entire received');
101
is( scalar( @$messages ), 0, 'The letter has not been sent to message queue on receiving the order, the order is not entire received');
101
102
103
$order = Koha::Acquisition::Order->fetch({ ordernumber => $ordernumber });
102
ModReceiveOrder(
104
ModReceiveOrder(
103
    {
105
    {
104
        biblionumber      => $biblionumber,
106
        biblionumber      => $biblionumber,
105
        ordernumber       => $ordernumber,
107
        order             => $order,
106
        quantityreceived  => 1,
108
        quantityreceived  => 1,
107
        cost              => 10,
109
        cost              => 10,
108
        ecost             => 10,
110
        ecost             => 10,
109
- 

Return to bug 17564