7#include <eosio/crypto.hpp>
8#include <eosio/eosio.hpp>
10#include "../../consts.hpp"
11#include "../../domain/document_core.hpp"
12#include "../../domain/table_ledger2_userwallets.hpp"
13#include "../../domain/table_marketplace_fee_config.hpp"
14#include "../ledger2/ledger2.hpp"
15#include "../branch/branch.hpp"
17#include "../../domain/table_marketplace_orders.hpp"
18#include "../../domain/table_marketplace_return_requests.hpp"
19#include "../../domain/table_marketplace_writeoff_proposals.hpp"
50 "Недопустимая единица измерения количества");
51 eosio::check(quantity.amount > 0,
"Количество должно быть больше нуля");
60inline void check_packaging(
const eosio::asset& quantity,
const eosio::asset& package_size) {
61 if (package_size.amount == 0)
return;
62 eosio::check(package_size.is_valid() && package_size.symbol == quantity.symbol,
63 "Единица упаковки не совпадает с единицей количества");
64 eosio::check(package_size.amount > 0,
"Размер упаковки должен быть больше нуля");
65 eosio::check(quantity.amount % package_size.amount == 0,
66 "Количество должно быть кратно размеру упаковки");
77inline eosio::asset
calc_cost(
const eosio::asset& quantity,
const eosio::asset& unit_price,
78 const eosio::asset& package_size = eosio::asset(0,
_unit_piece)) {
79 if (package_size.amount > 0) {
80 const int64_t packages = quantity.amount / package_size.amount;
81 const uint128_t total =
static_cast<uint128_t
>(packages) *
82 static_cast<uint128_t
>(unit_price.amount);
83 return eosio::asset(
static_cast<int64_t
>(total), unit_price.symbol);
86 for (uint8_t i = 0; i < quantity.symbol.precision(); ++i) scale *= 10;
87 const uint128_t num =
static_cast<uint128_t
>(quantity.amount) *
88 static_cast<uint128_t
>(unit_price.amount);
89 const int64_t
amount =
static_cast<int64_t
>((num +
static_cast<uint128_t
>(scale) / 2) / scale);
90 return eosio::asset(
amount, unit_price.symbol);
98inline eosio::asset
pro_rata(
const eosio::asset& total, int64_t part, int64_t whole) {
99 eosio::check(whole > 0,
"Некорректная база для расчёта пропорциональной доли");
100 const uint128_t num =
static_cast<uint128_t
>(total.amount) *
static_cast<uint128_t
>(part);
102 static_cast<int64_t
>((num +
static_cast<uint128_t
>(whole) / 2) /
static_cast<uint128_t
>(whole));
103 return eosio::asset(
amount, total.symbol);
108inline std::optional<order>
get_order_by_hash(eosio::name coopname,
const checksum256& order_hash) {
110 auto idx = orders.get_index<
"byhash"_n>();
111 auto it = idx.find(order_hash);
112 if (it == idx.end())
return std::nullopt;
117 const std::string& msg =
"Заказ не найден по хэшу") {
119 eosio::check(o.has_value(), msg);
123inline void update_order(eosio::name coopname, uint64_t order_id,
const std::function<
void(
order&)>& fn) {
125 auto it = orders.find(order_id);
126 eosio::check(it != orders.end(),
"Заказ не найден по id");
127 orders.modify(it,
RamPayer::of(orders, coopname), [&](
auto& o) { fn(o); });
139 if (!ext.has_value() || ext.value().symbol.raw() == 0)
return std::nullopt;
166 auto it = orders.find(order_id);
167 eosio::check(it != orders.end(),
"Заказ не найден по id");
180 const uint64_t
id = requests.available_primary_key();
181 return id == 0 ? 1 : id;
191 return it != requests.end() && it->original_order_hash == o.
hash;
195 const checksum256& request_hash) {
197 auto idx = requests.get_index<
"byhash"_n>();
198 auto it = idx.find(request_hash);
199 if (it == idx.end())
return std::nullopt;
204 const checksum256& request_hash,
205 const std::string& msg =
"Заявление на возврат не найдено по хэшу") {
207 eosio::check(r.has_value(), msg);
214 auto it = requests.find(request_id);
215 eosio::check(it != requests.end(),
"Заявление на возврат не найдено по id");
216 requests.modify(it,
RamPayer::of(requests, coopname), [&](
auto& r) { fn(r); });
224 auto it = requests.find(request_id);
225 eosio::check(it != requests.end(),
"Заявление на возврат не найдено по id");
234 eosio::name braname) {
236 eosio::check(o.delivery_braname == braname,
237 "Заявление на возврат рассматривает кооперативный участок выдачи заказа");
243 const checksum256& proposal_hash) {
245 auto idx = proposals.get_index<
"byhash"_n>();
246 auto it = idx.find(proposal_hash);
247 if (it == idx.end())
return std::nullopt;
252 const checksum256& proposal_hash,
253 const std::string& msg =
"Проект списания не найден по хэшу") {
255 eosio::check(p.has_value(), msg);
262 auto it = proposals.find(proposal_id);
263 eosio::check(it != proposals.end(),
"Проект списания не найден по id");
264 proposals.modify(it,
RamPayer::of(proposals, coopname), [&](
auto& p) { fn(p); });
271 auto it = proposals.find(proposal_id);
272 eosio::check(it != proposals.end(),
"Проект списания не найден по id");
279 const checksum256& claim_hash) {
281 auto idx = claims.get_index<
"byhash"_n>();
282 auto it = idx.find(claim_hash);
283 if (it == idx.end())
return std::nullopt;
288 const checksum256& claim_hash,
289 const std::string& msg =
"Гарантийная претензия поставщику не найдена по хэшу") {
291 eosio::check(c.has_value(), msg);
298 auto it = claims.find(claim_id);
299 eosio::check(it != claims.end(),
"Гарантийная претензия не найдена по id");
300 claims.modify(it,
RamPayer::of(claims, coopname), [&](
auto& c) { fn(c); });
320 eosio::name wallet_id,
321 eosio::name username) {
325 auto idx = user_wallets.get_index<
"byuserwallet"_n>();
326 auto it = idx.find(
combine_ids(wallet_id.value, username.value));
327 if (it == idx.end()) {
350 const int64_t
amount =
static_cast<int64_t
>(
351 static_cast<uint128_t
>(base.amount) * fee_percent /
HUNDR_PERCENTS);
367 const eosio::asset& membership_fee) {
368 if (membership_fee.amount <= 0)
return;
370 eosio::check(member.available >= membership_fee,
371 std::string{
"Недостаточно членских средств Стола заказов на членский взнос участка: требуется "} +
372 membership_fee.to_string() +
", доступно " + member.available.to_string() +
373 ". Сначала подайте заявление о переводе паевого взноса в программу.");
382inline void lock_order_body(eosio::name coopname, uint64_t order_id, eosio::name orderer,
383 const checksum256& order_hash,
const eosio::asset& body,
384 const std::string& program_memo,
const std::string& wallet_memo) {
385 if (body.amount <= 0)
return;
388 const eosio::asset from_wallet = body - from_program;
389 if (from_wallet.amount > 0) {
391 eosio::check(
wallet.available >= from_wallet,
392 std::string{
"Недостаточно паевых средств для заказа: требуется с Цифрового кошелька "} +
393 from_wallet.to_string() +
", доступно " +
wallet.available.to_string() +
394 " (свободный паевой Стола заказов " +
program.
available.to_string() +
" уже учтён)");
396 if (from_program.amount > 0) {
400 from_program, orderer, order_hash, program_memo);
402 if (from_wallet.amount > 0) {
406 from_wallet, orderer, order_hash, wallet_memo);
413 eosio::name orderer,
const checksum256& order_hash,
414 const eosio::asset& fee,
const std::string& memo) {
415 if (fee.amount <= 0)
return;
419 fee, orderer, order_hash, memo);
429 if (fee.amount <= 0)
return;
480 const eosio::asset refund_body = o.
total_cost - penalty_body;
482 if (refund_body.amount > 0) {
489 if (penalty_body.amount > 0) {
501 const eosio::asset refund_fee = fee - penalty_fee;
502 if (refund_fee.amount > 0) {
513 const eosio::asset to_common = penalty_body + penalty_fee;
514 if (to_common.amount > 0) {
529 auto by_delivery = orders.get_index<
"bydelivbra"_n>();
530 if (by_delivery.find(braname.value) != by_delivery.end())
return true;
531 auto by_accept = orders.get_index<
"byacceptbra"_n>();
532 return by_accept.find(braname.value) != by_accept.end();
540 const eosio::asset reserve =
542 eosio::check(reserve.amount == 0,
543 "Выход из кооператива невозможен: под заказы Стола заказов зарезервировано " +
544 reserve.to_string() +
" — завершите или отмените заказы");
547 auto by_orderer = requests.get_index<
"byorderer"_n>();
548 eosio::check(by_orderer.find(username.value) == by_orderer.end(),
549 "Выход из кооператива невозможен: открыто заявление на гарантийный возврат в Столе заказов — дождитесь его рассмотрения");
558 eosio::name username,
const checksum256& exit_hash) {
561 if (
balance.amount <= 0)
return;
565 "Остаток членского кошелька Стола заказов в пул взносов при выходе, username=" +
566 username.to_string());
569 if (!braname.has_value() || !
Branch::exists(coopname, *braname))
return;
571 "Остаток членского кошелька Стола заказов в общий кошелёк участка при выходе, username=" +
572 username.to_string());
static void apply(eosio::name actor, eosio::name coopname, eosio::name operation_code, eosio::name process_type, eosio::asset amount, eosio::name username, eosio::checksum256 process_hash, std::string memo)
Отправить inline action ledger2::apply.
Definition: ledger2.hpp:42
Контракт Wallet управляет взносами и возвратами взносов по ЦПП "Цифровой Кошелёк".
Definition: wallet.hpp:16
static constexpr eosio::symbol _unit_piece
Definition: consts.hpp:243
static constexpr eosio::symbol _root_govern_symbol
Definition: consts.hpp:236
#define HUNDR_PERCENTS
Definition: consts.hpp:141
static constexpr eosio::symbol _unit_liter
Definition: consts.hpp:242
static constexpr eosio::symbol _unit_kg
Definition: consts.hpp:241
static constexpr eosio::name _ledger2
Definition: consts.hpp:185
static constexpr eosio::name _marketplace
Definition: consts.hpp:176
balance
Definition: eosio.token_tests.cpp:226
share_type amount
Definition: eosio.token_tests.cpp:174
Человекочитаемые memo для marketplace ledger2-операций.
bool exists(eosio::name coopname, eosio::name braname)
Кооперативный участок существует (не удалён).
Definition: branch.hpp:50
void accrue(eosio::name actor, eosio::name coopname, eosio::name braname, eosio::asset amount, eosio::name process_type, eosio::checksum256 process_hash, std::string memo)
Inline-вызов branch::accrue от контракта-источника членских взносов (requirement b6 «Экономика КУ»,...
Definition: branch.hpp:62
std::string get_refusal_penalty_distribute_memo(uint64_t order_id)
Definition: memo.hpp:70
std::string get_membership_fee_refund_memo(uint64_t order_id)
Definition: memo.hpp:46
std::string get_cancel_order_memo(uint64_t order_id)
Definition: memo.hpp:62
std::string get_refusal_penalty_transit_memo(uint64_t order_id)
Definition: memo.hpp:66
constexpr eosio::name COMPLETED
Definition: table_marketplace_orders.hpp:72
Canonical helpers контракта marketplace (Story 11.1).
Definition: marketplace.hpp:32
void check_return_request_branch(eosio::name coopname, const return_request &r, eosio::name braname)
Definition: marketplace.hpp:233
std::optional< order > get_order_by_hash(eosio::name coopname, const checksum256 &order_hash)
Definition: marketplace.hpp:108
return_request get_return_request_by_hash_or_fail(eosio::name coopname, const checksum256 &request_hash, const std::string &msg="Заявление на возврат не найдено по хэшу")
Definition: marketplace.hpp:203
void erase_order(eosio::name coopname, uint64_t order_id)
Definition: marketplace.hpp:164
eosio::multi_index< "orders"_n, order, eosio::indexed_by<"byhash"_n, eosio::const_mem_fun< order, checksum256, &order::by_hash > >, eosio::indexed_by<"byorderer"_n, eosio::const_mem_fun< order, uint64_t, &order::by_orderer > >, eosio::indexed_by<"byofferer"_n, eosio::const_mem_fun< order, uint64_t, &order::by_offerer > >, eosio::indexed_by<"bystatus"_n, eosio::const_mem_fun< order, uint64_t, &order::by_status > >, eosio::indexed_by<"bybatch"_n, eosio::const_mem_fun< order, checksum256, &order::by_batch > >, eosio::indexed_by<"byoffer"_n, eosio::const_mem_fun< order, checksum256, &order::by_offer > >, eosio::indexed_by<"bydelivbra"_n, eosio::const_mem_fun< order, uint64_t, &order::by_delivery_bra > >, eosio::indexed_by<"byacceptbra"_n, eosio::const_mem_fun< order, uint64_t, &order::by_accept_bra > > > orders_index
Definition: table_marketplace_orders.hpp:253
void clear_issue_documents(order &o)
Definition: marketplace.hpp:455
eosio::asset calc_membership_fee(const eosio::asset &base, uint64_t fee_percent)
Сумма членского взноса от базы по ставке (целочисленно, вниз).
Definition: marketplace.hpp:349
uint64_t next_return_request_id(eosio::name coopname)
Definition: marketplace.hpp:178
std::optional< writeoff_proposal > get_writeoff_proposal_by_hash(eosio::name coopname, const checksum256 &proposal_hash)
Definition: marketplace.hpp:242
constexpr uint64_t DEFAULT_MEMBERSHIP_FEE_PERCENT
Definition: marketplace.hpp:339
void require_member_fee(eosio::name coopname, eosio::name orderer, const eosio::asset &membership_fee)
Definition: marketplace.hpp:366
UserWalletAvailable get_user_wallet_balance(eosio::name coopname, eosio::name wallet_id, eosio::name username)
Definition: marketplace.hpp:319
void erase_writeoff_proposal(eosio::name coopname, uint64_t proposal_id)
Definition: marketplace.hpp:269
void check_member_can_exit(eosio::name coopname, eosio::name username)
Definition: marketplace.hpp:539
constexpr uint64_t REFUSAL_PENALTY_PERCENT
Definition: marketplace.hpp:451
void check_quantity(const eosio::asset &quantity)
Валидация количества: корректный asset, известная единица, положительное.
Definition: marketplace.hpp:48
void update_writeoff_proposal(eosio::name coopname, uint64_t proposal_id, const std::function< void(writeoff_proposal &)> &fn)
Definition: marketplace.hpp:259
eosio::asset get_accepted_cost(const order &o)
Definition: marketplace.hpp:146
eosio::asset pro_rata(const eosio::asset &total, int64_t part, int64_t whole)
Definition: marketplace.hpp:98
eosio::multi_index< "wroffprops"_n, writeoff_proposal, eosio::indexed_by<"byhash"_n, eosio::const_mem_fun< writeoff_proposal, checksum256, &writeoff_proposal::by_hash > >, eosio::indexed_by<"bystatus"_n, eosio::const_mem_fun< writeoff_proposal, uint64_t, &writeoff_proposal::by_status > > > writeoff_proposals_index
Definition: table_marketplace_writeoff_proposals.hpp:118
eosio::asset get_order_membership_fee(const order &o)
Членский взнос заказа (ноль — взнос не начислялся).
Definition: marketplace.hpp:356
eosio::asset refusal_penalty_share(const eosio::asset &base)
Удерживаемая часть суммы (округление вниз — остаток в пользу пайщика).
Definition: marketplace.hpp:465
eosio::asset get_payout_withheld(const order &o)
Долг поставщика, уже удержанный при инициации выплаты; без суммы — ноль.
Definition: marketplace.hpp:151
bool has_open_return_request(eosio::name coopname, const order &o)
Definition: marketplace.hpp:187
void check_packaging(const eosio::asset &quantity, const eosio::asset &package_size)
Definition: marketplace.hpp:60
eosio::asset calc_cost(const eosio::asset &quantity, const eosio::asset &unit_price, const eosio::asset &package_size=eosio::asset(0, _unit_piece))
Definition: marketplace.hpp:77
void update_claim(eosio::name coopname, uint64_t claim_id, const std::function< void(warranty_claim &)> &fn)
Definition: marketplace.hpp:295
warranty_claim get_claim_by_hash_or_fail(eosio::name coopname, const checksum256 &claim_hash, const std::string &msg="Гарантийная претензия поставщику не найдена по хэшу")
Definition: marketplace.hpp:287
void erase_return_request(eosio::name coopname, uint64_t request_id)
Definition: marketplace.hpp:222
std::optional< eosio::asset > get_asset_extension(const eosio::binary_extension< eosio::asset > &ext)
Definition: marketplace.hpp:138
writeoff_proposal get_writeoff_proposal_by_hash_or_fail(eosio::name coopname, const checksum256 &proposal_hash, const std::string &msg="Проект списания не найден по хэшу")
Definition: marketplace.hpp:251
bool is_supplier_settlement_open(const order &o)
Definition: marketplace.hpp:158
void settle_member_fund_on_exit(eosio::name actor, eosio::name coopname, eosio::name username, const checksum256 &exit_hash)
Definition: marketplace.hpp:557
void update_return_request(eosio::name coopname, uint64_t request_id, const std::function< void(return_request &)> &fn)
Definition: marketplace.hpp:211
eosio::multi_index< "claims"_n, warranty_claim, eosio::indexed_by<"byhash"_n, eosio::const_mem_fun< warranty_claim, checksum256, &warranty_claim::by_hash > >, eosio::indexed_by<"bysupplier"_n, eosio::const_mem_fun< warranty_claim, uint64_t, &warranty_claim::by_supplier > >, eosio::indexed_by<"bystatus"_n, eosio::const_mem_fun< warranty_claim, uint64_t, &warranty_claim::by_status > >, eosio::indexed_by<"byorigorder"_n, eosio::const_mem_fun< warranty_claim, uint64_t, &warranty_claim::by_original_order > > > warranty_claims_index
Definition: table_marketplace_warranty_claims.hpp:82
std::optional< warranty_claim > get_claim_by_hash(eosio::name coopname, const checksum256 &claim_hash)
Definition: marketplace.hpp:278
order get_order_by_hash_or_fail(eosio::name coopname, const checksum256 &order_hash, const std::string &msg="Заказ не найден по хэшу")
Definition: marketplace.hpp:116
void refund_membership_fee_if_any(eosio::name coopname, const order &o)
Definition: marketplace.hpp:427
bool has_orders_at_branch(eosio::name coopname, eosio::name braname)
Definition: marketplace.hpp:527
uint64_t get_membership_fee_percent(eosio::name coopname)
Definition: marketplace.hpp:343
void update_order(eosio::name coopname, uint64_t order_id, const std::function< void(order &)> &fn)
Definition: marketplace.hpp:123
void lock_order_body(eosio::name coopname, uint64_t order_id, eosio::name orderer, const checksum256 &order_hash, const eosio::asset &body, const std::string &program_memo, const std::string &wallet_memo)
Definition: marketplace.hpp:382
void refund_order_full(eosio::name coopname, const order &o)
Definition: marketplace.hpp:440
eosio::multi_index< "retrequests"_n, return_request, eosio::indexed_by<"byhash"_n, eosio::const_mem_fun< return_request, checksum256, &return_request::by_hash > >, eosio::indexed_by<"byorderer"_n, eosio::const_mem_fun< return_request, uint64_t, &return_request::by_orderer > >, eosio::indexed_by<"bystatus"_n, eosio::const_mem_fun< return_request, uint64_t, &return_request::by_status > >, eosio::indexed_by<"byorigorder"_n, eosio::const_mem_fun< return_request, uint64_t, &return_request::by_original_order > > > return_requests_index
Definition: table_marketplace_return_requests.hpp:125
void lock_membership_fee(eosio::name coopname, uint64_t order_id, eosio::name orderer, const checksum256 &order_hash, const eosio::asset &fee, const std::string &memo)
Definition: marketplace.hpp:412
void retain_refusal_penalty(eosio::name coopname, const order &o)
Definition: marketplace.hpp:477
std::optional< return_request > get_return_request_by_hash(eosio::name coopname, const checksum256 &request_hash)
Definition: marketplace.hpp:194
bool is_valid_unit_symbol(const eosio::symbol &sym)
Definition: marketplace.hpp:43
eosio::name of(const Table &table, eosio::name coopname)
Definition: ram_payer.hpp:78
Definition: eosio.msig.hpp:34
constexpr eosio::name EXIT_FEE_TO_POOL
Остаток членского кошелька программы при выходе пайщика из кооператива (TRANSFER w....
Definition: operations.hpp:114
constexpr eosio::name MEMBERSHIP_FEE_REFUND
Сторно неиспользованной части членского взноса участка на членский кошелёк программы (TRANSFER w....
Definition: operations.hpp:111
constexpr eosio::name UNLOCK_ORDER
Возврат резерва при отмене Order'а или недовыдаче (TRANSFER w.mkt.order → w.mkt.share,...
Definition: operations.hpp:102
constexpr eosio::name LOCK_FROM_SHARE
Паевой резерв из свободного паевого «Стола заказов» (TRANSFER w.mkt.share → w.mkt....
Definition: operations.hpp:101
constexpr eosio::name MEMBERSHIP_FEE_LOCK
Членский взнос кооперативного участка под заказ из членского кошелька программы (TRANSFER w....
Definition: operations.hpp:110
constexpr eosio::name REFUSAL_PENALTY
Удержание 50% при отказе пайщика от получения после акцепта поставщиком (TRANSFER w....
Definition: operations.hpp:112
constexpr eosio::name LOCK_ORDER
Паевой резерв под конкретный Order (TRANSFER w.wal.share → w.mkt.order, без Dr/Cr — оба кошелька на 8...
Definition: operations.hpp:100
constexpr eosio::name SUPPLY
Прямая поставка-приобретение имущества (5 операций: o.mkt.lock + o.mkt.unlock + o....
Definition: processes.hpp:75
constexpr eosio::name WITHDRAW
Возврат паевого взноса пайщику.
Definition: processes.hpp:58
Definition: marketplace.hpp:313
bool exists
Definition: marketplace.hpp:316
eosio::asset blocked
Definition: marketplace.hpp:315
eosio::asset available
Definition: marketplace.hpp:314
On-chain Order — анкер процесса p.mkt.supply.
Definition: table_marketplace_orders.hpp:148
eosio::name orderer
пайщик-заказчик
Definition: table_marketplace_orders.hpp:152
eosio::binary_extension< eosio::asset > payout_withheld
Definition: table_marketplace_orders.hpp:217
checksum256 hash
process_hash для p.mkt.supply
Definition: table_marketplace_orders.hpp:150
eosio::binary_extension< eosio::asset > accepted_cost
Definition: table_marketplace_orders.hpp:224
eosio::asset membership_fee
Definition: table_marketplace_orders.hpp:204
eosio::binary_extension< document2 > issue_statement
Definition: table_marketplace_orders.hpp:209
eosio::asset fact_cost
actual_quantity * unit_price / 10^precision (после issueact2)
Definition: table_marketplace_orders.hpp:165
eosio::binary_extension< document2 > issue_protocol
Definition: table_marketplace_orders.hpp:212
uint64_t id
внутренний ID
Definition: table_marketplace_orders.hpp:149
eosio::asset quantity
заказанное количество (asset с символом единицы KG/LTR/PCS, Эпик 17)
Definition: table_marketplace_orders.hpp:160
eosio::name payout_status
Locked Decision L12 — состояние выплаты поставщику через gateway (см. namespace OrderPayoutStatus)
Definition: table_marketplace_orders.hpp:182
eosio::asset total_cost
quantity * unit_price / 10^precision (заблокированная сумма)
Definition: table_marketplace_orders.hpp:164
document2 issue_act2
Акт приёма-передачи (1115) — закрывающая подпись председателя участка выдачи (issueact2); слот прежне...
Definition: table_marketplace_orders.hpp:180
eosio::asset actual_quantity
фактически выданное (issueact2); до issueact2 == quantity
Definition: table_marketplace_orders.hpp:161
document2 issue_act1
Акт приёма-передачи (1115) — первая подпись заказчика (issueact1); слот прежнего issue_act_signiss1.
Definition: table_marketplace_orders.hpp:179
eosio::name delivery_braname
КУ выдачи (выбран пайщиком на createorder); проверка readyissue/issueact2/p.mkt.return через Branch::...
Definition: table_marketplace_orders.hpp:156
uint64_t return_request_id
0 если активного гарантийного возврата нет
Definition: table_marketplace_orders.hpp:185
On-chain Заявление на гарантийный возврат — анкер процесса p.mkt.return.
Definition: table_marketplace_return_requests.hpp:70
checksum256 original_order_hash
process_hash оригинального p.mkt.supply
Definition: table_marketplace_return_requests.hpp:77
On-chain гарантийная претензия поставщику — анкер процесса p.mkt.claim (компонент 68,...
Definition: table_marketplace_warranty_claims.hpp:48
On-chain Проект решения совета о списании скоропорта — анкер процесса p.mkt.wroff.
Definition: table_marketplace_writeoff_proposals.hpp:92
Definition: document_core.hpp:27
static constexpr eosio::name MARKETPLACE_MEMBER_FUND
ЦПП «Стол Заказов» — внутренний членский кошелёк пайщика в программе (USER_SHARED,...
Definition: wallets.hpp:75
static constexpr eosio::name MARKETPLACE_ORDER_LOCK
ЦПП «Стол Заказов» — паевой резерв пайщика под конкретный Order (USER_SHARED, счёт 80)....
Definition: wallets.hpp:73
static constexpr eosio::name MARKETPLACE_SHARE_FUND
ЦПП «Стол Заказов» — свободный паевой пайщика в программе (USER_SHARED, счёт 80). Сюда возвращается о...
Definition: wallets.hpp:74
static constexpr eosio::name SHARE_FUND_PAY
Паевой взнос пайщика (USER_SHARED)
Definition: wallets.hpp:48
Definition: table_soviet_programs.hpp:17
eosio::binary_extension< eosio::asset > available
Definition: table_soviet_programs.hpp:38
eosio::multi_index< "userwallets"_n, userwallet, eosio::indexed_by<"byuserwallet"_n, eosio::const_mem_fun< userwallet, uint128_t, &userwallet::by_userwallet > >, eosio::indexed_by<"byuser"_n, eosio::const_mem_fun< userwallet, uint64_t, &userwallet::by_user > >, eosio::indexed_by<"bywallet"_n, eosio::const_mem_fun< userwallet, uint64_t, &userwallet::by_wallet > > > userwallets_index
Definition: table_ledger2_userwallets.hpp:48
eosio::singleton<"config"_n, mkt_config > mkt_config_singleton
Definition: table_marketplace_fee_config.hpp:30
std::optional< eosio::name > get_participant_branch(eosio::name coopname, eosio::name username)
Definition: table_soviet_participants.hpp:57
static uint128_t combine_ids(const uint64_t &x, const uint64_t &y)
Definition: utils.hpp:7