Skip to content

Instantly share code, notes, and snippets.

version: '2'
services:
php:
image: yiisoftware/yii2-php:8.0-apache
volumes:
- ~/.composer-docker/cache:/root/.composer/cache:delegated
- ./:/app:delegated
ports:
- '80:80'
networks:
version: '2'
services:
php:
image: yiisoftware/yii2-php:8.0-apache
volumes:
- ~/.composer-docker/cache:/root/.composer/cache:delegated
- ./:/app:delegated
ports:
- '80:80'
networks:
const variants = [],
hash = {}
const addVariant = function (numbers)
{
numbers.sort()
let hashKey = numbers.join(',')
if (hash[hashKey] === undefined) {
hash[hashKey] = true
variants.push(numbers)
<?php
declare(strict_types=1);
namespace common\active_records;
use Yii;
use yii\db\ActiveQuery;
/**

Расчет комиссии 1327

https://youtrack.qubb.su/issue/CC-1327

Три типа операций:

  • payin
  • reversal
  • refund

Как считаются комиссии в AccountingPayinRegistryBuilder->buildQuery():

Структура проекта

  1. Пользователи
  2. Товары
    1. SKU
      1. SKU - EAV
    2. Категории
    3. Варианты товара
      1. Вариант - EAV
  3. Фотографии
SELECT `payment_systems`.name AS `provider`,
`aggregation`.time_result AS `datetime`,
`aggregation`.provider_operation_id AS `provider_operation_id`,
`aggregation`.partner_operation_id AS `partner_operation_id`,
`merchants`.name AS `merchant`,
`legal_entities`.name AS `merchant_legal_entity`,
'' AS `merchant_legal_address`,
`payment_systems`.id AS `payment_system`,
`bankcard_information`.mask AS `customer`,
`aggregation`.type AS `type`,
<?php
use yii\data\ArrayDataProvider;
$dataProvider = new ArrayDataProvider([
'allModels' => array (
array (
'zone' => 'EEA',
'type' => 'DEBIT',
'currency_id' => '1',
<?php
use yii\data\ArrayDataProvider;
$dataProvider = new ArrayDataProvider([
'allModels' => array (
array (
'zone' => 'EEA',
'type' => 'DEBIT',
'currency_id' => '1',
#!/usr/bin/env node
const ChromecastAPI = require('chromecast-api'),
client = new ChromecastAPI(),
validURL = require('valid-url'),
url = process.argv[2] || null
if (!url || !validURL.isUri(url)) {
console.error("Is not valid URL")
process.exit(1)
}