Форум OlegON > Программы и оборудование для автоматизации торговли > Кассовые программы > УКМ-4

Оперативная сводка на УКМ4, как получить? : УКМ-4

17.04.2024 2:37


28.11.2006 17:30
Rafael
 
EugeneT, буду очень благодарен
28.11.2006 17:40
EugeneT
 
Поднял.
trm_out_receipt_header.[type], кроме нуля, еще и 1, 4, 5.
поля sale_type нету вовсе.
УКМ старый, полуторагодичной давности.
Изыскания завтра продолжу.

P.S. Не совпадение структуры таблиц между старой и новой версией, еще один агрумент в пользу почекового конвертора
28.11.2006 17:41
Mtirt
 
Обнаружила что поле sale_type появилось только в 41-ой версии УКМ4.
28.11.2006 18:01
Rafael
 
Цитата:
EugeneT P.S. Не совпадение структуры таблиц между старой и новой версией, еще один агрумент в пользу почекового конвертора
с этим согласен, но моё ИМХО структура меняться сильно (читай кардинально) не будет
28.11.2006 18:06
Mtirt
 
Будет похоже.
Поэтому и описания таблиц нет.
Если бы С+ был уверен, что таблицы сильно не изменятся, то выложил бы их в открытый доступ.
29.11.2006 07:45
EugeneT
 
Порыл еще немного, похоже надо еще табличку trm_out_receipt_item_discount учесть, там хранятся скидки на позиции чеков в инкрементном и процентном виде, не факт, что в trm_out_receipt_item они уже учтены.
29.11.2006 15:57
Rafael
 
EugeneT, учёл в посте со структурой
ещё-бы разобраться с возвратами/разрушениями чеков

есть лог удаления результатов работы кассы (наши сервисмены рекомендовали пользоваться если что-то не работает)

Код:
--------------
select @kassa:=4
--------------

+-----------+
| @kassa:=4 |
+-----------+
|         4 |
+-----------+
1 row in set (0.00 sec)

--------------
select @cash_id:=id from ukm_cash_registers where CR_NUMBER=@kassa
--------------

+--------------+
| @cash_id:=id |
+--------------+
|    100011003 |
+--------------+
1 row in set (0.05 sec)

--------------
select @smena:=220
--------------

+-------------+
| @smena:=220 |
+-------------+
|         220 |
+-------------+
1 row in set (0.00 sec)

--------------
select @shift_id:=@smena
--------------

+-------------------+
| @shift_id:=@smena |
+-------------------+
|               220 |
+-------------------+
1 row in set (0.00 sec)

--------------
select @login_id:=login from trm_out_shift_open where cash_id=@cash_id and id=@shift_id
--------------

+------------------+
| @login_id:=login |
+------------------+
|              793 |
+------------------+
1 row in set (0.00 sec)

--------------
delete from trm_out_logout where cash_id=@cash_id and id>=@shift_id
--------------

Query OK, 302 rows affected (0.06 sec)

--------------
delete from trm_out_login where cash_id=@cash_id and id>=@shift_id
--------------

Query OK, 315 rows affected (0.05 sec)

--------------
select @shift_number:=number from trm_out_shift_open where cash_id=@cash_id and id=@shift_id
--------------

+-----------------------+
| @shift_number:=number |
+-----------------------+
|                   220 |
+-----------------------+
1 row in set (0.00 sec)

--------------
select @mo_id:=min(id) from trm_out_moneyoperation where cash_id=@cash_id and shift_number=@shift_number
--------------

+-----------------+
| @mo_id:=min(id) |
+-----------------+
|             716 |
+-----------------+
1 row in set (0.01 sec)

--------------
delete from trm_out_moneyoperation_note where cash_id=@cash_id and moneyoperation>=@mo_id
--------------

Query OK, 15 rows affected (0.05 sec)

--------------
delete from trm_out_moneyoperation where cash_id=@cash_id and id>=@mo_id
--------------

Query OK, 15 rows affected (0.03 sec)

--------------
select @header_id:=min(id) from trm_out_receipt_header where cash_id=@cash_id and shift_open=@shift_id
--------------

+---------------------+
| @header_id:=min(id) |
+---------------------+
|               84129 |
+---------------------+
1 row in set (0.00 sec)

--------------
delete from trm_out_receipt_link where cash_id=@cash_id and receipt_link_header>=@header_id
--------------

Query OK, 4 rows affected (0.01 sec)

--------------
select @item_id:=min(id) from trm_out_receipt_item where cash_id=@cash_id and receipt_header=@header_id
--------------

+-------------------+
| @item_id:=min(id) |
+-------------------+
|            659498 |
+-------------------+
1 row in set (0.00 sec)

--------------
delete from trm_out_receipt_item_discount where cash_id=@cash_id and receipt_item>=@item_id
--------------

Query OK, 2843 rows affected (0.13 sec)

