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

(-)a/acqui/basket.pl (-3 / +1 lines)
Lines 102-108 if ( $op eq 'delete_confirm' ) { Link Here
102
#Delete all orders included in that basket, and all items received.
102
#Delete all orders included in that basket, and all items received.
103
    foreach my $myorder (@orders){
103
    foreach my $myorder (@orders){
104
        DelOrder($myorder->{biblionumber},$myorder->{ordernumber});
104
        DelOrder($myorder->{biblionumber},$myorder->{ordernumber});
105
        warn "suppression de ".$myorder->{biblionumber}.'  '.$myorder->{ordernumber};
106
    }
105
    }
107
# if $delbiblio = 1, delete the records if possible
106
# if $delbiblio = 1, delete the records if possible
108
    if ((defined $delbiblio)and ($delbiblio ==1)){
107
    if ((defined $delbiblio)and ($delbiblio ==1)){
Lines 113-121 if ( $op eq 'delete_confirm' ) { Link Here
113
            my @subscriptions = GetSubscriptionsId ($biblionumber);
112
            my @subscriptions = GetSubscriptionsId ($biblionumber);
114
            my $itemcount = GetItemsCount($biblionumber);
113
            my $itemcount = GetItemsCount($biblionumber);
115
            DelBiblio($myorder->{biblionumber}) if ($countbiblio == 0 && $itemcount == 0 && !(@subscriptions));
114
            DelBiblio($myorder->{biblionumber}) if ($countbiblio == 0 && $itemcount == 0 && !(@subscriptions));
116
        warn "suppression de la notice ".$myorder->{biblionumber}};
115
        }
117
    }
116
    }
118
119
 # delete the basket
117
 # delete the basket
120
    DelBasket($basketno,);
118
    DelBasket($basketno,);
121
    $template->param( delete_confirmed => 1 );
119
    $template->param( delete_confirmed => 1 );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-16 / +25 lines)
Lines 153-178 Link Here
153
                    [% END %]
153
                    [% END %]
154
                        <div class="btn-group"><a href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="icon-download"></i> Export this basket as CSV</a></div>
154
                        <div class="btn-group"><a href="[% script_name %]?op=export&amp;basketno=[% basketno %]&amp;booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="icon-download"></i> Export this basket as CSV</a></div>
155
                </div>
155
                </div>
156
            <!-- Modal for confirm deletion box-->
156
<!-- Modal for confirm deletion box-->
157
                <div class="modal hide" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true">
157
                <div class="modal hide" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true">
158
                    <div class="modal-header">
158
                    <div class="modal-header">
159
                        <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
159
                        <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
160
                        <h3>Confirm deletion</h3>
160
                        <h3>Confirm deletion</h3>
161
                    </div>
161
                    </div>                    
162
                    <div class="modal-body">
162
                    [% UNLESS book_foot_loop.size > 0 %]
163
                       <p>Are you sure you want to delete this basket?</p>
163
                        <div class="modal-body">
164
                       <p>Warning:</p>
164
                           <p>Are you sure you want to delete this basket?</p>                        
165
                       <p>All orders of this basket will be cancelled and used funds will be refunded.</p>
165
                        </div>
166
                       <p>If items have been created at ordering or receipt stage, they will be deleted.</p>
166
                        <div class="modal-footer">
167
                       <p>You can choose to delete records if possible (if they don't have any item attached, any subscription and any other order).</p>
167
                            <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
168
                    </div>
168
                            <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],0); return false;" >Delete basket</button>                            
169
                    <div class="modal-footer">
169
                        </div>                    
170
                        <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
170
                    [% ELSE %]
171
                        <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],0); return false;" >Delete basket and orders</button>
171
                        <div class="modal-body">
172
                        <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],1); return false;">Delete basket, orders and records</button>
172
                           <p>Are you sure you want to delete this basket?</p>
173
                    </div>
173
                           <p>Warning:</p>                           
174
                           <p>All orders of this basket will be cancelled and used funds will be refunded.</p>
175
                           <p>If items have been created when ordering or receiving, they will be deleted.</p>
176
                           <p>You can choose to delete records if possible (if they don't have any item attached, any subscription and are not used in any other order).</p>
177
                        </div>
178
                        <div class="modal-footer">
179
                            <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
180
                            <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],0); return false;" >Delete basket and orders</button>
181
                            <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],1); return false;">Delete basket, orders and records</button>
182
                        </div>
183
                    [% END %]
174
                </div>
184
                </div>
175
            <!-- End of Modal-->
185
<!-- End of Modal-->
176
            [% ELSE %]
186
            [% ELSE %]
177
                [% UNLESS ( grouped ) %]
187
                [% UNLESS ( grouped ) %]
178
                <div id="toolbar" class="btn-toolbar">
188
                <div id="toolbar" class="btn-toolbar">
179
- 

Return to bug 7791