<commit_before><?php
require '../scat.php';

$month= $_REQUEST['month'];
if (!$month) die("ERROR: No month given.");

$q= "SELECT payment.id, method,
            DATE_FORMAT(processed, '%m/%d/%Y') processed,
            cc_type, amount, txn, txn.type,
            CONCAT(YEAR(filled), '-', number) num
       FROM payment
       JOIN txn ON payment.txn = txn.id
      WHERE processed BETWEEN '$month-01' AND '$month-01' + INTERVAL 1 MONTH
      ORDER BY 1";

$r= $db->query($q)
  or die_query($db, $q);

header('Content-Type: text/plain');
#header('Content-Disposition: attachment; filename="payments.txt"');

echo "Journal Number\tDate\tMemo\tAccount Number\tDebit Amount\tCredit Amount\r\n";

while ($pay= $r->fetch_assoc()) {
  if ($pay['amount'] == 0)
    continue;

  $accts= array(
                'drawer' => array(
                  'cash' =>       array('11130', '61220'),
                  'withdrawal' => array('11130', '11160'),
                 ),
                'customer' => array(
                  'cash' =>   array('11130', '11200'),
                  'change' => array('11130', '11200'),
                  'credit' => array('11190', '11200'),
                  'square' => array('11180', '11200'),
                  'stripe' => array('11175', '11200'),<commit_msg>Add account for Amazon Pay<commit_after><?php
require '../scat.php';

$month= $_REQUEST['month'];
if (!$month) die("ERROR: No month given.");

$q= "SELECT payment.id, method,
            DATE_FORMAT(processed, '%m/%d/%Y') processed,
            cc_type, amount, txn, txn.type,
            CONCAT(YEAR(filled), '-', number) num
       FROM payment
       JOIN txn ON payment.txn = txn.id
      WHERE processed BETWEEN '$month-01' AND '$month-01' + INTERVAL 1 MONTH
      ORDER BY 1";

$r= $db->query($q)
  or die_query($db, $q);

header('Content-Type: text/plain');
#header('Content-Disposition: attachment; filename="payments.txt"');

echo "Journal Number\tDate\tMemo\tAccount Number\tDebit Amount\tCredit Amount\r\n";

while ($pay= $r->fetch_assoc()) {
  if ($pay['amount'] == 0)
    continue;

  $accts= array(
                'drawer' => array(
                  'cash' =>       array('11130', '61220'),
                  'withdrawal' => array('11130', '11160'),
                 ),
                'customer' => array(
                  'cash' =>   array('11130', '11200'),
                  'change' => array('11130', '11200'),
                  'credit' => array('11190', '11200'),
                  'square' => array('11180', '11200'),
                  'stripe' => array('11175', '11200'),
                  'amazon' => array('11171', '11200'),
{'fraction_non_alphanumeric': 0.18664643399089528, 'fraction_numerical': 0.0622154779969651, 'mean_word_length': 2.2119366626065773, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1313166', 'n_tokens_mistral': 979, 'n_tokens_neox': 839, 'n_words': 194}