X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main.pm;h=1ed1d4ace6aa56d6642c793b77fa31301524d767;hb=2e4fa975e054554beac71883436b143267d7aa12;hp=294546cf95d60798ae22195c07e7114a31069b9c;hpb=2dabe066bf48850682bc931111982a0ccf96ca4d;p=freeside.git diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 294546cf9..1ed1d4ace 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -400,7 +400,7 @@ sub insert { $payby = 'PREP' if $amount; - } elsif ( $self->payby =~ /^(CASH|WEST|MCRD|PPAL)$/ ) { + } elsif ( $self->payby =~ /^(CASH|WEST|MCRD|MCHK|PPAL)$/ ) { $payby = $1; $self->payby('BILL'); @@ -2139,8 +2139,8 @@ Returns all notes (see L) for this customer. sub notes { my($self,$orderby_classnum) = (shift,shift); - my $orderby = "_DATE DESC"; - $orderby = "CLASSNUM ASC, $orderby" if $orderby_classnum; + my $orderby = "sticky DESC, _date DESC"; + $orderby = "classnum ASC, $orderby" if $orderby_classnum; qsearch( 'cust_main_note', { 'custnum' => $self->custnum }, '', @@ -3074,6 +3074,7 @@ Old-style: =cut +#super false laziness w/quotation::charge sub charge { my $self = shift; my ( $amount, $setup_cost, $quantity, $start_date, $classnum ); @@ -4326,7 +4327,10 @@ sub notify { return unless $conf->exists($template); - my $from = $conf->config('invoice_from', $self->agentnum) + my $from = $conf->config('invoice_from_name', $self->agentnum) ? + $conf->config('invoice_from_name', $self->agentnum) . ' <' . + $conf->config('invoice_from', $self->agentnum) . '>' : + $conf->config('invoice_from', $self->agentnum) if $conf->exists('invoice_from', $self->agentnum); $from = $options{from} if exists($options{from});