Holiday feature broken--can't add a new time #2715

This commit is contained in:
Daniel Camargo 2014-04-22 16:45:15 -03:00
parent 1c45f0fa4e
commit e4457eba4f
2 changed files with 3 additions and 4 deletions

View File

@ -48,7 +48,7 @@ class Controller_api_houroverride extends Crunchbutton_Controller_RestAccount {
$date_start_hr = $date_start_hour[ 0 ];
$date_start_mn = $date_start_hour[ 1 ];
$hour_override_date_start_ampm = $this->request()[ 'hour_override_date_start_ampm' ];
if( $hour_override_date_start_ampm == 'PM' ){
if( $hour_override_date_start_ampm == 'PM' && $date_start_hr < 12 ){
$date_start_hr = $date_start_hr + 12;
}
@ -61,7 +61,7 @@ class Controller_api_houroverride extends Crunchbutton_Controller_RestAccount {
$date_end_hr = $date_end_hour[ 0 ];
$date_end_mn = $date_end_hour[ 1 ];
$hour_override_date_end_ampm = $this->request()[ 'hour_override_date_end_ampm' ];
if( $hour_override_date_end_ampm == 'PM' ){
if( $hour_override_date_end_ampm == 'PM' && $date_end_hr < 12 ){
$date_end_hr = $date_end_hr + 12;
}

View File

@ -163,4 +163,3 @@ if( $date_end ){
</div>
<?php } ?>
</div>