This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() | |
{ | |
var obj = sc$Method.Parameters("dataObject"); | |
var prop = sc$Method.Parameters("propertyName"); | |
var newVal = sc$Method.Parameters("value"); | |
var oldVal = sc$Method.Parameters("oldValue"); | |
if (obj.ToString() === "Hercules.Obj.INF.EntriesDataObjects.ComEntries.heCentLinesDataObject" && sc$AppSessionInfo.CurrentCompanyID === "afcd0e41-43c8-e611-80db-1402ec64c7fc") | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Delete Reservations from Pylon | |
BEGIN TRAN | |
DECLARE @ResIDs TABLE (heid uniqueidentifier) | |
-- | |
-- Insert the required WHERE, otherwirse all reservations will be deleted!!! | |
-- | |
INSERT INTO @ResIDs SELECT heid from hereservations --where << whatever you need |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i in_movie.mkv -c:v libx265 -crf 28 -preset veryslow -tune fastdecode -vf "scale='-1:min(1080,ih)'" -f mp4 out_movie.mp4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find /my/folder/subfolder/ -type f -exec du -Sh {} + | sort -rh | head -n 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Hotel Transcations στο Εμπορικό - Εισπράξεις | |
SELECT | |
A.HECSTMID, | |
hr.heresnum, | |
doc.hedoccode, | |
hb.herefnumber billno, | |
a.hedentid, | |
a.hefindentid, | |
a.hedepositdentid, | |
a.hedepositref, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE hecustomers | |
SET hecode = a.newcode | |
FROM (SELECT | |
heid, | |
concat(LEFT(hecode, 5), RIGHT(concat('00000000', ROW_NUMBER() OVER (ORDER BY hecode)), 8)) AS newcode | |
FROM hecustomers) AS a | |
INNER JOIN hecustomers | |
ON hecustomers.heid = a.heid | |
UPDATE hesuppliers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() { | |
var docCode = sc$Row.Item["DocCode"]; | |
var refNumber = sc$Row.Item["heRefNumber"]; | |
var strSQL = "select isnull(herefdoccode, hedoccode) from hedocentries where hedoccode = '" + docCode + "' and herefnumber = '" + refNumber + "'"; | |
var RefDocCode = sc$Db.ExecuteScalar(strSQL); | |
return RefDocCode; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Hotel Transcations στο Εμπορικό - Εισπράξεις | |
SELECT | |
A.HECSTMID, | |
hr.heresnum, | |
doc.hedoccode, | |
hb.herefnumber billno, | |
a.hedentid, | |
a.hefindentid, | |
a.hedepositdentid, | |
a.hedepositref, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Ενημέρωση γραμμών με τιμές (τελευταία υπολογιζομένη τιμή κόστους) | |
UPDATE HEWENTLINES | |
SET HEPRICE = ROUND((SELECT | |
CASE | |
WHEN ISNULL(purprc.HEITEMCOST, 0) = 0 THEN lines.HEPRICE | |
ELSE purprc.HEITEMCOST | |
END AS newprice | |
FROM HEDOCENTRIES doc, | |
HEWENTLINES lines, | |
HEITEMS ite, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
1. Backup HeDocSeries | |
*/ | |
INSERT INTO hedocseries_bak | |
SELECT | |
* | |
FROM hedocseries | |
/* | |
* |
NewerOlder