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)
def calculate_factor_pending_pay_client(movement_data, movement_type): if not movement_type.get('factor_pago_pendiente') is None: data_clients.operate_pending_pay(movement_data['codigo_cliente'], movement_data['valor'] * movement_type['factor_pago_pendiente'])