Archives

 
Let's have a short discussion about HashSets, and why I needed to use one today. 

First off - not a developer - just a working-class consultant trying to add value.

My client has complex Smart Connect Object for integrating Sales Invoices. It works great - was designed to download a source file of invoices from different billing system (FTP Site) - validate the dataset - then find the GP CustomerID (not provided in source file we have to verify it exists) - then it populates a staging table (with data from source file and the correct GP CustomerID) then it finally after all the preparation integrates the data. 

They have decommissioned the FTP site  - replacing with an internal site. 

Since the object is so complex - I would prefer to simply change the powershell and theoretically all the other stuff should still work. 

The very first task is to download a source file from a WinSCP site.

Here's the code - I need to modify to download a file stored on a separate internal server (10.50.11.41\APFMFN\newest file date that starts with billings) - no password/credentials - windows user will have permissions

# Load WinSCP .NET assembly
Add-Type -Path "C:\Program Files (x86)\WinSCP\WinSCPnet.dll"

# Setup session options
$sessionOptions = New-Object WinSCP.SessionOptions -Property @{
    Protocol = [WinSCP.Protocol]::Sftp
    HostName = "66.129.101.73"
    UserName = "APFMFN"
    Password = "2@35Qu!7AC"
    SshHostKeyFingerprint = "ssh-rsa 2048 ywyt75fPTy3unlIuWI7x3k4bUct218VuzIaUn4yyHjM="
}


# Connect
Write-Host "Connecting..."
$session = New-Object WinSCP.Session
$session.SessionLogPath = "\\USW2GPAPP01\GPSHARE\SC_Import\FTP\incremental_download.log"
$session.Open($sessionOptions)


# Download files
$transferResult =
     $session.GetFiles("/*.csv", "\\USW2GPAPP01\GPSHARE\SC_Import\Source\*")
# Process source files
foreach ($transfer in $transferResult.Transfers)
{
    # Success or error?
    if ($transfer.Error -eq $Null)
    {
        $newName =
            "/" +
            #(Get-Date -Format "yyyy-MM-dd-hh-mm-ss") + "_" +
            [IO.Path]::GetFileName($transfer.FileName) + ".processed"
        Write-Host (
            "Download of $($transfer.FileName) succeeded, renaming to backup $newName")
        $session.MoveFile($transfer.FileName, $newName)
    }
    else
    {
        Write-Host (
            "Download of $($transfer.FileName) failed: $($transfer.Error.Message)")
    }
}

Thanks in advance - very little experience with bat files and powershell 

En la imagen de abajo, se muestran lotes de unas transacciones que quedaron colgadas, no permite contabilizarlas si le doy continuar , si les quito el chek , no sabría donde buscarla.  Me podrían ayudar con ello, Saludos

 

Editor: 

In the image below, lots of some transactions that were hung are shown, it does not allow me to count them if I continue, if I remove the check, I would not know where to look for it.  You could help me with that,

.

I was going to run a check links against Manufacturing, but I see the following after selecting "Manufacturing Inventory"

Zero records.

I have a manufacturing order receipt that partially posted.  Finished goods was updated, but inventory was not properly.

I was going to run the check links to see if it would correct it.  Any thoughts?

 

Saludos a todos, Felices Fiestas, salud y prosperidad para el 2022.

Con frecuencia se producen devoluciones de artículos, la aplicación de tienda, que los carga a GP2018 lo hace asignándolos como devueltos, sin embargo muchas de estos pueden pasar a disponible y venderse.

Desconozco un procedimiento que me permita cambiara de devuelto a Disponible.

¿Alguien conoce como hacerlo?

 

Edit 12/19/2021

Frequently returns of items occur.

The store application, which uploads them to GP2018 does so by assigning them as returned, however many of these can become available and sold.

I do not know of a procedure that would allow me to change from returned to Available.

Does anyone know how to do it?

Table TA_MAP (in DYNAMICS db) has a couple of entries. These entries look like the production database and test database are pointing to each other. I do not see the need for this kind of linkage. Does anyone know what this table (TA_MAP) in DYNAMICS database is used for?

MASTERDB REPLICATE_TO_DB

LIVE TEST

TEST LIVE

Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3