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


PHP Transaction::setDate方法代码示例

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


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

示例1: readTransaction

 public static function readTransaction($str_xml)
 {
     // Parser
     $parser = new xmlParser($str_xml);
     // <transaction>
     $data = $parser->getResult('transaction');
     $transaction = new Transaction();
     // <transaction> <lastEventDate>
     if (isset($data["lastEventDate"])) {
         $transaction->setLastEventDate($data["lastEventDate"]);
     }
     // <transaction> <date>
     if (isset($data["date"])) {
         $transaction->setDate($data["date"]);
     }
     // <transaction> <code>
     if (isset($data["code"])) {
         $transaction->setCode($data["code"]);
     }
     // <transaction> <reference>
     if (isset($data["reference"])) {
         $transaction->setReference($data["reference"]);
     }
     // <transaction> <type>
     if (isset($data["type"])) {
         $transaction->setType(new TransactionType($data["type"]));
     }
     // <transaction> <status>
     if (isset($data["status"])) {
         $transaction->setStatus(new TransactionStatus($data["status"]));
     }
     if (isset($data["paymentMethod"]) && is_array($data["paymentMethod"])) {
         // <transaction> <paymentMethod>
         $paymentMethod = new PaymentMethod();
         // <transaction> <paymentMethod> <type>
         if (isset($data["paymentMethod"]['type'])) {
             $paymentMethod->setType(new PaymentMethodType($data["paymentMethod"]['type']));
         }
         // <transaction> <paymentMethod> <code>
         if (isset($data["paymentMethod"]['code'])) {
             $paymentMethod->setCode(new PaymentMethodCode($data["paymentMethod"]['code']));
         }
         $transaction->setPaymentMethod($paymentMethod);
     }
     // <transaction> <grossAmount>
     if (isset($data["grossAmount"])) {
         $transaction->setGrossAmount($data["grossAmount"]);
     }
     // <transaction> <discountAmount>
     if (isset($data["discountAmount"])) {
         $transaction->setDiscountAmount($data["discountAmount"]);
     }
     // <transaction> <feeAmount>
     if (isset($data["feeAmount"])) {
         $transaction->setFeeAmount($data["feeAmount"]);
     }
     // <transaction> <netAmount>
     if (isset($data["netAmount"])) {
         $transaction->setNetAmount($data["netAmount"]);
     }
     // <transaction> <extraAmount>
     if (isset($data["extraAmount"])) {
         $transaction->setExtraAmount($data["extraAmount"]);
     }
     // <transaction> <installmentCount>
     if (isset($data["installmentCount"])) {
         $transaction->setInstallmentCount($data["installmentCount"]);
     }
     if (isset($data["items"]['item']) && is_array($data["items"]['item'])) {
         $items = array();
         $i = 0;
         if (isset($data["items"]['item'][0])) {
             foreach ($data["items"]['item'] as $key => $value) {
                 $item = self::parseTransactionItem($value);
                 $items[$i] = $item;
                 $i++;
             }
         } else {
             $items[0] = self::parseTransactionItem($data["items"]['item']);
         }
         // <transaction> <items>
         $transaction->setItems($items);
     }
     if (isset($data["sender"])) {
         // <transaction> <sender>
         $sender = new Sender();
         // <transaction> <sender> <name>
         if (isset($data["sender"]["name"])) {
             $sender->setName($data["sender"]["name"]);
         }
         // <transaction> <sender> <email>
         if (isset($data["sender"]["email"])) {
             $sender->setEmail($data["sender"]["email"]);
         }
         if (isset($data["sender"]["phone"])) {
             // <transaction> <sender> <phone>
             $phone = new Phone();
             // <transaction> <sender> <phone> <areaCode>
             if (isset($data["sender"]["phone"]["areaCode"])) {
                 $phone->setAreaCode($data["sender"]["phone"]["areaCode"]);
//.........这里部分代码省略.........
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:101,代码来源:TransactionParser.class.php

示例2: header

<?php

require_once __DIR__ . "/../autoload/session.autoload.php";
require_once __DIR__ . "/../autoload/checkconnected.autoload.php";
require_once __DIR__ . "/../class/Network.class.php";
require_once __DIR__ . "/../class/Transaction.class.php";
require_once __DIR__ . "/../autoload/produitType.autoload.php";
if (!isset($_GET['date']) || !isset($_GET['magasin'])) {
    header("location:/");
}
$Transaction = new Transaction();
$Transaction->setDate($_GET['date']);
$Transaction->setMagasin($_GET['magasin']);
$global = $Transaction->getGlobalWithDATE();
?>

           <legend>Fiche Comptable du <?php 
echo $_GET['date'];
?>
 sur <?php 
echo $_GET['magasin'];
?>
</legend>

            <h3>Chiffre d'affaires : <?php 
echo $global['chiffre_journee'];
?>
 €</h3>

            <h4 class="margin-top-1">Entrées / sorties de valeur</h4>
开发者ID:alexzhxin,项目名称:erp.librairielabourse,代码行数:30,代码来源:buildfichecompta.postcall.php

示例3: Transaction

<?php

require_once __DIR__ . "/../class/Transaction.class.php";
if (isset($_POST)) {
    $Transaction = new Transaction();
    $Transaction->setNoTransaction($_POST['id']);
    $Transaction->setMagasin($_POST['magasin']);
    $Transaction->setDate($_POST['date']);
    echo $Transaction->getPrintedDetailledContainer();
}
开发者ID:alexzhxin,项目名称:erp.librairielabourse,代码行数:10,代码来源:buildtranscontainer.postcall.php


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