Relative to changes 18b86b3ffd MT#5879 Remove template active as logic changed to
invoice per customer.
Is prepared to work with config from templates.
$opt->{reseller_id}=[$dbh->selectrow_array('select distinct contacts.reseller_id from contracts inner join contacts on contracts.contact_id=contacts.id '.ify(' where contracts.id',@{$opt->{client_contract_id}}),undef,@{$opt->{client_contract_id}})];
$opt->{client_contact_id}=[$dbh->selectrow_array('select distinct contracts.contact_id from contracts '.ify(' where contracts.id',@{$opt->{client_contract_id}}),undef,@{$opt->{client_contract_id}})];
@ -360,27 +386,8 @@ sub get_invoice_template{
$svg=$dbh->selectrow_array('select data from invoice_templates where id=?',undef,$client_contract->{invoice_template_id});
#if(!$svg){
# $logger->debug( "No saved template for customer - no invoice;\n");
$svg=$dbh->selectrow_array('select data from invoice_templates where is_active = 1 and type = "svg" and reseller_id=?',undef,$provider_contract->{reseller_core_id});
}
if(!$svg){
$svg=$svg_default;
$logger->debug("No saved active template - no invoice;\n");
return;
$logger->debug("No saved template for customer - no invoice;\n");