<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>What does this script do? I’m no programmer, but it appears to export data.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Will - NMSURF</p><p class=MsoNormal><o:p> </o:p></p><p>cust_main.export<o:p></o:p></p><p style='margin-bottom:12.0pt'>#!/usr/bin/perl<br><br>use strict;<br>use Text::CSV_XS;<br>use FS::UID qw(adminsuidsetup);<br>use FS::Record qw(qsearch);<br>use FS::cust_main;<br><br>my @fields = qw(<br> custnum<br> status<br> last<br> first<br> company<br> address1<br> address2<br> city<br> county<br> state<br> zip<br> country<br> daytime<br> night<br> mobile<br> fax<br> ship_address1<br> ship_address2<br> ship_city<br> ship_county<br> ship_state<br> ship_zip<br> ship_country<br> ship_daytime<br> ship_night<br> ship_mobile<br> ship_fax<br> invoicing_list_emailonly_scalar<br> payby<br> balance<br>);<br><br>push @fields,<br> #Billing Type: Credit Card<br> { 'header' => 'Credit Card number',<br> 'callback' => sub { my $c_m = shift;<br> $c_m->payby =~ /^(CARD|DCRD)$/ ? $c_m->payinfo : '' ;<br> },<br> },<br> { 'header' => 'Expiration on card',<br> 'callback' => sub { my $c_m = shift;<br> return '' unless $c_m->payby =~ /^(CARD|DCRD)$/;<br> $c_m->paydate =~ /^(\d{4})-(\d{2})-\d{2}$/ or die;<br> return "$2/$1";<br> },<br> },<br> { 'header' => 'Name on card',<br> 'callback' => sub { my $c_m = shift;<br> $c_m->payby =~ /^(CARD|DCRD)$/ ? $c_m->paydname : '' ;<br> },<br> },<br><br> #Billing Type: Electronic check<br> { 'header' => 'ABA/Routing number',<br> 'callback' => sub { my $c_m = shift;<br> return '' unless $c_m->payby =~ /^(CHEK|DCHK)$/;<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:nathan@nkent.us">Nathan Kennedy</a><br><b>Sent: </b>Friday, February 15, 2019 11:21 AM<br><b>To: </b><a href="mailto:freeside-users@freeside.biz">freeside-users@freeside.biz</a><br><b>Subject: </b>Re: [freeside-users] Export ACH info</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>On Fri, 2019-02-15 at 10:44 -0700, William Pearson wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #729FCF 1.5pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal>Trying to export ACH info into another system, is it possible to export ACH and unmask the X's so we can import the data into a new system? Haven't found a way.<o:p></o:p></p></blockquote><div><p class=MsoNormal>Hello Will,<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>The payment information is in the cust_payby table and you will need to use the key stored in the encryptionprivatekey setting to decrypt the payinfo field.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><pre>-- </pre><div><p class=MsoNormal>Nathan Kennedy<o:p></o:p></p></div><div><p class=MsoNormal>Contracted Professional IT<o:p></o:p></p></div><div><p class=MsoNormal>(360) 637-1090<o:p></o:p></p></div></div><p class=MsoNormal>https://www.nkent.us/<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>