Openbravo Issue Tracking System - POS2
View Issue Details
0049090POS2POSpublic2022-04-20 08:552022-04-20 10:39
ebecerra 
ebecerra 
normalmajorhave not tried
closedfixed 
5
 
 
No
0049090: Restaurant: Function "getRestaurantService" fail when service time is before 10:00 AM
When calls the function "getRestaurantService" before 10:00 AM always return "false".
1. In the BO configure a mealservice to start at: 01:00:00
2. In the BO configure another mealservice to start at: 10:30:00
3. Call the function "getRestaurantService" with argument time before 10:30 PM
Fixes in the file: GetRestaurantService.js the function: isValidHour

function isValidHour(hour, dayStartTime) {
  let serviceStartTime = new Date(dayStartTime).toLocaleTimeString();
  if (serviceStartTime.length < 8) {
    serviceStartTime = `0${serviceStartTime}`;
  }
  return hour >= serviceStartTime;
}

No tags attached.
Issue History
2022-04-20 08:55ebecerraNew Issue
2022-04-20 08:55ebecerraAssigned To => Retail
2022-04-20 08:55ebecerraTriggers an Emergency Pack => No
2022-04-20 09:03ebecerraSummaryRestaurant: Function "getRestaurantService" fail when time is before 10:00 AM => Restaurant: Function "getRestaurantService" fail when service time is before 10:00 AM
2022-04-20 09:03ebecerraSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=23930#r23930
2022-04-20 09:03ebecerraProposed Solution updated
2022-04-20 09:12ebecerraProposed Solution updated
2022-04-20 09:12ebecerraAssigned ToRetail => ebecerra
2022-04-20 09:12ebecerraStatusnew => scheduled
2022-04-20 09:50hgbotNote Added: 0136618
2022-04-20 10:39hgbotResolutionopen => fixed
2022-04-20 10:39hgbotStatusscheduled => closed
2022-04-20 10:39hgbotNote Added: 0136621
2022-04-20 10:39hgbotNote Added: 0136622

Notes
(0136618)
hgbot   
2022-04-20 09:50   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.restaurant/-/merge_requests/135 [^]
(0136621)
hgbot   
2022-04-20 10:39   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.restaurant [^]
Changeset: 7cba4dd21450f1566e88725919720c79c306439f
Author: Eduardo Becerra (OB) <eduardo.becerra@openbravo.com>
Date: 20-04-2022 08:39:40
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.restaurant/-/commit/7cba4dd21450f1566e88725919720c79c306439f [^]

Fixes ISSUE-49090: Restaurant: Function "getRestaurantService" fail when...

---
M web-jspack/org.openbravo.pos2.restaurant/src/model/meal-service/GetRestaurantService.js
---
(0136622)
hgbot   
2022-04-20 10:39   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.pos2.restaurant/-/merge_requests/135 [^]