Why is there a discrepancy between the cargo booking screen and the database?
It is expected that when you are reporting on the Cargo Booking, it's displaying the last-saved values from the Cargo Booking, but you can update any lifting in that booking independently, and updating the lifting does not automatically update the booking.
The database is going to show the value from the last time the booking was viewed and saved.
There are instances where the booking/cargo will be different out of necessity (e.g. at one point, the booking contained a mix of confirmed/non-confirmed cargoes, so if you have a mix of confirmed/inquiry cargoes then the cargo status won't match the booking status, intentionally.)