當前位置: 首頁>>代碼示例>>PHP>>正文


PHP project::hours_fit_in_calculated_amount方法代碼示例

本文整理匯總了PHP中project::hours_fit_in_calculated_amount方法的典型用法代碼示例。如果您正苦於以下問題:PHP project::hours_fit_in_calculated_amount方法的具體用法?PHP project::hours_fit_in_calculated_amount怎麽用?PHP project::hours_fit_in_calculated_amount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在project的用法示例。


在下文中一共展示了project::hours_fit_in_calculated_amount方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: foreach

     $error_level = 3;
 } else {
     if ($_POST['tariffs_id'] == '') {
         $error_level = 4;
     } else {
         if (!activity::validate('travel_distance', $_POST['activity_travel_distance'])) {
             $error_level = 5;
         } else {
             if (!activity::validate('expenses', $_POST['activity_expenses'])) {
                 $error_level = 6;
             } else {
                 if (activity::ticket_entry_is_required($_POST['tariffs_id']) && !tep_not_null($_POST['activity_ticket_number'])) {
                     // no ticket number when required
                     $error_level = 7;
                 } else {
                     if (!project::hours_fit_in_calculated_amount($_POST['projects_id'], activity::format('amount', $_POST['activity_amount']) - $_POST['original_activity_amount'], $_POST['selected_date']) && ($_POST['error_level_history'] != 32 || $_POST['previous_activity_amount'] != activity::format('amount', $_POST['activity_amount']))) {
                         // Exceeding calculated hours, the definite value is calculated by subtracting the original value
                         // (original_activity_amount, only available when editing an existing activity) from the entered value.
                         // When OK-ing the 2nd time (error_level_history==32) without changing the activity_amount value
                         // (tested with previous_activity_amount), the entry will be saved.
                         $error_level = 32;
                     } else {
                         // OK, entry can be saved
                         $_SESSION['timesheet']->save_activity($_POST['activity_id'], $_POST['selected_date'], $_POST['activity_amount'], $_POST['tariffs_id'], $_POST['activity_travel_distance'], $_POST['activity_travel_description'], $_POST['activity_expenses'], $_POST['activity_ticket_number'], $_POST['activity_comment']);
                         // Clear all values except mPath and period
                         foreach ($_POST as $key => $value) {
                             if ($key != 'mPath' && $key != 'period' && $key != 'sort_order') {
                                 $_POST[$key] = '';
                             }
                         }
                         // Reload the timesheet object in order to
開發者ID:BackupTheBerlios,項目名稱:bitts-svn,代碼行數:31,代碼來源:activity_entry.php


注:本文中的project::hours_fit_in_calculated_amount方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。