当前位置: 首页>>代码示例>>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;未经允许,请勿转载。