Skip to content
Permalink
Browse files

Adds > 0 check around the mean version of distributePay

  • Loading branch information...
dallasjohnson committed Mar 11, 2019
1 parent fd846ea commit 768e78585a74bc61782455d5ee89c9cf4d148a8f
@@ -43,14 +43,15 @@ void daccustodian::distributeMeanPay() {
asset meanAsset = count == 0 ? total : total / count;

// print_f("Calclulated mean is: %", meanAsset);

for (auto cust: custodians) {
pending_pay.emplace(_self, [&](pay &p) {
p.key = pending_pay.available_primary_key();
p.receiver = cust.cust_name;
p.quantity = meanAsset;
p.memo = "Custodian pay. Thank you.";
});
if (meanAsset.amount > 0) {
for (auto cust: custodians) {
pending_pay.emplace(_self, [&](pay &p) {
p.key = pending_pay.available_primary_key();
p.receiver = cust.cust_name;
p.quantity = meanAsset;
p.memo = "Custodian pay. Thank you.";
});
}
}

print("distribute mean pay");
@@ -1,5 +1,5 @@
{
"____comment": "This file was generated with eosio-abigen. DO NOT EDIT Sat Mar 9 16:19:49 2019",
"____comment": "This file was generated with eosio-abigen. DO NOT EDIT Mon Mar 11 23:08:49 2019",
"version": "eosio::abi/1.1",
"structs": [
{
Binary file not shown.

0 comments on commit 768e785

Please sign in to comment.
You can’t perform that action at this time.