WHERE id = ? OR reference = ?', array($inv['id'], $inv['id'])); $value -= $inv['value']; } } } } $DB->Execute('UPDATE cashimport SET closed = 1 WHERE id = ?', array($import['id'])); $LMS->AddBalance($balance); $DB->CommitTrans(); } } } if (!$quiet) { printf("Logging in to BGZ ... "); } $res = log_in_to_bgz(ConfigHelper::getConfig('finances.bgz_username'), ConfigHelper::getConfig('finances.bgz_firm'), ConfigHelper::getConfig('finances.bgz_password')); if (!$res) { unlink(COOKIE_FILE); die("Cannot log in to BGZ!" . PHP_EOL); } if (!$quiet) { printf("Done." . PHP_EOL . "Getting cash import file list ... "); } $files = get_files(); if (!$files) { unlink(COOKIE_FILE); die("Cannot get file list!" . PHP_EOL); } if (!$quiet) { printf("Done." . PHP_EOL); }
WHERE id = ? OR reference = ?', array($inv['id'], $inv['id'])); $value -= $inv['value']; } } } } $DB->Execute('UPDATE cashimport SET closed = 1 WHERE id = ?', array($import['id'])); $LMS->AddBalance($balance); $DB->CommitTrans(); } } } if (!$quiet) { printf("Logging in to BGZ ... "); } $res = log_in_to_bgz($CONFIG['finances']['bgz_username'], $CONFIG['finances']['bgz_firm'], $CONFIG['finances']['bgz_password']); if (!$res) { unlink(COOKIE_FILE); die("Cannot log in to BGZ!\n"); } if (!$quiet) { printf("Done.\nGetting cash import file list ... "); } $files = get_files(); if (!$files) { unlink(COOKIE_FILE); die("Cannot get file list!\n"); } if (!$quiet) { printf("Done.\n"); }