Discussions
Problem total results
9 months ago by Carly
hi. i have some problme, i cal the total stay (whitout clean service) . but in my "report" i have a different results
private function parse_reservation_data($reservation_data)
{
$source = $this->map_source($reservation_data['source']);
$parsed = [
'customer_full_name' => $reservation_data['guest']['name'],
'arrival' => $reservation_data['arrival'],
'departure' => $reservation_data['departure'],
'period' => $this->parse_reservation_period($reservation_data['arrival'], $reservation_data['departure']),
'income_vat' => $reservation_data['subtotals']['stay'],
'income' => $reservation_data['subtotals']['stay'],
'total_amount' => $reservation_data['total_amount'],
'source' => $source,
'source_deduction' => $this->calc_source_deduction($source, $reservation_data['total_amount']),
'people' => $reservation_data['rooms'][0]['people'],
'management_sl' => $this->calc_reservation_management_sl($reservation_data['subtotals']['stay']),
'management_sl_vat' => $this->calc_reservation_management_sl_vat($reservation_data['subtotals']['stay']),
'net_income' => $this->calc_reservation_net_income($reservation_data['total_amount'], $reservation_data['subtotals']['stay'], $source),
'wallet' => $this->calc_wallet($reservation_data['subtotals']['stay'])
];
return $parsed;
}
why i have a different total if i call your "Stay"
for a reservation in your sistem is 92€ in my report 87,85€