当前位置: 首页>>代码示例>>PHP>>正文


PHP DateModules::GetMonth方法代码示例

本文整理汇总了PHP中DateModules::GetMonth方法的典型用法代码示例。如果您正苦于以下问题:PHP DateModules::GetMonth方法的具体用法?PHP DateModules::GetMonth怎么用?PHP DateModules::GetMonth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DateModules的用法示例。


在下文中一共展示了DateModules::GetMonth方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ProcessPayment

function ProcessPayment()
{
    $paymentCalcObj = new manage_payment_calculation();
    $paymentCalcObj->__YEAR = DateModules::GetYear($_POST["end_date"]);
    $paymentCalcObj->__MONTH = DateModules::GetMonth($_POST["end_date"]);
    $paymentCalcObj->__CALC_NORMALIZE_TAX = isset($_POST['tax_normalize']) ? "1" : "0";
    $paymentCalcObj->__START_NORMALIZE_TAX_MONTH = $_POST['tax_n_m'];
    $paymentCalcObj->__START_NORMALIZE_TAX_YEAR = $_POST['tax_normalized_year'];
    $paymentCalcObj->__BACKPAY_BEGIN_FROM = 1;
    $paymentCalcObj->__CALC_NEGATIVE_FICHE = isset($_POST['negative_fiche']) ? "1" : "0";
    $paymentCalcObj->month_start = DateModules::shamsi_to_miladi($_POST["start_date"]);
    $paymentCalcObj->month_end = DateModules::shamsi_to_miladi($_POST["end_date"]);
    $paymentCalcObj->__MONTH_LENGTH = ceil(DateModules::GDateMinusGDate($paymentCalcObj->month_end, $paymentCalcObj->month_start) + 1);
    $paymentCalcObj->__MSG = $_POST["message"];
    // <editor-fold defaultstate="collapsed" desc="Create Where" >
    $where = "1=1";
    $whereParam = array();
    if (!empty($_POST["from_staff_id"])) {
        $where .= " AND s.staff_id >= :fsid";
        $whereParam[":fsid"] = $_POST["from_staff_id"];
    }
    if (!empty($_POST["to_staff_id"])) {
        $where .= " AND s.staff_id <= :tsid";
        $whereParam[":tsid"] = $_POST["to_staff_id"];
    }
    // </editor-fold>
    $paymentCalcObj->__WHERE = $where;
    $paymentCalcObj->__WHEREPARAM = $whereParam;
    if (isset($_POST["compute_backpay"])) {
        $res = $paymentCalcObj->run_back();
    } else {
        $res = $paymentCalcObj->run();
    }
    if (!$res) {
        echo Response::createObjectiveResponse(false, ExceptionHandler::popExceptionDescription());
        die;
    } else {
        echo Response::createObjectiveResponse(true, $paymentCalcObj->success_counter . "_" . $paymentCalcObj->fail_counter);
        die;
    }
}
开发者ID:jafarkhani,项目名称:rtfund,代码行数:41,代码来源:payment.data.php

示例2: IsEditable

 static function IsEditable($row_no)
 {
     $dt = PdoDataAccess::runquery("select * from person_subtracts join person_subtract_flows using(subtract_id) where row_no=?", array($row_no));
     if ($dt[0]["IsFinished"] == "1") {
         return false;
     }
     $subtract_id = $dt[0]["subtract_id"];
     $flow_date = DateModules::miladi_to_shamsi($dt[0]["flow_date"]);
     $year = DateModules::GetYear($flow_date);
     $month = DateModules::GetMonth($flow_date);
     $dt = PdoDataAccess::runquery("select * from payment_items join payments using(payment_type,staff_id,pay_year,pay_month)\n\t\t\t\twhere param1 in('LOAN','FIX_FRACTION','FIX_BENEFIT')\n\t\t\t\t\tAND param2 = {$subtract_id} \n\t\t\t\t\tAND pay_year>={$year} \n\t\t\t\t\tAND if(pay_year={$year}, pay_month>={$month}, 1=1) \n\t\t\t\t\tAND\tif(pay_year={$year} AND pay_month={$month}, calc_date > '" . $dt[0]["flow_date"] . "', 1=1)");
     if (count($dt) > 0) {
         return false;
     }
     return true;
 }
开发者ID:jafarkhani,项目名称:rtfund,代码行数:16,代码来源:subtracts.class.php


注:本文中的DateModules::GetMonth方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。