witam testuje właśnie moduł cutoff. w tej chwili wyłącza wszystkich z wystawionymi fakturami mimo iż termin płatności nie minął. faktury wystawione 1.06.2012, termin płatności do 11.06.2012 i tak jest bazie, paytime=10
mysql> select var, value from daemonconfig where instanceid=23; +-------------------------+-------+ | var | value | +-------------------------+-------+ | use_nodeassignments | true | | excluded_customergroups | vip | | deadline | 20 | | checkinvoices | true | +-------------------------+-------+ 4 rows in set (0.01 sec)
mysql> select * from daemoninstances where id=23; +----+------+--------+------------------------------+-----------+----------+-------------+----------+ | id | name | hostid | module | crontab | priority | description | disabled | +----+------+--------+------------------------------+-----------+----------+-------------+----------+ | 23 | test | 3 | /usr/local/lms/lib/cutoff.so | * * * * * | 6 | | 0 | +----+------+--------+------------------------------+-----------+----------+-------------+----------+ 1 row in set (0.01 sec)
kombinuje z ustawieniami deadline, checkinvoices ale bez rezultatu. w debugu nie widać by paytime było brane pd uwagę
Jun 5 21:51:00 testsql lmsd: DEBUG: [SQL] SELECT daemoninstances.name AS section, var, value FROM daemonconfig, hosts, daemoninstances WHERE hostid= hosts.id AND instanceid=daemoninstances.id AND hosts.name='localhost' AND daemoninstances.name='test' AND daemonconfig.disabled=0 Jun 5 21:51:00 testsql lmsd: DEBUG: [test/cutoff] initialized Jun 5 21:51:00 testsql lmsd: DEBUG: [SQL] SELECT n.id, n.ownerid FROM nodes n WHERE n.ownerid > 0 AND n.access = 1 AND NOT EXISTS (SELECT 1 FROM nodeassignments, assignments a WHERE nodeid = n.id AND assignmentid = a.idAND (datefrom <= UNIX_TIMESTAMP() OR datefrom = 0) AND (dateto >= UNIX_TIMESTAMP() OR dateto = 0) AND (tariffid != 0 OR liabilityid != 0) ) AND NOT EXISTS (SELECT 1 FROM customergroups g, customerassignments a WHERE a.customerid = n.ownerid AND g.id = a.customergroupid AND (UPPER(g.name) = UPPER('vip'))) Jun 5 21:51:00 testsql lmsd: DEBUG: [SQL] SELECT c.id, SUM(cash.value) AS balance FROM customers c JOIN cash ON (c.id = cash.customerid) WHERE c.deleted = 0 AND c.cutoffstop < UNIX_TIMESTAMP() AND NOT EXISTS (SELECT 1 FROM customergroups g, customerassignments a WHERE a.customerid = c.id AND g.id = a.customergroupid AND (UPPER(g.name) = UPPER('vip'))) GROUP BY c.idHAVING SUM(cash.value) < 0
:/ a zapowiadało się tak pięknie.