Skip to content

Instantly share code, notes, and snippets.

View W3BGUY's full-sized avatar
🤐
Burnt Out

w3bguy W3BGUY

🤐
Burnt Out
View GitHub Profile

Keybase proof

I hereby claim:

  • I am w3bguy on github.
  • I am w3bguy (https://keybase.io/w3bguy) on keybase.
  • I have a public key whose fingerprint is DFB0 0181 BFFE 2D61 8F56 F5B1 CC98 37AC B550 E038

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am w3bguy on github.
  • I am w3bguy (https://keybase.io/w3bguy) on keybase.
  • I have a public key whose fingerprint is F479 2C98 E845 D1CE 2D3D F345 217D 187E EBD9 D29A

To claim this, I am signing this object:

<trans>
accoundAddressSFCountry=CASE(
accountAddressNSCountry=="_afghanistan","AF",
accountAddressNSCountry=="_alandIslands","AX",
accountAddressNSCountry=="_albania","AL",
accountAddressNSCountry=="_algeria","DZ",
accountAddressNSCountry=="_americanSamoa","AS",
accountAddressNSCountry=="_andorra","AD",
accountAddressNSCountry=="_angola","AO",
accountAddressNSCountry=="_anguilla","AI",
@W3BGUY
W3BGUY / netsuiteCountryDict.txt
Last active August 8, 2019 19:04
Jitterbit - Country/Country Codes to NetSuite Country Format
<trans>
/*
convert input country names/abbreviations to the NetSuite country code
*/
$netsuiteCountryDict = Dict();
$netsuiteCountryDict["Afghanistan"]="_afghanistan";
$netsuiteCountryDict["Albania"]="_albania";
$netsuiteCountryDict["Algeria"]="_algeria";
$netsuiteCountryDict["American Samoa"]="_americanSamoa";
@W3BGUY
W3BGUY / NetSuite_RESTlet_Query_File_Contents_by_InternalID.js
Last active January 25, 2023 15:18
Simple NetSuite SuiteScript 2.0 RESTlet to gather file information, since the basic call does not return the file contents.
/**
* @NApiVersion 2.0
* @NScriptType Restlet
* @NModuleScope SameAccount
* @Author Charles.Bastian
* @Created 2019-03-13
* @ScriptName NetSuite_RESTlet_Query_File_Contents_by_InternalID
* @Filename NetSuite_RESTlet_Query_File_Contents_by_InternalID.js
* @ScriptID customscript_rs_get_file_contents
* @Production
@W3BGUY
W3BGUY / JavaScript - Remove Duplicates from Array
Created September 10, 2019 18:49
On liner that can be used to remove duplicates from an array. Great for use in NetSuite scripts.
var newArray=oldArray.reduce(function(a,b){if(a.indexOf(b)<0)a.push(b);return a;},[]);
@W3BGUY
W3BGUY / CB_CM_CustomModule.js
Created March 12, 2020 15:50
NetSuite_SuiteScript_2.0_Custom_Module
/**
* CB_CM_CustomModule.js
* @NApiVersion 2.x
* @NModuleScope SameAccount
*
* @Author: Charles.Bastian
* @Created: 2020-03-12
* @ScriptName: CB_CM_CustomModule
* @Filename: CB_CM_CustomModule.js
* @ScriptID:
@W3BGUY
W3BGUY / NetSuite Transaction Status Codes
Created August 4, 2020 19:45
List of NetSuite Transaction Status Names and Codes
Bill:Open <===> VendBill:A
Bill:Paid In Full <===> VendBill:B
Bill Payment:Voided <===> VendPymt:V
Bill Payment:Online Bill Pay Pending Accounting Approval <===> VendPymt:Z
Cash Sale:Unapproved Payment <===> CashSale:A
Cash Sale:Not Deposited <===> CashSale:B
Cash Sale:Deposited <===> CashSale:C
Check:Voided <===> Check:V
Check:Online Bill Pay Pending Accounting Approval <===> Check:Z
Commission:Pending Payment <===> Commissn:A
@W3BGUY
W3BGUY / NetSuite_DueDateCalculation.js
Last active August 6, 2020 14:50
Simple function to calculate the due date based on an invoice date and terms ID.
function calculateDueDate(termID,invDate){
var dueDate=''
try{
var daysToAdd=search.lookupFields({type:'term',id:termID,columns:['daysuntilnetdue']}).daysuntilnetdue;
dueDate=new Date(format.parse({value:invDate,type:format.Type.DATE}));
dueDate.setDate(dueDate.getDate()+parseInt(daysToAdd));
}catch(err01){
log.error('calculateDueDate.err01',JSON.stringify(err01));
handleErrorAndSendNotification(err01,'calculateDueDate');
}finally{
@W3BGUY
W3BGUY / Wifi Password List
Created August 16, 2020 14:33
List of random passwords that I've gathered
Gloria's Cafe
- I Love Gloria's
- iloveglorias
Austin Oral (on 1)
- AOS-GUEST
- aos-guest
Dozen Street
- The Doz