Skip to content

Commit 3725fa6

Browse files
authored
Merge pull request #3545 from msupply-foundation/3543-fix-outbound-shipment-not-include-service-charge-in-total
3543 Fix outbound shipment not including service charge in total
2 parents 301e662 + d9fb776 commit 3725fa6

File tree

1 file changed

+3
-2
lines changed
  • server/service/src/invoice/outbound_shipment/update

1 file changed

+3
-2
lines changed

server/service/src/invoice/outbound_shipment/update/generate.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ fn lines_to_trim(
146146
}
147147

148148
// 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
150150

151151
let mut lines = InvoiceLineRepository::new(connection).query_by_filter(
152152
InvoiceLineFilter::new()
@@ -157,7 +157,8 @@ fn lines_to_trim(
157157
let mut empty_lines = InvoiceLineRepository::new(connection).query_by_filter(
158158
InvoiceLineFilter::new()
159159
.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()),
161162
)?;
162163

163164
if lines.is_empty() && empty_lines.is_empty() {

0 commit comments

Comments
 (0)