Squash al branch-ului de lucru plan13-s2. Clase: ofacturare (nucleul formularului unificat), ofacturare_comun, ferestre_cere_date, ocomenzi, caut_ora (lista de preturi in combo-urile de cautare), omodificari. Programe: ofacturare impartit - ofacturare_antet, ofacturare_rutare_scriere si ogrid_latimi sunt fisiere noi; oproceduri_facturare primeste discountul pe linie si cota standard de TVA cand articolul nu are cota pe politica. Documentatie: capcana SQLExec no_data_found, conventia de encoding, depanarea testelor VFP si regulile de lucru - conflictele cu modificarile venite din alte proiecte sunt rezolvate pastrand ambele parti. Loguri de rulare a testelor scoase din versionare; testele raman. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PkyjGyrV2S7932om4kfSiK
33 lines
1.2 KiB
PowerShell
33 lines
1.2 KiB
PowerShell
param([Parameter(Mandatory=$true)][string]$Nume, [int]$TimeoutMs = 300000)
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
$dir = 'D:\ROA\ROAFACTURARE\COMUN\utile\Teste\facturare_unificat'
|
|
$prg = Join-Path $dir ($Nume + '.prg')
|
|
$log = Join-Path $dir ('out\' + $Nume + '.log')
|
|
$vfp = 'C:\Program Files (x86)\Microsoft Visual FoxPro 9\vfp9.exe'
|
|
|
|
if (-not (Test-Path $prg)) { "Nu exista $prg"; exit 1 }
|
|
|
|
$viu = Get-WmiObject Win32_Process -Filter "Name='vfp9.exe'" | Where-Object { $_.CommandLine -like ('*' + $Nume + '*') }
|
|
if ($viu) {
|
|
"Ruleaza deja o instanta a suitei (PID " + ($viu.ProcessId -join ',') + "). Nu lansez a doua."
|
|
exit 1
|
|
}
|
|
|
|
Set-Location $dir
|
|
Remove-Item (Join-Path $dir ($Nume + '.FXP')) -ErrorAction SilentlyContinue
|
|
Remove-Item $log -ErrorAction SilentlyContinue
|
|
|
|
$p = Start-Process -FilePath $vfp -ArgumentList '-A', '-T', $prg -PassThru
|
|
"lansat PID " + $p.Id
|
|
$null = $p.WaitForExit($TimeoutMs)
|
|
if (-not $p.HasExited) {
|
|
"ATARNAT dupa " + [int]($TimeoutMs/1000) + "s - omor instanta (filtrat pe CommandLine)"
|
|
Get-WmiObject Win32_Process -Filter "Name='vfp9.exe'" | Where-Object { $_.CommandLine -like ('*' + $Nume + '*') } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force }
|
|
}
|
|
if (Test-Path $log) {
|
|
Get-Content $log
|
|
} else {
|
|
"Log inexistent: $log"
|
|
}
|