--------------
delete from trm_out_receipt_item_handler where cash_id=@cash_id and owner_id>=@item_id
--------------

Query OK, 0 rows affected (0.02 sec)

--------------
delete from trm_out_receipt_item_tax where cash_id=@cash_id and receipt_item>=@item_id
--------------

Query OK, 0 rows affected (0.00 sec)

--------------
delete from trm_out_receipt_item where cash_id=@cash_id and id>=@item_id
--------------

Query OK, 16177 rows affected (39.70 sec)

--------------
delete from trm_out_receipt_subtotal where cash_id=@cash_id and id>=@header_id
--------------

Query OK, 1893 rows affected (0.08 sec)

--------------
select @discount_id:=min(id) from trm_out_receipt_discounts where cash_id=@cash_id and receipt_header>=@header_id
--------------

+-----------------------+
| @discount_id:=min(id) |
+-----------------------+
|                  3802 |
+-----------------------+
1 row in set (0.02 sec)

--------------
delete from trm_out_receipt_discount_handler where cash_id=@cash_id and owner_id>=@discount_id
--------------

Query OK, 114 rows affected (0.06 sec)

--------------
delete from trm_out_receipt_discount_properties where cash_id=@cash_id and receipt_discount>=@discount_id
--------------

Query OK, 342 rows affected (0.08 sec)

--------------
delete from trm_out_receipt_discounts where cash_id=@cash_id and id>=@discount_id
--------------

Query OK, 114 rows affected (0.06 sec)

--------------
delete from trm_out_receipt_tax where cash_id=@cash_id and id>=@header_id
--------------

Query OK, 0 rows affected (0.00 sec)

--------------
select @payment_id:=min(id) from trm_out_receipt_payment where cash_id=@cash_id and receipt_header=@header_id
--------------

+----------------------+
| @payment_id:=min(id) |
+----------------------+
|                84170 |
+----------------------+
1 row in set (0.03 sec)

--------------
delete from trm_out_receipt_payment_handler where cash_id=@cash_id and owner_id>=@payment_id
--------------

Query OK, 1894 rows affected (0.13 sec)

--------------
delete from trm_out_receipt_payment where cash_id=@cash_id and id>=@payment_id
--------------

Query OK, 1894 rows affected (32.56 sec)

--------------
delete from trm_out_receipt_footer where cash_id=@cash_id and id>=@header_id
--------------

Query OK, 1899 rows affected (0.44 sec)

--------------
delete from trm_out_receipt_header where cash_id=@cash_id and id>=@header_id
--------------

Query OK, 1899 rows affected (19.23 sec)

--------------
delete from trm_out_shift_payments where cash_id=@cash_id and id>=@shift_id
--------------

Query OK, 0 rows affected (0.00 sec)

--------------
delete from trm_out_shift_open where cash_id=@cash_id and id>=@shift_id
--------------

Query OK, 4 rows affected (0.13 sec)

--------------
delete from trm_out_shift_close where cash_id=@cash_id and id>=@shift_id
--------------

Query OK, 4 rows affected (0.09 sec)

--------------
UPDATE cnv_unload_state set last_unload_obj_id := @smena-1  where obj_type =5 and cash_id=@cash_id
--------------

Query OK, 4 rows affected (0.00 sec)
Rows matched: 4  Changed: 4  Warnings: 0

--------------
commit
--------------

Query OK, 0 rows affected (0.00 sec)
03.12.2006 11:15
EugeneT
 
Как вариант, попросить разработчиков сваять вьюху со структурой аналогичной cashsail от 2-го УКМ и цепляться к ней. Тогда можно абстрагироваться от структуры рабочих таблиц. Главное чтобы при смене структуры разработчики не забывали вьюху править.
Rafael, Обратись в личку к shebdim, кроме него тебе врядли кто-то сможет помочь
04.12.2006 14:01
Rafael
 
Цитата:
EugeneT Как вариант, попросить разработчиков сваять вьюху со структурой аналогичной cashsail от 2-го УКМ и цепляться к ней.
я-бы вообще предложил разработчикам включить такую возможность в дальнейших версиях, потому как, ИМХО, флоппинет давно уже умер - но это конечно уже на их усмотрение

вообще я бросил занятие разбираться со структурой т.к. у меня используется УКМ4 наряду с УКМ2, и мне всё равно от файлов не уйти - зачем платить больше? (с) *16
переключил свои усилия на другие насущные вопросы
всем откликнувшимся, большое спасибо за помощь *04
04.12.2006 15:03
AlexeyV
 
Посмотрите здесь. Версия 33 правда только. Новее нет.
Часовой пояс GMT +3, время: 02:37.

Форум на базе vBulletin®
Copyright © Jelsoft Enterprises Ltd.
В случае заимствования информации гипертекстовая индексируемая ссылка на Форум обязательна.