Skip to content

Instantly share code, notes, and snippets.

View hasokeric's full-sized avatar
👋

Haso Keric hasokeric

👋
View GitHub Profile
@hasokeric
hasokeric / Epicor Helpers
Created March 23, 2015 19:02
Epicor Helpers
// ---------------------------------------------------------------------------------------
// HELPER FUNCTIONS
// ---------------------------------------------------------------------------------------
/**
* Rounds & Converts a value
*
* @type Custom Function
* @return decimal
@hasokeric
hasokeric / Epicor Research Notes
Created March 23, 2015 19:03
Some Epicor Research Notes
use the Framework:
Epicor.Mfg.UI.FrameWork.FormFunctions.IsRunningInIDE()
IsNum
IsDate
GetImageFromLocalList
GetSessionFromSender
GetAvailableAdapters
buildKeyList
SendShortcutListToEmail
@hasokeric
hasokeric / bling.js
Last active August 29, 2015 14:23 — forked from paulirish/bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document)
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn)
}
NodeList.prototype.__proto__ = Array.prototype
@hasokeric
hasokeric / php_quarter_date_helper
Created July 10, 2015 18:38
PHP Get Quarterly Date Start and End
function get_quarter_dates_array($quarter)
{
$date_start = "%Y-01-01";
$date_end = "%Y-03-31";
switch ($quarter)
{
case 1:
$date_start = "%Y-01-01";
$date_end = "%Y-03-31";
@hasokeric
hasokeric / Epicor-UD-KeyField.cs
Created September 29, 2015 18:04
Epicor UD Entry KeyField
// **************************************************
// Custom code for UD100Form
// Created: 2/11/2014 10:24:37 AM
// **************************************************
using System;
using System.Drawing;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
@hasokeric
hasokeric / test.cs
Created December 23, 2015 02:30 — forked from usdoingstuff/test.cs
using Epicor.Customization.Bpm;
using Epicor.Data;
using Epicor.Hosting;
using Epicor.Utilities;
using Erp.Contracts;
using Erp.Tables;
using Erp.Tablesets;
using Ice;
using Ice.Contracts;
using Ice.ExtendedData;
OUTPUT TO "C:\quotes.csv" PAGE-SIZE 0.
EXPORT DELIMITER ";"
"QuoteNum"
"ROWID".
FOR EACH QuoteHed NO-LOCK:
EXPORT DELIMITER ";"
string(QuoteHed.QuoteNum)
string(ROWID(QuoteHed)).
END.
@hasokeric
hasokeric / email-deadlines.php
Created January 14, 2016 19:12 — forked from cfenollosa/email-deadlines.php
Postpone your own email
#!/usr/bin/env php
<?php
// Script to postpone your own email. Parses IMAP folders and moves emails to a folder named "Today"
// Run this from a crontab, for example at 6 AM
// BSD License
// (C) Carlos Fenollosa, 2011-2016
// Read more about this script: http://cfenollosa.com/blog/a-simple-script-to-postpone-your-own-email.html
// Please leave comments and feedback for bugs and ideas!
@hasokeric
hasokeric / BarTender Dealing with CBool use ABS()
Created January 25, 2016 12:38
BarTender Dealing with CBool use ABS()
'Called for every label that is printed.
'================================================
' Used to Set All Label Changes at once for speed
'================================================
Dim btNamedSubString
btNamedSubString = ""
'================================================
@hasokeric
hasokeric / CSharp_ConverSecondsSinceMidnight.cs
Last active March 18, 2016 13:13
Epicor: Convert Seconds Since Midnight to an Actual Time
public static string ConvertSecondsToTime(int secondsSinceMidnight)
{
// Initialize Variables
int hour = 0, minutes = 0, seconds = 0;
decimal hourSecondsLeftOver = 0;
// Get Hour
hour = (int) secondsSinceMidnight / 3600;
hourSecondsLeftOver = (decimal) secondsSinceMidnight - (hour * 3600);