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

(-)a/acqui/basket.pl (-3 / +1 lines)
Lines 115-121 if ( $op eq 'delete_confirm' ) { Link Here
115
#Delete all orders included in that basket, and all items received.
115
#Delete all orders included in that basket, and all items received.
116
    foreach my $myorder (@orders){
116
    foreach my $myorder (@orders){
117
        DelOrder($myorder->{biblionumber},$myorder->{ordernumber});
117
        DelOrder($myorder->{biblionumber},$myorder->{ordernumber});
118
        warn "suppression de ".$myorder->{biblionumber}.'  '.$myorder->{ordernumber};
119
    }
118
    }
120
# if $delbiblio = 1, delete the records if possible
119
# if $delbiblio = 1, delete the records if possible
121
    if ((defined $delbiblio)and ($delbiblio ==1)){
120
    if ((defined $delbiblio)and ($delbiblio ==1)){
Lines 126-134 if ( $op eq 'delete_confirm' ) { Link Here
126
            my @subscriptions = GetSubscriptionsId ($biblionumber);
125
            my @subscriptions = GetSubscriptionsId ($biblionumber);
127
            my $itemcount = GetItemsCount($biblionumber);
126
            my $itemcount = GetItemsCount($biblionumber);
128
            DelBiblio($myorder->{biblionumber}) if ($countbiblio == 0 && $itemcount == 0 && !(@subscriptions));
127
            DelBiblio($myorder->{biblionumber}) if ($countbiblio == 0 && $itemcount == 0 && !(@subscriptions));
129
        warn "suppression de la notice ".$myorder->{biblionumber}};
128
        }
130
    }
129
    }
131
132
 # delete the basket
130
 # delete the basket
133
    DelBasket($basketno,);
131
    DelBasket($basketno,);
134
    $template->param( delete_confirmed => 1 );
132
    $template->param( delete_confirmed => 1 );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt (-15 / +24 lines)
Lines 191-216 Link Here
191
                    [% END %]
191
                    [% END %]
192
                        <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>
192
                        <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>
193
                </div>
193
                </div>
194
            <!-- Modal for confirm deletion box-->
194
<!-- Modal for confirm deletion box-->
195
                <div class="modal hide" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true">
195
                <div class="modal hide" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true">
196
                    <div class="modal-header">
196
                    <div class="modal-header">
197
                        <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
197
                        <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
198
                        <h3>Confirm deletion</h3>
198
                        <h3>Confirm deletion</h3>
199
                    </div>
199
                    </div>
200
                    <div class="modal-body">
200
                    [% UNLESS book_foot_loop.size > 0 %]
201
                       <p>Are you sure you want to delete this basket?</p>
201
                        <div class="modal-body">
202
                       <p>Warning:</p>
202
                           <p>Are you sure you want to delete this basket?</p>
203
                       <p>All orders of this basket will be cancelled and used funds will be refunded.</p>
203
                        </div>
204
                       <p>If items have been created at ordering or receipt stage, they will be deleted.</p>
204
                        <div class="modal-footer">
205
                       <p>You can choose to delete records if possible (if they don't have any item attached, any subscription and any other order).</p>
205
                            <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
206
                    </div>
206
                            <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],0); return false;" >Delete basket</button>
207
                    <div class="modal-footer">
207
                        </div>
208
                        <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
208
                    [% ELSE %]
209
                        <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],0); return false;" >Delete basket and orders</button>
209
                        <div class="modal-body">
210
                        <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],1); return false;">Delete basket, orders and records</button>
210
                           <p>Are you sure you want to delete this basket?</p>
211
                    </div>
211
                           <p>Warning:</p>
212
                           <p>All orders of this basket will be cancelled and used funds will be refunded.</p>
213
                           <p>If items have been created when ordering or receiving, they will be deleted.</p>
214
                           <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>
215
                        </div>
216
                        <div class="modal-footer">
217
                            <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
218
                            <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],0); return false;" >Delete basket and orders</button>
219
                            <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],1); return false;">Delete basket, orders and records</button>
220
                        </div>
221
                    [% END %]
212
                </div>
222
                </div>
213
            <!-- End of Modal-->
223
<!-- End of Modal-->
214
            [% ELSE %]
224
            [% ELSE %]
215
                [% UNLESS ( grouped ) %]
225
                [% UNLESS ( grouped ) %]
216
                <div id="toolbar" class="btn-toolbar">
226
                <div id="toolbar" class="btn-toolbar">
217
- 

Return to bug 7791