- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 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;
}
myaut 24.05.2013 15:46 # +1
Удергано-ушатано
guest 24.05.2013 15:46 # +1