Beispiel #1
0
# a.order_number = '17052917561851301127'
# a.add_position('колбаса Клинский Брауншвейгская с/к в/с', 1000, 0.3, 300, '10')
# a.clent_mail = '*****@*****.**'
# a.send_check()
import atol
#a = Check()
#a.order_number = '1-to_del-11'
#a.clent_mail = '*****@*****.**'
#item = Item()
#item.name = 'Детская кровать Micuna Sweet Bear'
#item.price = 111
#item.sum = 111
#item.quantity = 1
#item.vat = 'vat20'
#item.mark_row = '44 4D 00 00 02 C0 EE D8 58 3F 69 6F 2B 71 43 41 42 6D 38 20 20'
#a.set_operation('sell_refund')
#a.items.append(item)

#res = a.send_check()

#res = res.json()
#for i in res:
#    print(i,':', res[i])
#sleep(10)
#get_check_status(res['uuid'])

import bitrix
a = bitrix.Order(3713)
a.email = '*****@*****.**'
a.send_atol()
Beispiel #2
0
import bitrix

while True:
    order_id = int(input('Номер заказа: '))
    if order_id == 0:
        exit()
    try:
        a = bitrix.Order(order_id)
    except Exception as e:
        print('Ошибка\n', e)
        continue
    print('Заказ № ', order_id)
    print('Статус Битрикс', a.bitrix_status)
    print('Сумма из ДиФ ', a.total)
    print('Сумма по завершения ', a.payment.finish_sum)
    print('Сумма по холдирования ', a.payment.holded_sum)
    print('Разблокировка у клиента ', a.payment.delta)
    print('Возврат по банку', a.payment.refunded_amount)
    print('Статус по банку ', a.payment.staus)
    print('Region ', a.region)
    print('Store ', a.store)
Beispiel #3
0
    print(Fore.RED, *args, Style.RESET_ALL)


def print_yellow(*args):
    print(Fore.YELLOW, *args, Style.RESET_ALL)


def log(message):
    f = open('closed_%s.log' % date.isoformat(), 'a', encoding='utf-8')


order_number = int(input('Введите номер заказа: '))
if order_number == 0:
    exit()
try:
    order_details = bitrix.Order(order_number)
    log(order_number)
except Exception as e:
    print_red(e)

print('%-20s%s' % ('Заказ №', order_details.order_id))
print('%-20s%s' % ('Статус', order_details.bitrix_status))
print('%-20s%s' % ('Клиент', order_details.FIO))
print('%-20s%s' % ('E-mail', order_details.email))
print('%-20s%s' % ('Регион', order_details.region))
print('%-20s%s' % ('Магазин', order_details.store))
print('=' * 40, 'Товар ' + '=' * 40)
counter = 1

print('%-4s%-70s%-10s%-10s%-10s' % ('№', 'Позиция', 'Кол-во', 'Цена', 'Сумма'))
position_total = 0
Beispiel #4
0
                comissioner_name = i['1224']['1225']
                comissioner_inn = i['1226']
                check.add_position(name, price, quantity, total, nds,
                                   is_comissioner, comissioner_name,
                                   comissioner_inn, comissioner_phone)
            else:
                check.add_position(name, price, quantity, total, nds)
        return check
    except Exception as e:
        print(e)


while True:
    a, b = None, None
    order_num = int(input('Заказ № '))
    b = bitrix.Order(order_num)
    a = load_tvl(order_num)
    delta = round(a.get_total() - b.total, 2)
    print('Исходная сумма: ', b.total)
    print('Сумма по чеку:', a.get_total())
    print('Дельта:', delta)
    print('Количество строк в исходном заказе: ', len(b.items))
    for i in range(len(b.items)):
        a.items.remove(a.items[0])
    print('Сумма по чеку после удаления:', a.get_total())
    if delta == a.get_total():
        if input('Пробить? ') == 'Y':
            a.set_operation('sell_refund')
            a.order_number = str(a.order_number) + '-Delta'
            res = a.send_check()
            res = res.json()['uuid']