If you use a non standard format that the strtotime function is capable to convert into timestamp, the total hours is zero and your prices are updated to zero.

in file includes/menu.inc

    $items = explode(',', $_POST['items']);
    $dates = array(
      strtotime($_POST['date'][0] . ' ' . $_POST['time'][0]),
      strtotime($_POST['date'][1] . ' ' . $_POST['time'][1]),
    );

  }

  $hours = round(($dates[1] - $dates[0]) / 3600, 2);
CommentFileSizeAuthor
#1 merci-1064696-1.patch795 bytes_toch
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

_toch’s picture

FileSize
795 bytes

Please find in attachment the patch I suggest.

The solution consists to use the function merci_convert_date_popup in order to convert the date considering the used format.

kreynen’s picture

Status: Active » Needs review

Most of the pricing settings and UI are being moved to a separate merci_pricing sub-module. This patch was committed there.

http://drupal.org/cvs?commit=503310

darrick’s picture

Project: MERCI (Manage Equipment Reservations, Checkout and Inventory) » MERCI Pricing
Version: 6.x-2.x-dev » 6.x-1.x-dev