/** * Gets all orders in status 30 for this company and creates a textfile for each company * Lift the order rows to status 40 * Run from cronscript no inparams and no return, it outputs messages * Moved and changed from Order krillo 100125 */ public static function skapaFiler() { Misc::logMotiomera("Start: Foretag::skapaFiler(), Create files for orders in status 30, lift to status 40", 'info'); $foretagIds = Foretag::getForetagIdsByOrder(0, 30, 0); foreach ($foretagIds as $foretagId => $orderIdArray) { try { $foretag = Foretag::loadById($foretagId); $foretag->createOrderPDF($orderIdArray); } catch (Exception $e) { Misc::logMotiomera("Problems loading foretag_id {$foretagId}", 'error'); } } Misc::logMotiomera("End: Foretag::skapaFiler()", 'info'); }