jkimdon / cohotikimeals

fresh start on meal integration with tiki
GNU General Public License v3.0
0 stars 0 forks source link

2021/08/05 meal follow-up? #152

Open stonylohr opened 3 years ago

stonylohr commented 3 years ago

The 2021/08/05 meal had somehow gotten set as processed and charged. I think I reversed that, but if there are any processing side effects other than the financial log entries, they'll still need to be cleaned up. Could you either confirm that I already did everything that's needed, or give even informal hints about where to look for anything remaining?

Here's approximately what I did...

select cal_id,cal_date,cal_time,cal_cancelled,paperwork_done,diners_charged from cohomeals_meal where cal_date=20210805;
| cal_id | cal_date | cal_time | cal_cancelled | paperwork_done | diners_charged |
+--------+----------+----------+---------------+----------------+----------------+
|   3128 | 20210805 |   180000 | 0             |              1 |              1 |

select * from cohomeals_financial_log where cal_meal_id=3128;
| cal_log_id | cal_login     | cal_billing_group | cal_description                                       | cal_timestamp       | cal_meal_id | cal_amount | cal_running_balance | cal_text |
+------------+---------------+-------------------+-------------------------------------------------------+---------------------+-------------+------------+---------------------+----------+
|      72916 | ahcutting     | 8                 | April Hall Cutting dining. (multiplier = 1)           | 2021-08-01 22:21:50 |        3128 |       -350 |                2858 | NULL     |
|      72917 | carolyn.larue | 48                | Carolyn Larue dining. (multiplier = 1)                | 2021-08-01 22:21:50 |        3128 |       -350 |               26148 | NULL     |
|      72918 | cchoate       | 127               | Christina Choate dining. (multiplier = 1)             | 2021-08-01 22:21:50 |        3128 |       -350 |                -830 | NULL     |
|      72919 | cdyrud        | 3                 | Colleen Dyrud dining. (multiplier = 1)                | 2021-08-01 22:21:50 |        3128 |       -350 |               -3937 | NULL     |
|      72920 | chcutting     | 8                 | Craig Hall Cutting dining. (multiplier = 1)           | 2021-08-01 22:21:50 |        3128 |       -350 |                2508 | NULL     |
|      72921 | chilkey       | 2                 | Cecilia Hilkey dining. (multiplier = 1)               | 2021-08-01 22:21:50 |        3128 |       -350 |                5125 | NULL     |
|      72922 | crobins       | 36                | Christine Robins dining. (multiplier = 1)             | 2021-08-01 22:21:50 |        3128 |       -350 |                7444 | NULL     |
|      72923 | dcarey        | 47                | Deborah Carey dining. (multiplier = 1)                | 2021-08-01 22:21:50 |        3128 |       -350 |                5053 | NULL     |
|      72924 | jhilkey       | 2                 | Jason Hilkey dining. (multiplier = 1)                 | 2021-08-01 22:21:50 |        3128 |       -350 |                4775 | NULL     |
|      72925 | jlunsford     | 42                | Jim Lunsford dining. (multiplier = 1)                 | 2021-08-01 22:21:50 |        3128 |       -350 |                -528 | NULL     |
|      72926 | mwagner       | 114               | Martha Wagner dining. (multiplier = 1)                | 2021-08-01 22:21:50 |        3128 |       -350 |               -1700 | NULL     |
|      72927 | nic.larue     | 48                | Nicolas Larue dining. (multiplier = 1)                | 2021-08-01 22:21:50 |        3128 |       -350 |               25798 | NULL     |
|      72928 | pcotter       | 127               | Paul Cotter dining. (multiplier = 1)                  | 2021-08-01 22:21:50 |        3128 |       -350 |               -1180 | NULL     |
|      72929 | pparcells     | 36                | Patricia Parcells dining. (multiplier = 1)            | 2021-08-01 22:21:50 |        3128 |       -350 |                7094 | NULL     |
|      72930 | nic.larue     | 48                | Guest Chloe Larue dining (multiplier = 0.10)          | 2021-08-01 22:21:51 |        3128 |        -35 |               25763 | NULL     |
|      72931 | jlunsford     | 42                | None dining (guest of Jim Lunsford), (multiplier 1.0) | 2021-08-01 22:21:51 |        3128 |       -350 |                -878 | NULL     |

delete from cohomeals_financial_log where cal_meal_id=3128;

select paperwork_done,count(*) from cohomeals_meal group by paperwork_done;

update cohomeals_meal set paperwork_done=null,diners_charged=null where cal_date=20210805;
stonylohr commented 3 years ago

April reports that she couldn't process the meal. It said something about the pantry.

select * from cohomeals_pantry_purchases where cal_meal_id=3128;
| cal_log_id | cal_food_id | cal_number_units | cal_total_price | cal_type | cal_timestamp       | cal_purchase_date | cal_meal_id |
+------------+-------------+------------------+-----------------+----------+---------------------+-------------------+-------------+
|       9640 |           1 |             0.00 |               0 |        1 | 2021-08-01 22:21:51 | NULL              |        3128 |
|       9641 |           2 |           170.00 |             170 |        1 | 2021-08-01 22:21:51 | NULL              |        3128 |

delete from cohomeals_pantry_purchases where cal_meal_id=3128;

Hopefully that will do it...