1. PHP / Говнокод #13043

    +153

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    $payout_rate = isset( $transfer['draft'] ) ? ( $transfer['payout_rate'] == '' ? 0 : $transfer['payout_rate'] ) : 1;
            if( isset( $this->_drafts[$transfer["agent"]][$transfer["id_project"]][$transfer["draft_date"]][$currencyId]["sum"] ) ) {
                $this->_drafts[$transfer["agent"]][$transfer["id_project"]][$transfer["draft_date"]][$currencyId]["quantity"] += $transfer["quantity"];
                $this->_drafts[$transfer["agent"]][$transfer["id_project"]][$transfer["draft_date"]][$currencyId]["sum"] += $transfer["perechisleno"] * $rate * $payout_rate;
                $this->_drafts[$transfer["agent"]][$transfer["id_project"]][$transfer["draft_date"]][$currencyId]["commission"] += $transfer["udergano"] * $rate * $payout_rate;
            }
            else {
                $this->_drafts[$transfer["agent"]][$transfer["id_project"]][$transfer["draft_date"]][$currencyId]["quantity"] = $transfer["quantity"];
                $this->_drafts[$transfer["agent"]][$transfer["id_project"]][$transfer["draft_date"]][$currencyId]["sum"] = $transfer["perechisleno"] * $rate * $payout_rate;
                $this->_drafts[$transfer["agent"]][$transfer["id_project"]][$transfer["draft_date"]][$currencyId]["commission"] = $transfer["udergano"] * $rate * $payout_rate;
            }

    тайный культ массивов

    Запостил: dimkich, 24 Мая 2013

    Комментарии (2) RSS

    • > udergano
      Удергано-ушатано
      Ответить
    • о знакомые массивы ... Блитц обожает чтоб его подобным кормили!
      Ответить

    Добавить комментарий