File tree 1 file changed +3
-2
lines changed
server/service/src/invoice/outbound_shipment/update
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ fn lines_to_trim(
146
146
}
147
147
148
148
// If new invoice status is not new and previous invoice status is new
149
- // add all unallocated lines to be deleted
149
+ // add all unallocated lines or empty lines to be deleted
150
150
151
151
let mut lines = InvoiceLineRepository :: new ( connection) . query_by_filter (
152
152
InvoiceLineFilter :: new ( )
@@ -157,7 +157,8 @@ fn lines_to_trim(
157
157
let mut empty_lines = InvoiceLineRepository :: new ( connection) . query_by_filter (
158
158
InvoiceLineFilter :: new ( )
159
159
. invoice_id ( EqualFilter :: equal_to ( & invoice. id ) )
160
- . number_of_packs ( EqualFilter :: equal_to_f64 ( 0.0 ) ) ,
160
+ . number_of_packs ( EqualFilter :: equal_to_f64 ( 0.0 ) )
161
+ . r#type ( InvoiceLineRowType :: StockOut . equal_to ( ) ) ,
161
162
) ?;
162
163
163
164
if lines. is_empty ( ) && empty_lines. is_empty ( ) {
You can’t perform that action at this time.
0 commit comments