Beispiel #1
0
def calculate_factor_pending_pay(movement_data, movement_type):
    if not movement_type.get('factor_pago_pendiente_porcentaje') is None:
        percent = float(data_providers.get_percent(movement_data['codigo_proveedor']))/float(100)
        value = movement_data['valor']
        client_code = movement_data['codigo_cliente']
        if data_clients.is_immediate_pay_client(client_code):
            data_clients.operate_balance(client_code, value*percent)
        else:
            data_clients.operate_pending_pay(client_code, value*percent)
Beispiel #2
0
def calculate_factor_client(movement_data, movement_type):
    if not movement_type.get('factor_cliente') is None:
        data_clients.operate_balance(movement_data['codigo_cliente'],
                                     movement_data['valor'] * movement_type['factor_cliente'])
Beispiel #3
0
 def test_operate_balance(self):
     data_clients.operate_balance('2551212', 250)