Compare commits
47
Commits
7b6cb1e111
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
79eff57d70 | ||
|
|
9ac3f70a13 | ||
|
|
972f2f1f47 | ||
|
|
d43f2729bd | ||
|
|
987c2c1122 | ||
|
|
e414e52523 | ||
|
|
a3e88776a9 | ||
|
|
9e70c46451 | ||
|
|
adf5224440 | ||
|
|
888a36553e | ||
|
|
97ef961e13 | ||
|
|
77e844390e | ||
|
|
81182e5ded | ||
|
|
60e392c033 | ||
|
|
367f0c4340 | ||
|
|
43aa1c809d | ||
|
|
b6085d4140 | ||
|
|
affc09c3e8 | ||
|
|
4532d51e4b | ||
|
|
ee27da0669 | ||
|
|
b27b20d42d | ||
|
|
382ec5cd35 | ||
|
|
4cb8d4c71b | ||
|
|
f216a7acfa | ||
|
|
f140ab917e | ||
|
|
cda8053d90 | ||
|
|
7f789181cf | ||
|
|
26961ddd81 | ||
|
|
3284ae0de9 | ||
|
|
ea1493db43 | ||
|
|
7b1b414629 | ||
|
|
0d17478789 | ||
|
|
6f50812bb1 | ||
|
|
052b80de34 | ||
|
|
cc4964af5e | ||
|
|
3df53ba483 | ||
|
|
91eeef199e | ||
|
|
f230a3002d | ||
|
|
817720127e | ||
|
|
a37d0336b5 | ||
|
|
c4169453ce | ||
|
|
7f975157a5 | ||
|
|
69b4500eed | ||
|
|
b7877d7c07 | ||
|
|
b05e858ac6 | ||
|
|
33f477778e | ||
|
|
c0f6b23e19 |
File diff suppressed because one or more lines are too long
@@ -0,0 +1,561 @@
|
||||
<title>Radiografía Marmotech</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap">
|
||||
<style>
|
||||
:root{
|
||||
--bg:#f2efe9; --surface:#fbfaf7; --surface-2:#f5f2ea;
|
||||
--ink:#231f18; --muted:#726c60; --faint:#9a9284;
|
||||
--line:#e4dfd4; --line-2:#efe9dd;
|
||||
--accent:#9a6a2b; --accent-soft:#e9dcc4;
|
||||
--pos:#2f7d57; --neg:#b3402a; --warn:#b1832a;
|
||||
--grid:#eae4d8;
|
||||
--shadow:0 1px 2px rgba(40,33,20,.05),0 8px 24px -12px rgba(40,33,20,.14);
|
||||
--radius:14px;
|
||||
}
|
||||
@media (prefers-color-scheme:dark){
|
||||
:root:not([data-theme="light"]){
|
||||
--bg:#17150f; --surface:#211e16; --surface-2:#26221a;
|
||||
--ink:#ece6da; --muted:#a69d8c; --faint:#7c7361;
|
||||
--line:#332e24; --line-2:#2b271e;
|
||||
--accent:#cd9c56; --accent-soft:#3a3020;
|
||||
--pos:#4fb07f; --neg:#e0674e; --warn:#d5a34a;
|
||||
--grid:#2a261d;
|
||||
--shadow:0 1px 2px rgba(0,0,0,.4),0 10px 30px -14px rgba(0,0,0,.6);
|
||||
}
|
||||
}
|
||||
:root[data-theme="dark"]{
|
||||
--bg:#17150f; --surface:#211e16; --surface-2:#26221a;
|
||||
--ink:#ece6da; --muted:#a69d8c; --faint:#7c7361;
|
||||
--line:#332e24; --line-2:#2b271e;
|
||||
--accent:#cd9c56; --accent-soft:#3a3020;
|
||||
--pos:#4fb07f; --neg:#e0674e; --warn:#d5a34a;
|
||||
--grid:#2a261d;
|
||||
--shadow:0 1px 2px rgba(0,0,0,.4),0 10px 30px -14px rgba(0,0,0,.6);
|
||||
}
|
||||
*{box-sizing:border-box}
|
||||
html,body{margin:0}
|
||||
body{
|
||||
background:var(--bg); color:var(--ink);
|
||||
font-family:"IBM Plex Sans",system-ui,sans-serif;
|
||||
font-size:15px; line-height:1.5;
|
||||
-webkit-font-smoothing:antialiased;
|
||||
}
|
||||
.wrap{max-width:1220px; margin:0 auto; padding:22px 20px 60px}
|
||||
.num{font-variant-numeric:tabular-nums; font-feature-settings:"tnum" 1}
|
||||
|
||||
/* Header */
|
||||
header.top{display:flex; align-items:flex-end; justify-content:space-between; gap:20px; flex-wrap:wrap; margin-bottom:6px}
|
||||
.brand{display:flex; align-items:center; gap:14px}
|
||||
.mark{width:44px; height:44px; flex:0 0 auto}
|
||||
.brand h1{font-family:"Fraunces",serif; font-weight:600; font-size:26px; letter-spacing:-.01em; margin:0; line-height:1.05}
|
||||
.brand .sub{color:var(--muted); font-size:12.5px; letter-spacing:.14em; text-transform:uppercase; margin-top:3px}
|
||||
.period{text-align:right}
|
||||
.period .lbl{font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--faint)}
|
||||
.period .val{font-family:"Fraunces",serif; font-size:19px; font-weight:500}
|
||||
.period .note{font-size:11.5px; color:var(--muted)}
|
||||
|
||||
.rule{height:1px; background:linear-gradient(90deg,var(--accent),var(--line) 60%,transparent); margin:16px 0 18px; opacity:.7}
|
||||
|
||||
/* Tabs */
|
||||
nav.tabs{display:flex; gap:4px; margin-bottom:20px; border-bottom:1px solid var(--line); flex-wrap:wrap}
|
||||
nav.tabs button{
|
||||
appearance:none; border:0; background:none; cursor:pointer; color:var(--muted);
|
||||
font-family:inherit; font-size:14px; font-weight:500; padding:10px 15px; border-radius:8px 8px 0 0;
|
||||
border-bottom:2px solid transparent; margin-bottom:-1px; display:flex; align-items:center; gap:8px;
|
||||
}
|
||||
nav.tabs button .idx{font-family:"IBM Plex Mono",monospace; font-size:11px; color:var(--faint)}
|
||||
nav.tabs button:hover{color:var(--ink); background:var(--surface-2)}
|
||||
nav.tabs button[aria-selected="true"]{color:var(--ink); border-bottom-color:var(--accent)}
|
||||
nav.tabs button[aria-selected="true"] .idx{color:var(--accent)}
|
||||
:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
|
||||
|
||||
.page{display:none; animation:fade .35s ease}
|
||||
.page.active{display:block}
|
||||
@keyframes fade{from{opacity:0; transform:translateY(4px)}to{opacity:1; transform:none}}
|
||||
@media (prefers-reduced-motion:reduce){.page,.page.active{animation:none}}
|
||||
|
||||
/* Cards & grid */
|
||||
.grid{display:grid; gap:14px}
|
||||
.kpis{grid-template-columns:repeat(4,1fr)}
|
||||
.card{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:16px 17px}
|
||||
.card h3{margin:0 0 2px; font-size:11.5px; letter-spacing:.13em; text-transform:uppercase; color:var(--muted); font-weight:600}
|
||||
.card .cap{font-size:11.5px; color:var(--faint); margin:0 0 12px}
|
||||
.kpi .k-val{font-family:"Fraunces",serif; font-weight:600; font-size:29px; letter-spacing:-.01em; line-height:1.05; margin-top:6px}
|
||||
.kpi .k-val small{font-size:14px; color:var(--muted); font-weight:500; font-family:"IBM Plex Sans"}
|
||||
.kpi .k-sub{display:flex; align-items:center; gap:8px; margin-top:9px; font-size:12.5px; color:var(--muted)}
|
||||
.delta{display:inline-flex; align-items:center; gap:4px; font-weight:600; font-variant-numeric:tabular-nums; padding:2px 7px; border-radius:20px; font-size:12px}
|
||||
.delta.up{color:var(--pos); background:color-mix(in srgb,var(--pos) 12%,transparent)}
|
||||
.delta.down{color:var(--neg); background:color-mix(in srgb,var(--neg) 12%,transparent)}
|
||||
.delta.flat{color:var(--warn); background:color-mix(in srgb,var(--warn) 12%,transparent)}
|
||||
.accent-bar{height:3px; border-radius:3px; background:var(--accent); opacity:.9; margin:-16px -17px 14px; border-radius:var(--radius) var(--radius) 0 0}
|
||||
|
||||
.row{display:grid; gap:14px; margin-top:14px}
|
||||
.r-8-4{grid-template-columns:1.9fr 1.1fr}
|
||||
.r-6-6{grid-template-columns:1fr 1fr}
|
||||
.r-7-5{grid-template-columns:1.4fr 1fr}
|
||||
|
||||
/* Chart bits */
|
||||
svg{display:block; width:100%; height:auto; overflow:visible}
|
||||
.lgd{display:flex; gap:16px; flex-wrap:wrap; font-size:12px; color:var(--muted); margin-top:10px}
|
||||
.lgd span{display:inline-flex; align-items:center; gap:6px}
|
||||
.dot{width:10px; height:10px; border-radius:3px; display:inline-block}
|
||||
|
||||
table.tbl{width:100%; border-collapse:collapse; font-size:13px}
|
||||
table.tbl th{text-align:left; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--faint); font-weight:600; padding:7px 8px; border-bottom:1px solid var(--line)}
|
||||
table.tbl td{padding:8px; border-bottom:1px solid var(--line-2); font-variant-numeric:tabular-nums}
|
||||
table.tbl td.r,table.tbl th.r{text-align:right}
|
||||
table.tbl tr:last-child td{border-bottom:0}
|
||||
.barcell{position:relative}
|
||||
.barcell .fill{position:absolute; left:0; top:50%; transform:translateY(-50%); height:60%; border-radius:3px; background:var(--accent-soft)}
|
||||
.barcell span{position:relative}
|
||||
|
||||
.ratio{display:flex; align-items:baseline; gap:10px}
|
||||
.ratio .big{font-family:"Fraunces",serif; font-weight:600; font-size:34px; letter-spacing:-.02em}
|
||||
.foot{color:var(--muted); font-size:12px; margin-top:26px; border-top:1px solid var(--line); padding-top:14px}
|
||||
.foot code{font-family:"IBM Plex Mono",monospace; font-size:11.5px; background:var(--surface-2); padding:1px 5px; border-radius:4px}
|
||||
.pill{font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--accent); background:var(--accent-soft); padding:3px 8px; border-radius:20px; font-weight:600}
|
||||
|
||||
@media(max-width:880px){
|
||||
.kpis{grid-template-columns:repeat(2,1fr)}
|
||||
.r-8-4,.r-6-6,.r-7-5{grid-template-columns:1fr}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="wrap">
|
||||
<header class="top">
|
||||
<div class="brand">
|
||||
<svg class="mark" viewBox="0 0 44 44" aria-hidden="true">
|
||||
<rect x="1" y="1" width="42" height="42" rx="9" fill="none" stroke="var(--accent)" stroke-width="1.5"/>
|
||||
<path d="M8 30 L17 15 L23 24 L29 12 L36 30 Z" fill="none" stroke="var(--accent)" stroke-width="1.6" stroke-linejoin="round"/>
|
||||
<path d="M8 33 L36 33" stroke="var(--accent)" stroke-width="1.6"/>
|
||||
<circle cx="29" cy="12" r="1.8" fill="var(--accent)"/>
|
||||
</svg>
|
||||
<div>
|
||||
<h1>Radiografía de la Empresa</h1>
|
||||
<div class="sub">Marmotech, S.A. · Cuadro de Mando de Presidencia</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="period">
|
||||
<div class="lbl">Periodo</div>
|
||||
<div class="val num">Enero – Julio 2026</div>
|
||||
<div class="note">acumulado del año · comparado vs. 2025</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="rule"></div>
|
||||
|
||||
<nav class="tabs" role="tablist">
|
||||
<button role="tab" aria-selected="true" data-p="p1"><span class="idx">01</span> Radiografía</button>
|
||||
<button role="tab" aria-selected="false" data-p="p2"><span class="idx">02</span> Análisis de Gastos</button>
|
||||
<button role="tab" aria-selected="false" data-p="p3"><span class="idx">03</span> Estructura Financiera</button>
|
||||
</nav>
|
||||
|
||||
<!-- ============ PÁGINA 1 ============ -->
|
||||
<section class="page active" id="p1" role="tabpanel">
|
||||
<div class="grid kpis">
|
||||
<div class="card kpi"><div class="accent-bar"></div>
|
||||
<h3>Ventas Netas</h3>
|
||||
<div class="k-val num">RD$ 1,375.3<small> M</small></div>
|
||||
<div class="k-sub"><span class="delta down">▼ 1.3%</span> vs. 1,393.1 M (2025)</div>
|
||||
</div>
|
||||
<div class="card kpi">
|
||||
<h3>Utilidad Bruta</h3>
|
||||
<div class="k-val num">RD$ 706.9<small> M</small></div>
|
||||
<div class="k-sub"><span class="delta down">▼ 1.4 pp</span> margen 51.4% <span style="color:var(--faint)">(52.8%)</span></div>
|
||||
</div>
|
||||
<div class="card kpi">
|
||||
<h3>Utilidad Operativa</h3>
|
||||
<div class="k-val num">RD$ 292.1<small> M</small></div>
|
||||
<div class="k-sub"><span class="delta flat">21.2%</span> margen operativo</div>
|
||||
</div>
|
||||
<div class="card kpi"><div class="accent-bar"></div>
|
||||
<h3>Utilidad Neta</h3>
|
||||
<div class="k-val num">RD$ 219.6<small> M</small></div>
|
||||
<div class="k-sub"><span class="delta down">▼ 21.4%</span> margen 16.0% <span style="color:var(--faint)">(20.1%)</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row r-7-5">
|
||||
<div class="card">
|
||||
<h3>Estado de Resultados — Cascada</h3>
|
||||
<p class="cap">De ventas a utilidad neta · acumulado 2026 (RD$ millones)</p>
|
||||
<svg id="waterfall" viewBox="0 0 720 300" role="img" aria-label="Cascada del estado de resultados"></svg>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Composición de cada RD$ vendido</h3>
|
||||
<p class="cap">Estructura del peso de ventas · 2026</p>
|
||||
<svg id="composition" viewBox="0 0 360 300" role="img" aria-label="Composición de ventas"></svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row r-7-5">
|
||||
<div class="card">
|
||||
<h3>Comportamiento del periodo actual</h3>
|
||||
<p class="cap">Ventas netas (barras) y utilidad neta (línea) por mes · 2026</p>
|
||||
<svg id="trend" viewBox="0 0 720 280" role="img" aria-label="Tendencia mensual 2026"></svg>
|
||||
<div class="lgd">
|
||||
<span><i class="dot" style="background:var(--accent-soft)"></i> Ventas netas</span>
|
||||
<span><i class="dot" style="background:var(--accent)"></i> Utilidad neta</span>
|
||||
<span><i class="dot" style="background:var(--pos)"></i> Margen neto %</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Trayectoria anual</h3>
|
||||
<p class="cap">Ventas y utilidad neta por año (RD$ M) · 2026 parcial</p>
|
||||
<svg id="annual" viewBox="0 0 360 280" role="img" aria-label="Comparativo anual"></svg>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ============ PÁGINA 2 ============ -->
|
||||
<section class="page" id="p2" role="tabpanel">
|
||||
<div class="grid kpis">
|
||||
<div class="card kpi"><div class="accent-bar"></div>
|
||||
<h3>Gastos Operativos</h3>
|
||||
<div class="k-val num">RD$ 414.7<small> M</small></div>
|
||||
<div class="k-sub"><span class="delta down">▲ 7.1%</span> vs. 387.2 M (2025)</div>
|
||||
</div>
|
||||
<div class="card kpi">
|
||||
<h3>Gasto / Ventas</h3>
|
||||
<div class="k-val num">30.2<small> %</small></div>
|
||||
<div class="k-sub"><span class="delta down">▲ 2.4 pp</span> vs. 27.8% (2025)</div>
|
||||
</div>
|
||||
<div class="card kpi">
|
||||
<h3>Gerencia mayor peso</h3>
|
||||
<div class="k-val" style="font-size:22px">Ventas y Mercadeo</div>
|
||||
<div class="k-sub num">RD$ 184.5 M · 44% del gasto</div>
|
||||
</div>
|
||||
<div class="card kpi">
|
||||
<h3>Mayor alza YoY</h3>
|
||||
<div class="k-val" style="font-size:22px">Admin. y Materiales</div>
|
||||
<div class="k-sub num"><span class="delta down">▲ 13.3%</span> +12.3 M</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row r-6-6">
|
||||
<div class="card">
|
||||
<h3>Gasto por gerencia</h3>
|
||||
<p class="cap">2026 vs. 2025 · acumulado ene–jul (RD$ M)</p>
|
||||
<svg id="ger" viewBox="0 0 380 300" role="img" aria-label="Gasto por gerencia"></svg>
|
||||
<div class="lgd">
|
||||
<span><i class="dot" style="background:var(--accent)"></i> 2026</span>
|
||||
<span><i class="dot" style="background:var(--accent-soft)"></i> 2025</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Naturaleza del gasto</h3>
|
||||
<p class="cap">Por subgrupo contable · 2026 (RD$ M)</p>
|
||||
<table class="tbl">
|
||||
<thead><tr><th>Subgrupo</th><th class="r">Monto</th><th class="r">% ventas</th></tr></thead>
|
||||
<tbody id="subg"></tbody>
|
||||
</table>
|
||||
<p class="cap" style="margin-top:12px">El subgrupo <b>76 Cierre de gastos de fabricación</b> (−325.7 M) es una absorción a costo; reduce el gasto neto operativo.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="card">
|
||||
<h3>Gasto mensual — control de eficiencia</h3>
|
||||
<p class="cap">Gasto operativo por mes y su relación con las ventas · 2026</p>
|
||||
<svg id="gtrend" viewBox="0 0 720 250" role="img" aria-label="Gasto mensual"></svg>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ============ PÁGINA 3 ============ -->
|
||||
<section class="page" id="p3" role="tabpanel">
|
||||
<div class="grid kpis">
|
||||
<div class="card kpi"><div class="accent-bar"></div>
|
||||
<h3>Activos Totales</h3>
|
||||
<div class="k-val num">RD$ 6,435<small> M</small></div>
|
||||
<div class="k-sub">al 31-jul-2026</div>
|
||||
</div>
|
||||
<div class="card kpi">
|
||||
<h3>Razón Corriente</h3>
|
||||
<div class="k-val num">2.29<small> ×</small></div>
|
||||
<div class="k-sub"><span class="delta up">sólida</span> activo cte. 3,250 / pasivo cte. 1,420</div>
|
||||
</div>
|
||||
<div class="card kpi">
|
||||
<h3>Capital de Trabajo</h3>
|
||||
<div class="k-val num">RD$ 1,830<small> M</small></div>
|
||||
<div class="k-sub">holgura de liquidez operativa</div>
|
||||
</div>
|
||||
<div class="card kpi">
|
||||
<h3>Endeudamiento</h3>
|
||||
<div class="k-val num">36<small> %</small></div>
|
||||
<div class="k-sub"><span class="delta up">conservador</span> pasivo / activo</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row r-6-6">
|
||||
<div class="card">
|
||||
<h3>De dónde viene y dónde está el capital</h3>
|
||||
<p class="cap">Activos = Pasivos + Patrimonio + resultado del ejercicio (RD$ M)</p>
|
||||
<svg id="bal" viewBox="0 0 380 300" role="img" aria-label="Estructura del balance"></svg>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Composición del activo</h3>
|
||||
<p class="cap">al 31-jul-2026 (RD$ M)</p>
|
||||
<table class="tbl">
|
||||
<thead><tr><th>Rubro</th><th class="r">Saldo</th></tr></thead>
|
||||
<tbody id="act"></tbody>
|
||||
</table>
|
||||
<h3 style="margin-top:18px">Composición del pasivo</h3>
|
||||
<table class="tbl">
|
||||
<thead><tr><th>Rubro</th><th class="r">Saldo</th></tr></thead>
|
||||
<tbody id="pas"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="foot">
|
||||
<span class="pill">Prototipo de diseño</span>
|
||||
Vista previa del tablero de Power BI. Fuente: <code>MarmotechBI.presidencia.vwPLMensual</code>, <code>vwGastosDepto</code>, <code>vwBalanceMensual</code> —
|
||||
reproduce el Mayor General Analítico (cgprrp008) y el Análisis de Gastos (cgprrp009). Cifras validadas contra el sistema al 31-jul-2026.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function(){
|
||||
var css=getComputedStyle(document.documentElement);
|
||||
var C=function(n){return css.getPropertyValue(n).trim()};
|
||||
function col(n){return C(n)}
|
||||
var money=function(v){return v.toLocaleString('en-US',{minimumFractionDigits:1,maximumFractionDigits:1})};
|
||||
|
||||
/* tabs */
|
||||
var btns=document.querySelectorAll('nav.tabs button');
|
||||
btns.forEach(function(b){
|
||||
b.addEventListener('click',function(){
|
||||
btns.forEach(function(x){x.setAttribute('aria-selected','false')});
|
||||
b.setAttribute('aria-selected','true');
|
||||
document.querySelectorAll('.page').forEach(function(p){p.classList.remove('active')});
|
||||
document.getElementById(b.dataset.p).classList.add('active');
|
||||
});
|
||||
});
|
||||
|
||||
var NS='http://www.w3.org/2000/svg';
|
||||
function el(t,a){var e=document.createElementNS(NS,t);for(var k in a)e.setAttribute(k,a[k]);return e;}
|
||||
function txt(x,y,s,o){o=o||{};var t=el('text',{x:x,y:y});t.textContent=s;
|
||||
t.setAttribute('fill',o.fill||col('--muted'));
|
||||
t.setAttribute('font-size',o.fs||11);
|
||||
t.setAttribute('font-family',o.mono?'"IBM Plex Mono",monospace':'"IBM Plex Sans",sans-serif');
|
||||
t.setAttribute('font-weight',o.fw||400);
|
||||
if(o.anchor)t.setAttribute('text-anchor',o.anchor);
|
||||
t.setAttribute('font-variant-numeric','tabular-nums');
|
||||
return t;}
|
||||
|
||||
/* ---------- WATERFALL ---------- */
|
||||
(function(){
|
||||
var svg=document.getElementById('waterfall'); if(!svg)return;
|
||||
var W=720,H=300,padL=8,padR=8,base=250,top=20;
|
||||
var steps=[
|
||||
{l:'Ventas',v:1375.3,type:'start'},
|
||||
{l:'Costo',v:-668.4,type:'neg'},
|
||||
{l:'Ut. Bruta',v:706.9,type:'sub'},
|
||||
{l:'Gastos',v:-414.7,type:'neg'},
|
||||
{l:'Ut. Operat.',v:292.1,type:'sub'},
|
||||
{l:'Otros/ISR',v:-72.5,type:'neg'},
|
||||
{l:'Ut. Neta',v:219.6,type:'end'}
|
||||
];
|
||||
var max=1375.3, sc=(base-top)/max;
|
||||
var n=steps.length, gap=14, bw=(W-padL-padR-gap*(n-1))/n;
|
||||
var run=0;
|
||||
steps.forEach(function(s,i){
|
||||
var x=padL+i*(bw+gap), h, y, fill;
|
||||
if(s.type==='start'||s.type==='sub'||s.type==='end'){
|
||||
h=s.v*sc; y=base-h; run=s.v;
|
||||
fill = s.type==='end'?col('--accent') : (s.type==='start'?col('--accent'):col('--ink'));
|
||||
if(s.type==='sub')fill=col('--faint');
|
||||
}else{
|
||||
h=Math.abs(s.v)*sc; y=base-(run*sc); run=run+s.v;
|
||||
fill=col('--neg');
|
||||
}
|
||||
svg.appendChild(el('rect',{x:x,y:y,width:bw,height:Math.max(2,h),rx:3,fill:fill,opacity:s.type==='sub'?0.5:0.92}));
|
||||
svg.appendChild(txt(x+bw/2,base+16,s.l,{anchor:'middle',fs:10.5,fill:col('--muted')}));
|
||||
svg.appendChild(txt(x+bw/2,y-6,(s.v>0?'':'−')+money(Math.abs(s.v)),{anchor:'middle',fs:11,mono:true,fw:600,fill:col('--ink')}));
|
||||
});
|
||||
})();
|
||||
|
||||
/* ---------- COMPOSITION (stacked bar of one peso) ---------- */
|
||||
(function(){
|
||||
var svg=document.getElementById('composition'); if(!svg)return;
|
||||
var parts=[
|
||||
{l:'Costo de ventas',p:48.6,c:col('--neg')},
|
||||
{l:'Gastos operativos',p:30.2,c:col('--warn')},
|
||||
{l:'Otros / ISR',p:5.3,c:col('--faint')},
|
||||
{l:'Utilidad neta',p:16.0,c:col('--pos')}
|
||||
];
|
||||
var x=90,y=24,w=54,H=250,total=100,sc=H/total,cy=y;
|
||||
parts.forEach(function(p){
|
||||
var h=p.p*sc;
|
||||
svg.appendChild(el('rect',{x:x,y:cy,width:w,height:h,fill:p.c,opacity:.9}));
|
||||
svg.appendChild(txt(x-10,cy+h/2+4,p.p.toFixed(1)+'%',{anchor:'end',mono:true,fs:12,fw:600,fill:col('--ink')}));
|
||||
svg.appendChild(txt(x+w+10,cy+h/2+4,p.l,{fs:11.5,fill:col('--muted')}));
|
||||
cy+=h;
|
||||
});
|
||||
svg.appendChild(txt(x+w/2,y-8,'RD$ 1.00',{anchor:'middle',fs:10,fill:col('--faint')}));
|
||||
})();
|
||||
|
||||
/* ---------- TREND (bars + line) ---------- */
|
||||
(function(){
|
||||
var svg=document.getElementById('trend'); if(!svg)return;
|
||||
var data=[
|
||||
{m:'Ene',v:132.4,u:2.5},{m:'Feb',v:169.9,u:7.2},{m:'Mar',v:224.8,u:56.3},
|
||||
{m:'Abr',v:224.3,u:52.6},{m:'May',v:190.8,u:33.0},{m:'Jun',v:225.0,u:37.8},
|
||||
{m:'Jul',v:208.1,u:30.2}
|
||||
];
|
||||
var W=720,base=230,top=18,padL=34,padR=12;
|
||||
var max=240, sc=(base-top)/max;
|
||||
[0,60,120,180,240].forEach(function(g){
|
||||
var y=base-g*sc;
|
||||
svg.appendChild(el('line',{x1:padL,y1:y,x2:W-padR,y2:y,stroke:col('--grid'),'stroke-width':1}));
|
||||
svg.appendChild(txt(padL-6,y+3,g,{anchor:'end',fs:9.5,fill:col('--faint'),mono:true}));
|
||||
});
|
||||
var n=data.length, gap=18, bw=(W-padL-padR-gap*(n-1))/n;
|
||||
var pts=[];
|
||||
data.forEach(function(d,i){
|
||||
var x=padL+i*(bw+gap);
|
||||
var h=d.v*sc;
|
||||
svg.appendChild(el('rect',{x:x,y:base-h,width:bw,height:h,rx:3,fill:col('--accent-soft')}));
|
||||
svg.appendChild(txt(x+bw/2,base+15,d.m,{anchor:'middle',fs:10.5}));
|
||||
svg.appendChild(txt(x+bw/2,base-h-6,d.v.toFixed(0),{anchor:'middle',fs:10,mono:true,fill:col('--muted')}));
|
||||
pts.push([x+bw/2, base-d.u*sc]);
|
||||
});
|
||||
var dpath='M'+pts.map(function(p){return p[0]+','+p[1]}).join(' L');
|
||||
svg.appendChild(el('path',{d:dpath,fill:'none',stroke:col('--accent'),'stroke-width':2.4,'stroke-linejoin':'round'}));
|
||||
pts.forEach(function(p){svg.appendChild(el('circle',{cx:p[0],cy:p[1],r:3.4,fill:col('--surface'),stroke:col('--accent'),'stroke-width':2}));});
|
||||
})();
|
||||
|
||||
/* ---------- ANNUAL ---------- */
|
||||
(function(){
|
||||
var svg=document.getElementById('annual'); if(!svg)return;
|
||||
var data=[{y:'2024',v:2401,u:462},{y:'2025',v:2401,u:457},{y:"2026*",v:1375,u:220}];
|
||||
var W=360,base=230,top=18,padL=30,padR=10;
|
||||
var max=2500,sc=(base-top)/max;
|
||||
var n=data.length,gap=40,grp=(W-padL-padR-gap*(n-1))/n, bw=grp/2-3;
|
||||
data.forEach(function(d,i){
|
||||
var x=padL+i*(grp+gap);
|
||||
var h1=d.v*sc,h2=d.u*sc;
|
||||
svg.appendChild(el('rect',{x:x,y:base-h1,width:bw,height:h1,rx:3,fill:col('--accent-soft')}));
|
||||
svg.appendChild(el('rect',{x:x+bw+6,y:base-h2,width:bw,height:h2,rx:3,fill:col('--accent')}));
|
||||
svg.appendChild(txt(x+grp/2,base+15,d.y,{anchor:'middle',fs:11}));
|
||||
svg.appendChild(txt(x+bw/2,base-h1-5,(d.v/1000).toFixed(2)+'k',{anchor:'middle',fs:9.5,mono:true,fill:col('--muted')}));
|
||||
svg.appendChild(txt(x+bw+6+bw/2,base-h2-5,d.u,{anchor:'middle',fs:9.5,mono:true,fill:col('--muted')}));
|
||||
});
|
||||
svg.appendChild(txt(padL,top-4,'RD$ M',{fs:9.5,fill:col('--faint')}));
|
||||
})();
|
||||
|
||||
/* ---------- GERENCIA (grouped horizontal) ---------- */
|
||||
(function(){
|
||||
var svg=document.getElementById('ger'); if(!svg)return;
|
||||
var data=[
|
||||
{l:'Ventas y Mercadeo',a:184.5,b:178.3},
|
||||
{l:'Admin. y Materiales',a:104.8,b:92.5},
|
||||
{l:'Planta / Producción',a:78.1,b:79.9},
|
||||
{l:'Gerencia General',a:41.3,b:36.4},
|
||||
{l:'Planta Agregados',a:4.4,b:0},
|
||||
{l:'Caribbean',a:1.6,b:0}
|
||||
];
|
||||
var W=380,padL=8,padR=44,top=6,rowH=46,x0=padL, maxW=W-padL-padR, max=190, sc=maxW/max;
|
||||
data.forEach(function(d,i){
|
||||
var y=top+i*rowH;
|
||||
svg.appendChild(txt(x0,y+11,d.l,{fs:11,fw:500,fill:col('--ink')}));
|
||||
svg.appendChild(el('rect',{x:x0,y:y+16,width:Math.max(2,d.a*sc),height:9,rx:2,fill:col('--accent')}));
|
||||
svg.appendChild(el('rect',{x:x0,y:y+27,width:Math.max(2,d.b*sc),height:9,rx:2,fill:col('--accent-soft')}));
|
||||
svg.appendChild(txt(x0+d.a*sc+6,y+24,money(d.a),{fs:10,mono:true,fill:col('--muted')}));
|
||||
});
|
||||
})();
|
||||
|
||||
/* ---------- SUBGRUPO table ---------- */
|
||||
(function(){
|
||||
var tb=document.getElementById('subg'); if(!tb)return;
|
||||
var rows=[
|
||||
['74 · Otros gastos y servicios',304.1,22.1],
|
||||
['71 · Compensación empleados',293.8,21.4],
|
||||
['73 · Gastos fijos',114.7,8.3],
|
||||
['72 · Otros rel. a empleados',27.8,2.0],
|
||||
['76 · Cierre fabricación (absorción)',-325.7,-23.7]
|
||||
];
|
||||
var max=310;
|
||||
rows.forEach(function(r){
|
||||
var tr=document.createElement('tr');
|
||||
var w=Math.abs(r[1])/max*100;
|
||||
tr.innerHTML='<td class="barcell"><div class="fill" style="width:'+w+'%;background:'+(r[1]<0?'color-mix(in srgb,var(--neg) 20%,transparent)':'var(--accent-soft)')+'"></div><span>'+r[0]+'</span></td>'+
|
||||
'<td class="r num" style="font-weight:600;color:'+(r[1]<0?'var(--neg)':'var(--ink)')+'">'+(r[1]<0?'−':'')+money(Math.abs(r[1]))+'</td>'+
|
||||
'<td class="r num" style="color:var(--muted)">'+r[2].toFixed(1)+'%</td>';
|
||||
tb.appendChild(tr);
|
||||
});
|
||||
})();
|
||||
|
||||
/* ---------- GASTO TREND ---------- */
|
||||
(function(){
|
||||
var svg=document.getElementById('gtrend'); if(!svg)return;
|
||||
var data=[
|
||||
{m:'Ene',g:55.1,r:41.6},{m:'Feb',g:54.8,r:32.2},{m:'Mar',g:59.2,r:26.3},
|
||||
{m:'Abr',g:59.9,r:26.7},{m:'May',g:57.7,r:30.3},{m:'Jun',g:61.5,r:27.3},{m:'Jul',g:66.6,r:32.0}
|
||||
];
|
||||
var W=720,base=200,top=16,padL=34,padR=40;
|
||||
var max=80,sc=(base-top)/max;
|
||||
[0,20,40,60,80].forEach(function(g){var y=base-g*sc;
|
||||
svg.appendChild(el('line',{x1:padL,y1:y,x2:W-padR,y2:y,stroke:col('--grid')}));
|
||||
svg.appendChild(txt(padL-6,y+3,g,{anchor:'end',fs:9.5,mono:true,fill:col('--faint')}));});
|
||||
var n=data.length,gap=20,bw=(W-padL-padR-gap*(n-1))/n, rpts=[];
|
||||
data.forEach(function(d,i){
|
||||
var x=padL+i*(bw+gap),h=d.g*sc;
|
||||
svg.appendChild(el('rect',{x:x,y:base-h,width:bw,height:h,rx:3,fill:col('--accent')}));
|
||||
svg.appendChild(txt(x+bw/2,base+15,d.m,{anchor:'middle',fs:10.5}));
|
||||
svg.appendChild(txt(x+bw/2,base-h-5,d.g.toFixed(0),{anchor:'middle',fs:9.5,mono:true,fill:col('--muted')}));
|
||||
rpts.push([x+bw/2, base-(d.r/ (80/60) )*sc]); // scale % on right (0-60 mapped)
|
||||
});
|
||||
// right axis % (gasto/ventas), scale 0-60 across same height
|
||||
var rsc=(base-top)/60;
|
||||
rpts=[];data.forEach(function(d,i){var x=padL+i*(bw+gap);rpts.push([x+bw/2, base-d.r*rsc]);});
|
||||
var dp='M'+rpts.map(function(p){return p[0]+','+p[1]}).join(' L');
|
||||
svg.appendChild(el('path',{d:dp,fill:'none',stroke:col('--pos'),'stroke-width':2.2,'stroke-dasharray':'1 0'}));
|
||||
rpts.forEach(function(p,i){svg.appendChild(el('circle',{cx:p[0],cy:p[1],r:3,fill:col('--surface'),stroke:col('--pos'),'stroke-width':2}));
|
||||
svg.appendChild(txt(p[0],p[1]-8,data[i].r.toFixed(0)+'%',{anchor:'middle',fs:9,mono:true,fill:col('--pos')}));});
|
||||
svg.appendChild(txt(padL,top-4,'RD$ M',{fs:9.5,fill:col('--faint')}));
|
||||
svg.appendChild(txt(W-padR+4,top+4,'% ventas',{fs:9.5,fill:col('--pos')}));
|
||||
})();
|
||||
|
||||
/* ---------- BALANCE stacked ---------- */
|
||||
(function(){
|
||||
var svg=document.getElementById('bal'); if(!svg)return;
|
||||
var W=380,base=250,top=20,bw=88;
|
||||
var max=6435, sc=(base-top)/max;
|
||||
// col 1 activos
|
||||
var xA=60;
|
||||
svg.appendChild(el('rect',{x:xA,y:base-6435*sc,width:bw,height:6435*sc,rx:4,fill:col('--accent'),opacity:.9}));
|
||||
svg.appendChild(txt(xA+bw/2,base-6435*sc-8,'6,435',{anchor:'middle',fs:12,mono:true,fw:600,fill:col('--ink')}));
|
||||
svg.appendChild(txt(xA+bw/2,base+16,'Activos',{anchor:'middle',fs:11}));
|
||||
// col 2 pasivo+patrimonio+result
|
||||
var xB=xA+bw+70, parts=[{l:'Pasivos',v:2322,c:col('--neg')},{l:'Patrimonio',v:3894,c:col('--pos')},{l:'Result. ejerc.',v:219,c:col('--warn')}];
|
||||
var cy=base;
|
||||
parts.forEach(function(p){var h=p.v*sc;cy-=h;
|
||||
svg.appendChild(el('rect',{x:xB,y:cy,width:bw,height:h,fill:p.c,opacity:.85}));
|
||||
svg.appendChild(txt(xB+bw+8,cy+h/2+4,p.l+' '+p.v.toLocaleString('en-US'),{fs:10.5,fill:col('--muted')}));
|
||||
});
|
||||
svg.appendChild(txt(xB+bw/2,base+16,'Pas. + Patrim.',{anchor:'middle',fs:11}));
|
||||
})();
|
||||
|
||||
/* ---------- ACTIVO / PASIVO tables ---------- */
|
||||
(function(){
|
||||
function fill(id,rows,max){
|
||||
var tb=document.getElementById(id); if(!tb)return;
|
||||
rows.forEach(function(r){
|
||||
var tr=document.createElement('tr');
|
||||
var neg=r[1]<0;
|
||||
tr.innerHTML='<td>'+r[0]+'</td><td class="r num" style="color:'+(neg?'var(--neg)':'var(--ink)')+'">'+(neg?'−':'')+Math.abs(r[1]).toLocaleString('en-US')+'</td>';
|
||||
tb.appendChild(tr);
|
||||
});
|
||||
}
|
||||
fill('act',[['Activos corrientes',3250],['Activos fijos',4140],['Depreciación acum.',-1136],['Otros activos',181],['Total activos',6435]]);
|
||||
fill('pas',[['Pasivos corrientes',1420],['Préstamos largo plazo',902],['Total pasivos',2322],['Patrimonio',3894]]);
|
||||
// bold totals
|
||||
['act','pas'].forEach(function(id){var t=document.getElementById(id);var rs=t.querySelectorAll('tr');
|
||||
rs.forEach(function(tr){if(/Total/.test(tr.textContent)){tr.style.fontWeight='700';tr.querySelectorAll('td').forEach(function(td){td.style.borderTop='1px solid var(--line)';});}});});
|
||||
})();
|
||||
})();
|
||||
</script>
|
||||
@@ -0,0 +1,192 @@
|
||||
# Dashboard Ejecutivo de Presidencia — Guía de armado en Power BI
|
||||
|
||||
> Radiografía financiera para el Presidente, basada en el **Mayor General Analítico** (`cgprrp008.4gl`) y el **Análisis de Gastos por Departamento** (`cgprrp009.4gl`).
|
||||
> Datos servidos por la capa BI: **`192.168.40.8 / MarmotechBI`**, esquema **`presidencia`** (vistas creadas por el script `SQL_Vistas_Presidencia.sql`).
|
||||
> Fecha: 2026-08-26 · Autor: jsoto.
|
||||
|
||||
---
|
||||
|
||||
## 0. Lo que ya está hecho (capa de datos)
|
||||
|
||||
Se crearon 3 vistas en `MarmotechBI` — restringidas a `jsoto` (`DENY SELECT` a `public` + `GRANT` explícito a `MARMOTECH\jsoto` y `jsoto`; el resto del equipo `db_datareader` **no** las ve):
|
||||
|
||||
| Vista | Grano | Para qué | Columnas clave |
|
||||
|---|---|---|---|
|
||||
| `presidencia.vwPLMensual` | año × mes × cuenta | Estado de Resultados (cgprrp008) | `ano, numero_mes, mes, AnoMes, fecha_mes, grupo, linea, orden_linea, subgrupo_cod, subgrupo_desc, cuenta, cuenta_desc, debito, credito, resultado, costo_gasto` |
|
||||
| `presidencia.vwGastosDepto` | año × mes × depto × cuenta | Análisis de gastos (cgprrp009) | `…, gerencia_cod, gerencia, departamento, depto_nombre, subgrupo_cod, subgrupo_desc, cuenta, cuenta_desc, debito, credito, gasto` |
|
||||
| `presidencia.vwBalanceMensual` | año × mes × cuenta | Balance / liquidez | `…, grupo, grupo_desc, subgrupo_cod, subgrupo_desc, cuenta, cuenta_desc, movimiento_mes, saldo_natural, saldo_presentacion` |
|
||||
|
||||
**Reglas de negocio ya aplicadas dentro de las vistas** (no hay que replicarlas en DAX):
|
||||
- Estado de Resultados por **primer dígito** de la cuenta: `4` Ventas · `5` Costo · `7` Gastos · `8` Otros (incl. `88` = ISR).
|
||||
- **`resultado = credito − debito`** → la suma de todas las líneas del P&L = **Utilidad Neta**. Ventas suma positivo; costo, gastos e ISR restan.
|
||||
- Solo transacciones activas (`status_t IS NULL`).
|
||||
- Se **excluye el asiento de cierre anual** (`ref` tipo `ED.99-001/12AA`); sin esto, todo año cerrado neteaba a cero.
|
||||
|
||||
Validado contra el sistema: julio-2026 reproduce exactamente la imagen del `cgprrp008`.
|
||||
|
||||
---
|
||||
|
||||
## 1. Conexión y consultas (Power Query / M)
|
||||
|
||||
**Obtener datos → SQL Server** · Servidor `192.168.40.8` · Base `MarmotechBI` · Modo **Import** (o DirectQuery si se quiere en vivo).
|
||||
Traer las 3 vistas del esquema `presidencia`. Ejemplo de la consulta base (las otras dos son idénticas cambiando el nombre):
|
||||
|
||||
```m
|
||||
let
|
||||
Origen = Sql.Database("192.168.40.8", "MarmotechBI"),
|
||||
PL = Origen{[Schema="presidencia", Item="vwPLMensual"]}[Data]
|
||||
in
|
||||
PL
|
||||
```
|
||||
|
||||
### Tabla de calendario (necesaria para YoY / YTD)
|
||||
Crear una tabla calculada **DimCalendario** (grano día, contigua) y marcarla como *Tabla de fechas*:
|
||||
|
||||
```DAX
|
||||
DimCalendario =
|
||||
VAR MinD = DATE(2015,1,1) -- ajustar si se quiere histórico más largo
|
||||
VAR MaxD = DATE(2028,12,31)
|
||||
RETURN
|
||||
ADDCOLUMNS(
|
||||
CALENDAR(MinD, MaxD),
|
||||
"Año", YEAR([Date]),
|
||||
"MesNo", MONTH([Date]),
|
||||
"Mes", FORMAT([Date],"MMM","es-DO"),
|
||||
"AñoMes", FORMAT([Date],"yyyy-MM"),
|
||||
"PrimerDiaMes", DATE(YEAR([Date]),MONTH([Date]),1),
|
||||
"Trimestre", "T" & FORMAT([Date],"Q")
|
||||
)
|
||||
```
|
||||
> Modelado → seleccionar DimCalendario → **Marcar como tabla de fechas** (columna `Date`).
|
||||
|
||||
---
|
||||
|
||||
## 2. Relaciones (vista *Modelo*)
|
||||
|
||||
Las vistas traen `fecha_mes` = **primer día del mes**. Relacionar **una sola** dirección, Dimensión (1) → Hecho (\*):
|
||||
|
||||
| Desde (1) | Columna | Hacia (\*) | Columna |
|
||||
|---|---|---|---|
|
||||
| `DimCalendario` | `Date` | `vwPLMensual` | `fecha_mes` |
|
||||
| `DimCalendario` | `Date` | `vwGastosDepto` | `fecha_mes` |
|
||||
| `DimCalendario` | `Date` | `vwBalanceMensual` | `fecha_mes` |
|
||||
|
||||
Como cada mes tiene un solo `fecha_mes` (día 1), la relación con el calendario diario funciona perfecto para `TOTALYTD` y `SAMEPERIODLASTYEAR`.
|
||||
Los *slicers* de Año / Mes se ponen sobre **DimCalendario** (`Año`, `Mes`).
|
||||
|
||||
---
|
||||
|
||||
## 3. Medidas DAX
|
||||
|
||||
Crear una tabla de medidas vacía (`_Medidas`) o alojarlas en `vwPLMensual`.
|
||||
|
||||
### 3.1 Estado de Resultados (base)
|
||||
```DAX
|
||||
Ventas Netas = CALCULATE( SUM(vwPLMensual[resultado]), vwPLMensual[grupo] = "4" )
|
||||
Costo de Ventas = CALCULATE( SUM(vwPLMensual[costo_gasto]), vwPLMensual[grupo] = "5" )
|
||||
Gastos Operativos = CALCULATE( SUM(vwPLMensual[costo_gasto]), vwPLMensual[grupo] = "7" )
|
||||
Otros Ing. y Gastos = CALCULATE( SUM(vwPLMensual[costo_gasto]), vwPLMensual[linea] = "Otros Ingresos y Gastos" )
|
||||
ISR = CALCULATE( SUM(vwPLMensual[costo_gasto]), vwPLMensual[linea] = "Impuesto sobre la Renta" )
|
||||
|
||||
Utilidad Bruta = [Ventas Netas] - [Costo de Ventas]
|
||||
Utilidad Operativa = [Utilidad Bruta] - [Gastos Operativos]
|
||||
Utilidad antes ISR = [Utilidad Operativa] - [Otros Ing. y Gastos]
|
||||
Utilidad Neta = SUM( vwPLMensual[resultado] ) -- suma de todas las líneas
|
||||
```
|
||||
|
||||
### 3.2 Márgenes
|
||||
```DAX
|
||||
Margen Bruto % = DIVIDE( [Utilidad Bruta], [Ventas Netas] )
|
||||
Margen Operativo % = DIVIDE( [Utilidad Operativa], [Ventas Netas] )
|
||||
Margen Neto % = DIVIDE( [Utilidad Neta], [Ventas Netas] )
|
||||
Costo % Ventas = DIVIDE( [Costo de Ventas], [Ventas Netas] )
|
||||
Gastos % Ventas = DIVIDE( [Gastos Operativos], [Ventas Netas] )
|
||||
```
|
||||
|
||||
### 3.3 Comparativos (YoY y YTD)
|
||||
```DAX
|
||||
Ventas AA = CALCULATE( [Ventas Netas], SAMEPERIODLASTYEAR(DimCalendario[Date]) )
|
||||
Utilidad Neta AA = CALCULATE( [Utilidad Neta], SAMEPERIODLASTYEAR(DimCalendario[Date]) )
|
||||
Gastos AA = CALCULATE( [Gastos Operativos], SAMEPERIODLASTYEAR(DimCalendario[Date]) )
|
||||
|
||||
Ventas YoY % = DIVIDE( [Ventas Netas] - [Ventas AA], [Ventas AA] )
|
||||
Utilidad YoY % = DIVIDE( [Utilidad Neta] - [Utilidad Neta AA], [Utilidad Neta AA] )
|
||||
Gastos YoY % = DIVIDE( [Gastos Operativos] - [Gastos AA], [Gastos AA] )
|
||||
|
||||
Ventas YTD = TOTALYTD( [Ventas Netas], DimCalendario[Date] )
|
||||
Utilidad Neta YTD = TOTALYTD( [Utilidad Neta], DimCalendario[Date] )
|
||||
```
|
||||
|
||||
### 3.4 Gastos (vwGastosDepto)
|
||||
```DAX
|
||||
Gasto Total = SUM( vwGastosDepto[gasto] )
|
||||
Gasto AA = CALCULATE( [Gasto Total], SAMEPERIODLASTYEAR(DimCalendario[Date]) )
|
||||
Gasto YoY % = DIVIDE( [Gasto Total] - [Gasto AA], [Gasto AA] )
|
||||
Gasto % de Ventas = DIVIDE( [Gasto Total], [Ventas Netas] )
|
||||
```
|
||||
|
||||
### 3.5 Balance / liquidez (vwBalanceMensual)
|
||||
El saldo del balance es el **saldo acumulado al último mes del contexto**. Medidas:
|
||||
```DAX
|
||||
Saldo (fin periodo) =
|
||||
VAR ultima = MAX( vwBalanceMensual[fecha_mes] )
|
||||
RETURN CALCULATE( SUM(vwBalanceMensual[saldo_presentacion]),
|
||||
vwBalanceMensual[fecha_mes] = ultima )
|
||||
|
||||
Activos = CALCULATE( [Saldo (fin periodo)], vwBalanceMensual[grupo]="1" )
|
||||
Pasivos = CALCULATE( [Saldo (fin periodo)], vwBalanceMensual[grupo]="2" )
|
||||
Patrimonio = CALCULATE( [Saldo (fin periodo)], vwBalanceMensual[grupo]="3" )
|
||||
|
||||
Activo Corriente = CALCULATE( [Saldo (fin periodo)], vwBalanceMensual[subgrupo_cod]="11" )
|
||||
Pasivo Corriente = CALCULATE( [Saldo (fin periodo)],
|
||||
vwBalanceMensual[subgrupo_cod] IN {"20","21"} )
|
||||
|
||||
Razón Corriente = DIVIDE( [Activo Corriente], [Pasivo Corriente] )
|
||||
Capital de Trabajo= [Activo Corriente] - [Pasivo Corriente]
|
||||
Endeudamiento % = DIVIDE( [Pasivos], [Activos] )
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 4. Formato de medidas
|
||||
- Importes: moneda RD$, 0 decimales (o en millones con formato personalizado `#,##0.0,, " M"`).
|
||||
- Porcentajes: 1 decimal.
|
||||
- Activar **tabular-nums** implícito (Power BI ya alinea) y usar la fuente del tema corporativo.
|
||||
|
||||
---
|
||||
|
||||
## 5. Páginas y visuales (ver prototipo `Dashboard_Presidencia_Mockup.html`)
|
||||
|
||||
### Página 1 — **Radiografía** (resumen ejecutivo)
|
||||
- **Fila de KPIs (tarjetas):** Ventas Netas + `Ventas YoY %` · Utilidad Bruta + Margen Bruto % · Utilidad Operativa + Margen Operativo % · Utilidad Neta + `Utilidad YoY %` + Margen Neto %.
|
||||
- **Cascada (Waterfall):** eje = campo `linea` de `vwPLMensual` (orden por `orden_linea`), valor = `[Utilidad Neta]` con desglose por línea → arranca en Ventas y aterriza en Utilidad Neta. (El visual *Waterfall* nativo suma correctamente porque `resultado` ya trae el signo).
|
||||
- **Comportamiento del periodo actual (columnas + línea):** eje `DimCalendario[Mes]`; columnas = `[Ventas Netas]`; línea = `[Utilidad Neta]`; línea secundaria opcional = `[Margen Neto %]`.
|
||||
- **Trayectoria anual (barras agrupadas):** eje `DimCalendario[Año]`; valores `[Ventas Netas]` y `[Utilidad Neta]`.
|
||||
- Slicers: Año, Mes.
|
||||
|
||||
### Página 2 — **Análisis de Gastos** (cgprrp009)
|
||||
- KPIs: Gasto Total + `Gasto YoY %` · `Gasto % de Ventas` · gerencia de mayor peso · mayor alza YoY.
|
||||
- **Barras por gerencia:** eje `vwGastosDepto[gerencia]`; valores `[Gasto Total]` y `[Gasto AA]`. *Drill-down* a `depto_nombre` y luego `cuenta_desc`.
|
||||
- **Naturaleza del gasto:** tabla o *treemap* por `subgrupo_desc` con `[Gasto Total]` y `[Gasto % de Ventas]`. (Nota: subgrupo `76 Cierre gtos fabricación` es una absorción negativa a costo).
|
||||
- **Gasto mensual + % de ventas:** columnas `[Gasto Total]` por `Mes` con línea `[Gasto % de Ventas]` (control de eficiencia).
|
||||
|
||||
### Página 3 — **Estructura Financiera** (balance / liquidez)
|
||||
- KPIs: Activos · Razón Corriente · Capital de Trabajo · Endeudamiento %.
|
||||
- **Activos = Pasivos + Patrimonio + resultado del ejercicio** (columnas apiladas): la diferencia contra Activos es la utilidad del año en curso aún no cerrada — es normal y se puede rotular como *"Resultado del ejercicio"*.
|
||||
- **Composición del activo / pasivo:** tabla por `subgrupo_desc` con `[Saldo (fin periodo)]`.
|
||||
- **Tendencia del patrimonio:** línea `[Patrimonio]` por `Año`.
|
||||
|
||||
---
|
||||
|
||||
## 6. Suscripción del Presidente
|
||||
Publicar en el workspace corporativo → **Suscribir** al Presidente (envío por correo con captura del reporte, p. ej. cada lunes). Requiere que el dataset tenga **actualización programada** (gateway sobre `192.168.40.8`).
|
||||
|
||||
---
|
||||
|
||||
## 7. Ideas de ampliación (opcional, reutilizando vistas existentes)
|
||||
Para una radiografía "de un vistazo" también semanal, se puede añadir una página **Panorama** que combine, con las vistas ya publicadas en `MarmotechBI` (sin crear nada nuevo):
|
||||
- Ventas vs. presupuesto del mes (`vwFactVentas` + `vwFactPresupuesto`).
|
||||
- Cuentas por cobrar y vencido (`vwFactCxC_Real`).
|
||||
- Backlog / órdenes pendientes de despacho (`vwOrdenesPendientesDespacho`).
|
||||
- Producción del periodo (`vwProduccion_pub`).
|
||||
> Se maneja como **modelo aparte** (área comercial) para no mezclar granos; ver `Documentacion_MarmotechBI.md`.
|
||||
Binary file not shown.
@@ -0,0 +1,32 @@
|
||||
PROYECTO POWER BI — RADIOGRAFÍA MARMOTECH (Dashboard de Presidencia)
|
||||
====================================================================
|
||||
|
||||
QUÉ ES ESTO
|
||||
-----------
|
||||
Un Proyecto de Power BI (.pbip) en formato de texto:
|
||||
- Radiografia_Marmotech.SemanticModel -> modelo de datos + TODAS las medidas DAX
|
||||
- Radiografia_Marmotech.Report -> 3 páginas (Radiografía / Gastos / Estructura)
|
||||
|
||||
Se conecta en vivo a las vistas del esquema "presidencia" en 192.168.40.8 / MarmotechBI.
|
||||
|
||||
CÓMO ABRIRLO Y CONVERTIRLO A .PBIX
|
||||
----------------------------------
|
||||
1. Abrir Power BI Desktop (v2.157 o superior).
|
||||
2. Archivo -> Abrir -> seleccionar Radiografia_Marmotech.pbip
|
||||
(o doble clic al .pbip).
|
||||
3. Si pide credenciales de la base: usar autenticación de Windows (tu usuario jsoto).
|
||||
4. Actualizar / cargar datos.
|
||||
5. Archivo -> Guardar como -> elegir tipo ".pbix" -> listo, ya tienes el .pbix.
|
||||
|
||||
REQUISITO (una sola vez, si no abre el reporte)
|
||||
-----------------------------------------------
|
||||
Archivo -> Opciones -> Características de vista previa ->
|
||||
activar "Almacenar informes con el formato de informe mejorado (PBIR)".
|
||||
Reiniciar Power BI Desktop y volver a abrir el .pbip.
|
||||
|
||||
NOTA
|
||||
----
|
||||
El MODELO (tablas, relaciones y medidas DAX) está completo y es la parte reutilizable.
|
||||
Si algún visual del reporte necesitara reacomodo, guíate por el prototipo
|
||||
"Dashboard_Presidencia_Mockup.html" y la "Guia_Dashboard_Presidencia_PowerBI.md":
|
||||
tienen la disposición exacta y las medidas ya existen en el modelo.
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/gitIntegration/platformProperties/2.0.0/schema.json",
|
||||
"metadata": { "type": "Report", "displayName": "Radiografia_Marmotech" },
|
||||
"config": { "version": "2.0", "logicalId": "554add93-b301-4779-a780-de4189e02962" }
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"version": "4.0",
|
||||
"datasetReference": { "byPath": { "path": "../Radiografia_Marmotech.SemanticModel" } }
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/page/1.0.0/schema.json",
|
||||
"name": "8b8f836c-adf6-4122-94af-ca83a95f1186",
|
||||
"displayName": "Estructura Financiera",
|
||||
"displayOption": "FitToPage",
|
||||
"height": 720,
|
||||
"width": 1280
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "44ff5e53-b511-41e3-bdd8-48225cf9736d",
|
||||
"position": { "x": 648, "y": 16, "z": 0, "width": 300, "height": 140, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "card",
|
||||
"query": { "queryState": { "Values": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Capital de Trabajo" } }, "queryRef": "vwPLMensual.Capital de Trabajo", "nativeQueryRef": "Capital de Trabajo" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Capital de Trabajo'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "a03966b2-7a2b-4724-9b6f-9d2a82dfbf1a",
|
||||
"position": { "x": 16, "y": 16, "z": 0, "width": 300, "height": 140, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "card",
|
||||
"query": { "queryState": { "Values": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Activos" } }, "queryRef": "vwPLMensual.Activos", "nativeQueryRef": "Activos" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Activos Totales'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "aebdc78d-a3c5-45bd-a5a1-33956b52c2af",
|
||||
"position": { "x": 964, "y": 16, "z": 0, "width": 300, "height": 140, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "card",
|
||||
"query": { "queryState": { "Values": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Endeudamiento %" } }, "queryRef": "vwPLMensual.Endeudamiento %", "nativeQueryRef": "Endeudamiento %" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Endeudamiento'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "b45f71ca-ef58-4807-9ec8-b326c6cef118",
|
||||
"position": { "x": 16, "y": 170, "z": 0, "width": 620, "height": 300, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "clusteredColumnChart",
|
||||
"query": { "queryState": { "Category": { "projections": [ { "field": { "Column": { "Expression": { "SourceRef": { "Entity": "vwBalanceMensual" } }, "Property": "grupo_desc" } }, "queryRef": "vwBalanceMensual.grupo_desc", "nativeQueryRef": "grupo_desc" } ] },
|
||||
"Y": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Saldo (fin periodo)" } }, "queryRef": "vwPLMensual.Saldo (fin periodo)", "nativeQueryRef": "Saldo (fin periodo)" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Activos / Pasivos / Patrimonio'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "b536c95a-a634-4891-9041-14d33dba3e31",
|
||||
"position": { "x": 652, "y": 170, "z": 0, "width": 612, "height": 300, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "tableEx",
|
||||
"query": { "queryState": { "Values": { "projections": [ { "field": { "Column": { "Expression": { "SourceRef": { "Entity": "vwBalanceMensual" } }, "Property": "subgrupo_desc" } }, "queryRef": "vwBalanceMensual.subgrupo_desc", "nativeQueryRef": "subgrupo_desc" },
|
||||
{ "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Saldo (fin periodo)" } }, "queryRef": "vwPLMensual.Saldo (fin periodo)", "nativeQueryRef": "Saldo (fin periodo)" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Composicion'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "dfc8665b-ed52-4a78-ad7a-ceec1bd415d6",
|
||||
"position": { "x": 332, "y": 16, "z": 0, "width": 300, "height": 140, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "card",
|
||||
"query": { "queryState": { "Values": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Razon Corriente" } }, "queryRef": "vwPLMensual.Razon Corriente", "nativeQueryRef": "Razon Corriente" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Razon Corriente'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/page/1.0.0/schema.json",
|
||||
"name": "b1d7c3f7-19f4-4e53-9f46-39c24299735d",
|
||||
"displayName": "Radiografia",
|
||||
"displayOption": "FitToPage",
|
||||
"height": 720,
|
||||
"width": 1280
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "0001fb8c-bfd0-48b4-8c87-ca2e91ded77e",
|
||||
"position": { "x": 16, "y": 16, "z": 0, "width": 280, "height": 140, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "card",
|
||||
"query": { "queryState": { "Values": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Ventas Netas" } }, "queryRef": "vwPLMensual.Ventas Netas", "nativeQueryRef": "Ventas Netas" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Ventas Netas'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "1c8b8064-507f-4d74-aafe-996d0e78abcc",
|
||||
"position": { "x": 652, "y": 484, "z": 0, "width": 300, "height": 120, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "slicer",
|
||||
"query": { "queryState": { "Values": { "projections": [ { "field": { "Column": { "Expression": { "SourceRef": { "Entity": "DimCalendario" } }, "Property": "Anio" } }, "queryRef": "DimCalendario.Anio", "nativeQueryRef": "Anio" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Ano'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "41b6bf4e-59e7-43d8-bed5-00903f07cf14",
|
||||
"position": { "x": 16, "y": 170, "z": 0, "width": 620, "height": 300, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "waterfallChart",
|
||||
"query": { "queryState": { "Category": { "projections": [ { "field": { "Column": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "linea" } }, "queryRef": "vwPLMensual.linea", "nativeQueryRef": "linea" } ] },
|
||||
"Y": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Utilidad Neta" } }, "queryRef": "vwPLMensual.Utilidad Neta", "nativeQueryRef": "Utilidad Neta" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Estado de Resultados (cascada)'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "7bc4f47e-ea03-4a86-85bc-7b0589403ff3",
|
||||
"position": { "x": 984, "y": 16, "z": 0, "width": 280, "height": 140, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "card",
|
||||
"query": { "queryState": { "Values": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Utilidad Neta" } }, "queryRef": "vwPLMensual.Utilidad Neta", "nativeQueryRef": "Utilidad Neta" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Utilidad Neta'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "86346a78-aca0-4130-8fcc-df275187d223",
|
||||
"position": { "x": 688, "y": 16, "z": 0, "width": 280, "height": 140, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "card",
|
||||
"query": { "queryState": { "Values": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Utilidad Operativa" } }, "queryRef": "vwPLMensual.Utilidad Operativa", "nativeQueryRef": "Utilidad Operativa" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Utilidad Operativa'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "bf867728-d557-4369-a08f-96be202ea340",
|
||||
"position": { "x": 652, "y": 170, "z": 0, "width": 612, "height": 300, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "lineClusteredColumnComboChart",
|
||||
"query": { "queryState": { "Y": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Ventas Netas" } }, "queryRef": "vwPLMensual.Ventas Netas", "nativeQueryRef": "Ventas Netas" } ] },
|
||||
"Category": { "projections": [ { "field": { "Column": { "Expression": { "SourceRef": { "Entity": "DimCalendario" } }, "Property": "Mes" } }, "queryRef": "DimCalendario.Mes", "nativeQueryRef": "Mes" } ] },
|
||||
"Y2": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Utilidad Neta" } }, "queryRef": "vwPLMensual.Utilidad Neta", "nativeQueryRef": "Utilidad Neta" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Comportamiento del periodo (Ventas vs Utilidad)'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "c16df67e-416b-4acb-8169-fbd21a916682",
|
||||
"position": { "x": 16, "y": 484, "z": 0, "width": 620, "height": 220, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "clusteredColumnChart",
|
||||
"query": { "queryState": { "Category": { "projections": [ { "field": { "Column": { "Expression": { "SourceRef": { "Entity": "DimCalendario" } }, "Property": "Anio" } }, "queryRef": "DimCalendario.Anio", "nativeQueryRef": "Anio" } ] },
|
||||
"Y": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Ventas Netas" } }, "queryRef": "vwPLMensual.Ventas Netas", "nativeQueryRef": "Ventas Netas" },
|
||||
{ "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Utilidad Neta" } }, "queryRef": "vwPLMensual.Utilidad Neta", "nativeQueryRef": "Utilidad Neta" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Trayectoria anual'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "ea44fc7d-26fd-4269-a605-7a460f6078bd",
|
||||
"position": { "x": 312, "y": 16, "z": 0, "width": 280, "height": 140, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "card",
|
||||
"query": { "queryState": { "Values": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Utilidad Bruta" } }, "queryRef": "vwPLMensual.Utilidad Bruta", "nativeQueryRef": "Utilidad Bruta" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Utilidad Bruta'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/page/1.0.0/schema.json",
|
||||
"name": "e77fc1b2-6848-4091-910e-ab9079a10ae3",
|
||||
"displayName": "Analisis de Gastos",
|
||||
"displayOption": "FitToPage",
|
||||
"height": 720,
|
||||
"width": 1280
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "2970078c-5cf9-40ff-ad03-436e7f9d90c1",
|
||||
"position": { "x": 16, "y": 16, "z": 0, "width": 300, "height": 140, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "card",
|
||||
"query": { "queryState": { "Values": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Gasto Total" } }, "queryRef": "vwPLMensual.Gasto Total", "nativeQueryRef": "Gasto Total" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Gastos Operativos'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "55c25809-9340-4b4f-ab44-ea947df2aa20",
|
||||
"position": { "x": 16, "y": 484, "z": 0, "width": 1248, "height": 220, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "columnChart",
|
||||
"query": { "queryState": { "Category": { "projections": [ { "field": { "Column": { "Expression": { "SourceRef": { "Entity": "DimCalendario" } }, "Property": "Mes" } }, "queryRef": "DimCalendario.Mes", "nativeQueryRef": "Mes" } ] },
|
||||
"Y": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Gasto Total" } }, "queryRef": "vwPLMensual.Gasto Total", "nativeQueryRef": "Gasto Total" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Gasto mensual'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "c5d3dccf-c735-4552-97e3-3409f290ae2c",
|
||||
"position": { "x": 16, "y": 170, "z": 0, "width": 620, "height": 300, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "barChart",
|
||||
"query": { "queryState": { "Category": { "projections": [ { "field": { "Column": { "Expression": { "SourceRef": { "Entity": "vwGastosDepto" } }, "Property": "gerencia" } }, "queryRef": "vwGastosDepto.gerencia", "nativeQueryRef": "gerencia" } ] },
|
||||
"Y": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Gasto Total" } }, "queryRef": "vwPLMensual.Gasto Total", "nativeQueryRef": "Gasto Total" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Gasto por gerencia'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "d56cf84c-d5d9-4d14-a4a5-c20b98f0aab6",
|
||||
"position": { "x": 652, "y": 170, "z": 0, "width": 612, "height": 300, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "tableEx",
|
||||
"query": { "queryState": { "Values": { "projections": [ { "field": { "Column": { "Expression": { "SourceRef": { "Entity": "vwGastosDepto" } }, "Property": "subgrupo_desc" } }, "queryRef": "vwGastosDepto.subgrupo_desc", "nativeQueryRef": "subgrupo_desc" },
|
||||
{ "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Gasto Total" } }, "queryRef": "vwPLMensual.Gasto Total", "nativeQueryRef": "Gasto Total" },
|
||||
{ "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Gasto % de Ventas" } }, "queryRef": "vwPLMensual.Gasto % de Ventas", "nativeQueryRef": "Gasto % de Ventas" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Naturaleza del gasto'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "f2193414-6ebe-4c68-bb63-1badcb5ffd09",
|
||||
"position": { "x": 332, "y": 16, "z": 0, "width": 300, "height": 140, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "card",
|
||||
"query": { "queryState": { "Values": { "projections": [ { "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "vwPLMensual" } }, "Property": "Gasto % de Ventas" } }, "queryRef": "vwPLMensual.Gasto % de Ventas", "nativeQueryRef": "Gasto % de Ventas" } ] } } },
|
||||
"drillFilterOtherVisuals": true,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'Gasto / Ventas'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/pagesMetadata/1.0.0/schema.json",
|
||||
"pageOrder": [ "b1d7c3f7-19f4-4e53-9f46-39c24299735d", "e77fc1b2-6848-4091-910e-ab9079a10ae3", "8b8f836c-adf6-4122-94af-ca83a95f1186" ],
|
||||
"activePageName": "b1d7c3f7-19f4-4e53-9f46-39c24299735d"
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/report/1.0.0/schema.json",
|
||||
"themeCollection": { "baseTheme": { "name": "CY24SU10" } },
|
||||
"layoutOptimization": "None"
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"version": "2.0.0"
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/fabric/gitIntegration/platformProperties/2.0.0/schema.json",
|
||||
"metadata": { "type": "SemanticModel", "displayName": "Radiografia_Marmotech" },
|
||||
"config": { "version": "2.0", "logicalId": "9189c214-f719-4b14-9985-284d1156b518" }
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"version": "4.0",
|
||||
"settings": {}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
database
|
||||
compatibilityLevel: 1550
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
model Model
|
||||
culture: es-ES
|
||||
defaultPowerBIDataSourceVersion: powerBI_V3
|
||||
sourceQueryCulture: es-ES
|
||||
|
||||
annotation PBI_QueryOrder = ["vwPLMensual","vwGastosDepto","vwBalanceMensual","DimCalendario"]
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
relationship a1bca91e-c68e-40d9-903e-6c0b3084d97e
|
||||
fromColumn: vwPLMensual.fecha_mes
|
||||
toColumn: DimCalendario.Date
|
||||
|
||||
relationship b8a2999c-fc54-47de-8f0b-85af0263c75b
|
||||
fromColumn: vwGastosDepto.fecha_mes
|
||||
toColumn: DimCalendario.Date
|
||||
|
||||
relationship ea96c86f-8345-4913-b1e6-6823b9a100f4
|
||||
fromColumn: vwBalanceMensual.fecha_mes
|
||||
toColumn: DimCalendario.Date
|
||||
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
table DimCalendario
|
||||
column Date
|
||||
dataType: dateTime
|
||||
sourceColumn: [Date]
|
||||
formatString: General Date
|
||||
summarizeBy: none
|
||||
|
||||
column Anio
|
||||
dataType: int64
|
||||
sourceColumn: [Anio]
|
||||
summarizeBy: none
|
||||
|
||||
column MesNo
|
||||
dataType: int64
|
||||
sourceColumn: [MesNo]
|
||||
summarizeBy: none
|
||||
|
||||
column Mes
|
||||
dataType: string
|
||||
sourceColumn: [Mes]
|
||||
summarizeBy: none
|
||||
|
||||
column AnioMes
|
||||
dataType: string
|
||||
sourceColumn: [AnioMes]
|
||||
summarizeBy: none
|
||||
|
||||
column PrimerDiaMes
|
||||
dataType: dateTime
|
||||
sourceColumn: [PrimerDiaMes]
|
||||
formatString: General Date
|
||||
summarizeBy: none
|
||||
|
||||
column Trimestre
|
||||
dataType: string
|
||||
sourceColumn: [Trimestre]
|
||||
summarizeBy: none
|
||||
|
||||
partition DimCalendario = calculated
|
||||
mode: import
|
||||
source = ADDCOLUMNS ( CALENDAR ( DATE ( 2015, 1, 1 ), DATE ( 2028, 12, 31 ) ), "Anio", YEAR ( [Date] ), "MesNo", MONTH ( [Date] ), "Mes", FORMAT ( [Date], "MMM" ), "AnioMes", FORMAT ( [Date], "yyyy-MM" ), "PrimerDiaMes", DATE ( YEAR ( [Date] ), MONTH ( [Date] ), 1 ), "Trimestre", "T" & FORMAT ( [Date], "Q" ) )
|
||||
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
table vwBalanceMensual
|
||||
column 'ano'
|
||||
dataType: int64
|
||||
sourceColumn: ano
|
||||
summarizeBy: none
|
||||
|
||||
column 'numero_mes'
|
||||
dataType: int64
|
||||
sourceColumn: numero_mes
|
||||
summarizeBy: none
|
||||
|
||||
column 'mes'
|
||||
dataType: string
|
||||
sourceColumn: mes
|
||||
summarizeBy: none
|
||||
|
||||
column 'AnoMes'
|
||||
dataType: string
|
||||
sourceColumn: AnoMes
|
||||
summarizeBy: none
|
||||
|
||||
column 'fecha_mes'
|
||||
dataType: dateTime
|
||||
sourceColumn: fecha_mes
|
||||
formatString: General Date
|
||||
summarizeBy: none
|
||||
|
||||
column 'grupo'
|
||||
dataType: string
|
||||
sourceColumn: grupo
|
||||
summarizeBy: none
|
||||
|
||||
column 'grupo_desc'
|
||||
dataType: string
|
||||
sourceColumn: grupo_desc
|
||||
summarizeBy: none
|
||||
|
||||
column 'subgrupo_cod'
|
||||
dataType: string
|
||||
sourceColumn: subgrupo_cod
|
||||
summarizeBy: none
|
||||
|
||||
column 'subgrupo_desc'
|
||||
dataType: string
|
||||
sourceColumn: subgrupo_desc
|
||||
summarizeBy: none
|
||||
|
||||
column 'cuenta'
|
||||
dataType: string
|
||||
sourceColumn: cuenta
|
||||
summarizeBy: none
|
||||
|
||||
column 'cuenta_desc'
|
||||
dataType: string
|
||||
sourceColumn: cuenta_desc
|
||||
summarizeBy: none
|
||||
|
||||
column 'movimiento_mes'
|
||||
dataType: decimal
|
||||
sourceColumn: movimiento_mes
|
||||
summarizeBy: none
|
||||
|
||||
column 'saldo_natural'
|
||||
dataType: decimal
|
||||
sourceColumn: saldo_natural
|
||||
summarizeBy: none
|
||||
|
||||
column 'saldo_presentacion'
|
||||
dataType: decimal
|
||||
sourceColumn: saldo_presentacion
|
||||
summarizeBy: none
|
||||
|
||||
partition vwBalanceMensual = m
|
||||
mode: import
|
||||
source =
|
||||
let
|
||||
Origen = Sql.Database("192.168.40.8", "MarmotechBI"),
|
||||
Datos = Origen{[Schema="presidencia", Item="vwBalanceMensual"]}[Data]
|
||||
in
|
||||
Datos
|
||||
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
table vwGastosDepto
|
||||
column 'ano'
|
||||
dataType: int64
|
||||
sourceColumn: ano
|
||||
summarizeBy: none
|
||||
|
||||
column 'numero_mes'
|
||||
dataType: int64
|
||||
sourceColumn: numero_mes
|
||||
summarizeBy: none
|
||||
|
||||
column 'mes'
|
||||
dataType: string
|
||||
sourceColumn: mes
|
||||
summarizeBy: none
|
||||
|
||||
column 'AnoMes'
|
||||
dataType: string
|
||||
sourceColumn: AnoMes
|
||||
summarizeBy: none
|
||||
|
||||
column 'fecha_mes'
|
||||
dataType: dateTime
|
||||
sourceColumn: fecha_mes
|
||||
formatString: General Date
|
||||
summarizeBy: none
|
||||
|
||||
column 'gerencia_cod'
|
||||
dataType: string
|
||||
sourceColumn: gerencia_cod
|
||||
summarizeBy: none
|
||||
|
||||
column 'gerencia'
|
||||
dataType: string
|
||||
sourceColumn: gerencia
|
||||
summarizeBy: none
|
||||
|
||||
column 'departamento'
|
||||
dataType: int64
|
||||
sourceColumn: departamento
|
||||
summarizeBy: none
|
||||
|
||||
column 'depto_nombre'
|
||||
dataType: string
|
||||
sourceColumn: depto_nombre
|
||||
summarizeBy: none
|
||||
|
||||
column 'subgrupo_cod'
|
||||
dataType: string
|
||||
sourceColumn: subgrupo_cod
|
||||
summarizeBy: none
|
||||
|
||||
column 'subgrupo_desc'
|
||||
dataType: string
|
||||
sourceColumn: subgrupo_desc
|
||||
summarizeBy: none
|
||||
|
||||
column 'cuenta'
|
||||
dataType: string
|
||||
sourceColumn: cuenta
|
||||
summarizeBy: none
|
||||
|
||||
column 'cuenta_desc'
|
||||
dataType: string
|
||||
sourceColumn: cuenta_desc
|
||||
summarizeBy: none
|
||||
|
||||
column 'debito'
|
||||
dataType: decimal
|
||||
sourceColumn: debito
|
||||
summarizeBy: none
|
||||
|
||||
column 'credito'
|
||||
dataType: decimal
|
||||
sourceColumn: credito
|
||||
summarizeBy: none
|
||||
|
||||
column 'gasto'
|
||||
dataType: decimal
|
||||
sourceColumn: gasto
|
||||
summarizeBy: none
|
||||
|
||||
partition vwGastosDepto = m
|
||||
mode: import
|
||||
source =
|
||||
let
|
||||
Origen = Sql.Database("192.168.40.8", "MarmotechBI"),
|
||||
Datos = Origen{[Schema="presidencia", Item="vwGastosDepto"]}[Data]
|
||||
in
|
||||
Datos
|
||||
|
||||
+163
@@ -0,0 +1,163 @@
|
||||
table vwPLMensual
|
||||
column 'ano'
|
||||
dataType: int64
|
||||
sourceColumn: ano
|
||||
summarizeBy: none
|
||||
|
||||
column 'numero_mes'
|
||||
dataType: int64
|
||||
sourceColumn: numero_mes
|
||||
summarizeBy: none
|
||||
|
||||
column 'mes'
|
||||
dataType: string
|
||||
sourceColumn: mes
|
||||
summarizeBy: none
|
||||
|
||||
column 'AnoMes'
|
||||
dataType: string
|
||||
sourceColumn: AnoMes
|
||||
summarizeBy: none
|
||||
|
||||
column 'fecha_mes'
|
||||
dataType: dateTime
|
||||
sourceColumn: fecha_mes
|
||||
formatString: General Date
|
||||
summarizeBy: none
|
||||
|
||||
column 'grupo'
|
||||
dataType: string
|
||||
sourceColumn: grupo
|
||||
summarizeBy: none
|
||||
|
||||
column 'orden_linea'
|
||||
dataType: int64
|
||||
sourceColumn: orden_linea
|
||||
summarizeBy: none
|
||||
|
||||
column 'linea'
|
||||
dataType: string
|
||||
sourceColumn: linea
|
||||
summarizeBy: none
|
||||
|
||||
column 'subgrupo_cod'
|
||||
dataType: string
|
||||
sourceColumn: subgrupo_cod
|
||||
summarizeBy: none
|
||||
|
||||
column 'subgrupo_desc'
|
||||
dataType: string
|
||||
sourceColumn: subgrupo_desc
|
||||
summarizeBy: none
|
||||
|
||||
column 'cuenta'
|
||||
dataType: string
|
||||
sourceColumn: cuenta
|
||||
summarizeBy: none
|
||||
|
||||
column 'cuenta_desc'
|
||||
dataType: string
|
||||
sourceColumn: cuenta_desc
|
||||
summarizeBy: none
|
||||
|
||||
column 'nivel'
|
||||
dataType: int64
|
||||
sourceColumn: nivel
|
||||
summarizeBy: none
|
||||
|
||||
column 'debito'
|
||||
dataType: decimal
|
||||
sourceColumn: debito
|
||||
summarizeBy: none
|
||||
|
||||
column 'credito'
|
||||
dataType: decimal
|
||||
sourceColumn: credito
|
||||
summarizeBy: none
|
||||
|
||||
column 'resultado'
|
||||
dataType: decimal
|
||||
sourceColumn: resultado
|
||||
summarizeBy: none
|
||||
|
||||
column 'costo_gasto'
|
||||
dataType: decimal
|
||||
sourceColumn: costo_gasto
|
||||
summarizeBy: none
|
||||
|
||||
|
||||
measure 'Ventas Netas' = CALCULATE ( SUM ( vwPLMensual[resultado] ), vwPLMensual[grupo] = "4" )
|
||||
formatString: \$ #,0,," M";\$ -#,0,," M";\$ 0
|
||||
measure 'Costo de Ventas' = CALCULATE ( SUM ( vwPLMensual[costo_gasto] ), vwPLMensual[grupo] = "5" )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Gastos Operativos' = CALCULATE ( SUM ( vwPLMensual[costo_gasto] ), vwPLMensual[grupo] = "7" )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Otros Ing. y Gastos' = CALCULATE ( SUM ( vwPLMensual[costo_gasto] ), vwPLMensual[linea] = "Otros Ingresos y Gastos" )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'ISR' = CALCULATE ( SUM ( vwPLMensual[costo_gasto] ), vwPLMensual[linea] = "Impuesto sobre la Renta" )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Utilidad Bruta' = [Ventas Netas] - [Costo de Ventas]
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Utilidad Operativa' = [Utilidad Bruta] - [Gastos Operativos]
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Utilidad antes ISR' = [Utilidad Operativa] - [Otros Ing. y Gastos]
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Utilidad Neta' = SUM ( vwPLMensual[resultado] )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Margen Bruto %' = DIVIDE ( [Utilidad Bruta], [Ventas Netas] )
|
||||
formatString: 0.0%
|
||||
measure 'Margen Operativo %' = DIVIDE ( [Utilidad Operativa], [Ventas Netas] )
|
||||
formatString: 0.0%
|
||||
measure 'Margen Neto %' = DIVIDE ( [Utilidad Neta], [Ventas Netas] )
|
||||
formatString: 0.0%
|
||||
measure 'Costo % Ventas' = DIVIDE ( [Costo de Ventas], [Ventas Netas] )
|
||||
formatString: 0.0%
|
||||
measure 'Gastos % Ventas' = DIVIDE ( [Gastos Operativos], [Ventas Netas] )
|
||||
formatString: 0.0%
|
||||
measure 'Ventas AA' = CALCULATE ( [Ventas Netas], SAMEPERIODLASTYEAR ( DimCalendario[Date] ) )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Utilidad Neta AA' = CALCULATE ( [Utilidad Neta], SAMEPERIODLASTYEAR ( DimCalendario[Date] ) )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Ventas YoY %' = DIVIDE ( [Ventas Netas] - [Ventas AA], [Ventas AA] )
|
||||
formatString: 0.0%
|
||||
measure 'Utilidad YoY %' = DIVIDE ( [Utilidad Neta] - [Utilidad Neta AA], [Utilidad Neta AA] )
|
||||
formatString: 0.0%
|
||||
measure 'Ventas YTD' = TOTALYTD ( [Ventas Netas], DimCalendario[Date] )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Utilidad Neta YTD' = TOTALYTD ( [Utilidad Neta], DimCalendario[Date] )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Gasto Total' = SUM ( vwGastosDepto[gasto] )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Gasto AA' = CALCULATE ( [Gasto Total], SAMEPERIODLASTYEAR ( DimCalendario[Date] ) )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Gasto YoY %' = DIVIDE ( [Gasto Total] - [Gasto AA], [Gasto AA] )
|
||||
formatString: 0.0%
|
||||
measure 'Gasto % de Ventas' = DIVIDE ( [Gasto Total], [Ventas Netas] )
|
||||
formatString: 0.0%
|
||||
measure 'Saldo (fin periodo)' = VAR u = MAX ( vwBalanceMensual[fecha_mes] ) RETURN CALCULATE ( SUM ( vwBalanceMensual[saldo_presentacion] ), vwBalanceMensual[fecha_mes] = u )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Activos' = CALCULATE ( [Saldo (fin periodo)], vwBalanceMensual[grupo] = "1" )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Pasivos' = CALCULATE ( [Saldo (fin periodo)], vwBalanceMensual[grupo] = "2" )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Patrimonio' = CALCULATE ( [Saldo (fin periodo)], vwBalanceMensual[grupo] = "3" )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Activo Corriente' = CALCULATE ( [Saldo (fin periodo)], vwBalanceMensual[subgrupo_cod] = "11" )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Pasivo Corriente' = CALCULATE ( [Saldo (fin periodo)], vwBalanceMensual[subgrupo_cod] IN {"20","21"} )
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Razon Corriente' = DIVIDE ( [Activo Corriente], [Pasivo Corriente] )
|
||||
formatString: 0.00
|
||||
measure 'Capital de Trabajo' = [Activo Corriente] - [Pasivo Corriente]
|
||||
formatString: \$ #,0,," M"
|
||||
measure 'Endeudamiento %' = DIVIDE ( [Pasivos], [Activos] )
|
||||
formatString: 0.0%
|
||||
partition vwPLMensual = m
|
||||
mode: import
|
||||
source =
|
||||
let
|
||||
Origen = Sql.Database("192.168.40.8", "MarmotechBI"),
|
||||
Datos = Origen{[Schema="presidencia", Item="vwPLMensual"]}[Data]
|
||||
in
|
||||
Datos
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"artifacts": [
|
||||
{ "report": { "path": "Radiografia_Marmotech.Report" } }
|
||||
],
|
||||
"settings": { "enableAutoRecovery": true }
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
/* ============================================================================
|
||||
MarmotechBI — Vistas para el Dashboard Ejecutivo de Presidencia
|
||||
----------------------------------------------------------------------------
|
||||
Autor : Juan F. Soto (jsoto)
|
||||
Fecha : 2026-08-26
|
||||
Servidor : 192.168.40.8 (SQL Server 2016)
|
||||
Base : MarmotechBI (capa semantica; los datos viven en marmotech.dbo.*)
|
||||
Objetivo : Radiografia financiera para el Presidente, a partir del
|
||||
Mayor General Analitico (cgprrp008) y el Analisis de Gastos
|
||||
por Departamento (cgprrp009).
|
||||
|
||||
Fuente de datos:
|
||||
marmotech.dbo.cgtb00004 = transacciones contables (debito/credito por cuenta/fecha)
|
||||
marmotech.dbo.cgtb00001 = catalogo de cuentas (nivel, descripcion)
|
||||
marmotech.dbo.prdtable = periodos contables (ano, mes -> rango de fechas)
|
||||
marmotech.dbo.mestable = nombres de meses
|
||||
marmotech.dbo.adtb00001 = departamentos (nom_dpto)
|
||||
|
||||
Reglas de negocio (validadas contra cgprrp008 / cgprrp009):
|
||||
* Estado de Resultados por PRIMER DIGITO de la cuenta:
|
||||
4 = VENTAS NETA (naturaleza credito)
|
||||
5 = COSTO DE VENTAS (naturaleza debito)
|
||||
7 = GASTOS (naturaleza debito)
|
||||
8 = OTROS INGRESOS Y GASTOS (incluye 88 = IMPUESTO S/RENTA)
|
||||
* resultado (aporte a la utilidad) = credito - debito
|
||||
-> Ventas suma positivo; Costo/Gastos/ISR restan; la suma de todas
|
||||
las lineas = Utilidad Neta del periodo.
|
||||
* Solo transacciones activas: status_t IS NULL.
|
||||
* Se EXCLUYE el asiento de cierre anual (ref 'ED.99-001/12YY' y
|
||||
'ED.99-002/12YY'); de lo contrario cada ano cerrado netearia a 0 porque
|
||||
el cierre revierte las cuentas de resultado contra Utilidades Retenidas.
|
||||
(2026 aun no tiene cierre, por eso muestra saldo operativo real.)
|
||||
|
||||
Seguridad (requisito): estas vistas solo deben ser legibles por jsoto.
|
||||
Se crean en el esquema [presidencia] y se hace DENY SELECT a [public].
|
||||
jsoto (MARMOTECH\jsoto y login SQL jsoto) es sysadmin/db_owner, por lo que
|
||||
ignora el DENY y conserva acceso; el resto del equipo (db_datareader) queda
|
||||
bloqueado a nivel de esquema.
|
||||
============================================================================ */
|
||||
|
||||
USE MarmotechBI;
|
||||
GO
|
||||
|
||||
/* ---- 1. Esquema dedicado ------------------------------------------------- */
|
||||
IF NOT EXISTS (SELECT 1 FROM sys.schemas WHERE name = 'presidencia')
|
||||
EXEC('CREATE SCHEMA presidencia AUTHORIZATION dbo;');
|
||||
GO
|
||||
|
||||
/* ---- 2. Estado de Resultados mensual (cgprrp008) ------------------------- */
|
||||
/* Grano: ano x mes x cuenta. Un renglon por cuenta contable de resultado. */
|
||||
IF OBJECT_ID('presidencia.vwPLMensual','V') IS NOT NULL
|
||||
DROP VIEW presidencia.vwPLMensual;
|
||||
GO
|
||||
CREATE VIEW presidencia.vwPLMensual
|
||||
AS
|
||||
WITH mov AS (
|
||||
SELECT p.ano,
|
||||
p.mes AS numero_mes,
|
||||
b.cuenta_no,
|
||||
SUM(b.debito) AS debito,
|
||||
SUM(b.credito) AS credito
|
||||
FROM marmotech.dbo.cgtb00004 b
|
||||
INNER JOIN marmotech.dbo.prdtable p
|
||||
ON b.fecha BETWEEN p.fecha_inicio AND p.fecha_corte
|
||||
WHERE b.status_t IS NULL
|
||||
AND LEFT(b.cuenta_no,1) IN ('4','5','7','8')
|
||||
AND b.ref NOT LIKE 'ED.99-001/12%' -- asiento de cierre anual
|
||||
AND b.ref NOT LIKE 'ED.99-002/12%' -- asiento de cierre anual (variante)
|
||||
GROUP BY p.ano, p.mes, b.cuenta_no
|
||||
)
|
||||
SELECT
|
||||
m.ano,
|
||||
m.numero_mes,
|
||||
ms.descrip AS mes,
|
||||
RIGHT('0000'+CONVERT(varchar(4),m.ano),4) + '-' +
|
||||
RIGHT('00'+CONVERT(varchar(2),m.numero_mes),2) AS AnoMes,
|
||||
DATEFROMPARTS(m.ano, m.numero_mes, 1) AS fecha_mes,
|
||||
LEFT(m.cuenta_no,1) AS grupo,
|
||||
CASE LEFT(m.cuenta_no,1)
|
||||
WHEN '4' THEN 1 WHEN '5' THEN 2 WHEN '7' THEN 3
|
||||
WHEN '8' THEN CASE WHEN m.cuenta_no LIKE '88%' THEN 5 ELSE 4 END
|
||||
END AS orden_linea,
|
||||
CASE LEFT(m.cuenta_no,1)
|
||||
WHEN '4' THEN 'Ventas Netas'
|
||||
WHEN '5' THEN 'Costo de Ventas'
|
||||
WHEN '7' THEN 'Gastos Operativos'
|
||||
WHEN '8' THEN CASE WHEN m.cuenta_no LIKE '88%'
|
||||
THEN 'Impuesto sobre la Renta'
|
||||
ELSE 'Otros Ingresos y Gastos' END
|
||||
END AS linea,
|
||||
LEFT(m.cuenta_no,2) AS subgrupo_cod,
|
||||
sg.descripcion AS subgrupo_desc,
|
||||
m.cuenta_no AS cuenta,
|
||||
ct.descripcion AS cuenta_desc,
|
||||
ct.nivel,
|
||||
m.debito,
|
||||
m.credito,
|
||||
CAST(m.credito - m.debito AS decimal(19,2)) AS resultado, -- + = aporta utilidad
|
||||
CAST(m.debito - m.credito AS decimal(19,2)) AS costo_gasto -- + = costo/gasto
|
||||
FROM mov m
|
||||
LEFT JOIN marmotech.dbo.cgtb00001 ct ON ct.cuenta_no = m.cuenta_no
|
||||
LEFT JOIN marmotech.dbo.cgtb00001 sg ON sg.cuenta_no = LEFT(m.cuenta_no,2)
|
||||
LEFT JOIN marmotech.dbo.mestable ms ON ms.mes = m.numero_mes;
|
||||
GO
|
||||
|
||||
/* ---- 3. Analisis de Gastos por Departamento (cgprrp009) ------------------ */
|
||||
/* Grano: ano x mes x departamento x cuenta. Solo grupo 7 (GASTOS). */
|
||||
IF OBJECT_ID('presidencia.vwGastosDepto','V') IS NOT NULL
|
||||
DROP VIEW presidencia.vwGastosDepto;
|
||||
GO
|
||||
CREATE VIEW presidencia.vwGastosDepto
|
||||
AS
|
||||
WITH mov AS (
|
||||
SELECT p.ano,
|
||||
p.mes AS numero_mes,
|
||||
ISNULL(b.departamento,0) AS departamento,
|
||||
b.cuenta_no,
|
||||
SUM(b.debito) AS debito,
|
||||
SUM(b.credito) AS credito
|
||||
FROM marmotech.dbo.cgtb00004 b
|
||||
INNER JOIN marmotech.dbo.prdtable p
|
||||
ON b.fecha BETWEEN p.fecha_inicio AND p.fecha_corte
|
||||
WHERE b.status_t IS NULL
|
||||
AND LEFT(b.cuenta_no,1) = '7'
|
||||
AND b.ref NOT LIKE 'ED.99-001/12%'
|
||||
AND b.ref NOT LIKE 'ED.99-002/12%'
|
||||
GROUP BY p.ano, p.mes, ISNULL(b.departamento,0), b.cuenta_no
|
||||
)
|
||||
SELECT
|
||||
m.ano,
|
||||
m.numero_mes,
|
||||
ms.descrip AS mes,
|
||||
RIGHT('0000'+CONVERT(varchar(4),m.ano),4) + '-' +
|
||||
RIGHT('00'+CONVERT(varchar(2),m.numero_mes),2) AS AnoMes,
|
||||
DATEFROMPARTS(m.ano, m.numero_mes, 1) AS fecha_mes,
|
||||
LEFT(CONVERT(varchar(4),m.departamento),1) AS gerencia_cod,
|
||||
CASE LEFT(CONVERT(varchar(4),m.departamento),1)
|
||||
WHEN '1' THEN 'Gerencia General'
|
||||
WHEN '2' THEN 'Administracion y Materiales'
|
||||
WHEN '3' THEN 'Gestion Humana'
|
||||
WHEN '4' THEN 'Ventas y Mercadeo'
|
||||
WHEN '5' THEN 'Canteras'
|
||||
WHEN '6' THEN 'Planta / Produccion'
|
||||
WHEN '7' THEN 'Planta Agregados'
|
||||
WHEN '8' THEN 'Marmotech en Caribbean'
|
||||
ELSE 'Sin Departamento'
|
||||
END AS gerencia,
|
||||
m.departamento,
|
||||
ISNULL(ad.nom_dpto,'SIN DEPARTAMENTO') AS depto_nombre,
|
||||
LEFT(m.cuenta_no,2) AS subgrupo_cod,
|
||||
sg.descripcion AS subgrupo_desc,
|
||||
m.cuenta_no AS cuenta,
|
||||
ct.descripcion AS cuenta_desc,
|
||||
m.debito,
|
||||
m.credito,
|
||||
CAST(m.debito - m.credito AS decimal(19,2)) AS gasto -- + = gasto neto
|
||||
FROM mov m
|
||||
LEFT JOIN marmotech.dbo.cgtb00001 ct ON ct.cuenta_no = m.cuenta_no
|
||||
LEFT JOIN marmotech.dbo.cgtb00001 sg ON sg.cuenta_no = LEFT(m.cuenta_no,2)
|
||||
LEFT JOIN marmotech.dbo.adtb00001 ad ON ad.departamento = m.departamento
|
||||
LEFT JOIN marmotech.dbo.mestable ms ON ms.mes = m.numero_mes;
|
||||
GO
|
||||
|
||||
/* ---- 4. Balance General / Estructura financiera (saldo acumulado) -------- */
|
||||
/* Grano: ano x mes x cuenta, grupos 1 (Activos) 2 (Pasivos) 3 (Capital). */
|
||||
/* saldo_acumulado = saldo contable al cierre del mes (deb-cred acumulado). */
|
||||
IF OBJECT_ID('presidencia.vwBalanceMensual','V') IS NOT NULL
|
||||
DROP VIEW presidencia.vwBalanceMensual;
|
||||
GO
|
||||
CREATE VIEW presidencia.vwBalanceMensual
|
||||
AS
|
||||
WITH mov AS (
|
||||
SELECT p.ano,
|
||||
p.mes AS numero_mes,
|
||||
b.cuenta_no,
|
||||
SUM(b.debito - b.credito) AS movimiento
|
||||
FROM marmotech.dbo.cgtb00004 b
|
||||
INNER JOIN marmotech.dbo.prdtable p
|
||||
ON b.fecha BETWEEN p.fecha_inicio AND p.fecha_corte
|
||||
WHERE b.status_t IS NULL
|
||||
AND LEFT(b.cuenta_no,1) IN ('1','2','3')
|
||||
GROUP BY p.ano, p.mes, b.cuenta_no
|
||||
),
|
||||
acum AS (
|
||||
SELECT m.*,
|
||||
SUM(m.movimiento) OVER (PARTITION BY m.cuenta_no
|
||||
ORDER BY m.ano, m.numero_mes
|
||||
ROWS UNBOUNDED PRECEDING) AS saldo_acumulado
|
||||
FROM mov m
|
||||
)
|
||||
SELECT
|
||||
a.ano,
|
||||
a.numero_mes,
|
||||
ms.descrip AS mes,
|
||||
RIGHT('0000'+CONVERT(varchar(4),a.ano),4) + '-' +
|
||||
RIGHT('00'+CONVERT(varchar(2),a.numero_mes),2) AS AnoMes,
|
||||
DATEFROMPARTS(a.ano, a.numero_mes, 1) AS fecha_mes,
|
||||
LEFT(a.cuenta_no,1) AS grupo,
|
||||
CASE LEFT(a.cuenta_no,1) WHEN '1' THEN 'Activos'
|
||||
WHEN '2' THEN 'Pasivos'
|
||||
WHEN '3' THEN 'Capital' END AS grupo_desc,
|
||||
LEFT(a.cuenta_no,2) AS subgrupo_cod,
|
||||
sg.descripcion AS subgrupo_desc,
|
||||
a.cuenta_no AS cuenta,
|
||||
ct.descripcion AS cuenta_desc,
|
||||
CAST(a.movimiento AS decimal(19,2)) AS movimiento_mes,
|
||||
CAST(a.saldo_acumulado AS decimal(19,2)) AS saldo_natural, -- deb-cred
|
||||
/* Presentacion: Activos positivos por debito; Pasivos/Capital por credito */
|
||||
CAST(CASE WHEN LEFT(a.cuenta_no,1) = '1' THEN a.saldo_acumulado
|
||||
ELSE -a.saldo_acumulado END AS decimal(19,2)) AS saldo_presentacion
|
||||
FROM acum a
|
||||
LEFT JOIN marmotech.dbo.cgtb00001 ct ON ct.cuenta_no = a.cuenta_no
|
||||
LEFT JOIN marmotech.dbo.cgtb00001 sg ON sg.cuenta_no = LEFT(a.cuenta_no,2)
|
||||
LEFT JOIN marmotech.dbo.mestable ms ON ms.mes = a.numero_mes;
|
||||
GO
|
||||
|
||||
/* ---- 5. Seguridad: solo jsoto ------------------------------------------- */
|
||||
DENY SELECT ON SCHEMA::presidencia TO [public];
|
||||
GO
|
||||
/* Concesion explicita (documenta la intencion; jsoto ya es db_owner/sysadmin) */
|
||||
IF EXISTS (SELECT 1 FROM sys.database_principals WHERE name = 'MARMOTECH\jsoto')
|
||||
GRANT SELECT ON SCHEMA::presidencia TO [MARMOTECH\jsoto];
|
||||
GO
|
||||
IF EXISTS (SELECT 1 FROM sys.database_principals WHERE name = 'jsoto')
|
||||
GRANT SELECT ON SCHEMA::presidencia TO [jsoto];
|
||||
GO
|
||||
@@ -0,0 +1,342 @@
|
||||
<# Genera el proyecto Power BI (.pbip) "Radiografia_Marmotech"
|
||||
Modelo (TMDL) con las 3 vistas de presidencia + DimCalendario + medidas DAX,
|
||||
y un reporte (PBIR) con 3 paginas. Abrir el .pbip en Power BI Desktop y
|
||||
Guardar como .pbix.
|
||||
Autor: jsoto · 2026-08-26
|
||||
#>
|
||||
param(
|
||||
[string]$Root = "C:\Users\jsoto\Documents\NACE\proyectos\Fuentes\MARMOTECH\Dashboards MARMOTECH\Radiografia_Marmotech"
|
||||
)
|
||||
$ErrorActionPreference = "Stop"
|
||||
$Name = "Radiografia_Marmotech"
|
||||
$SM = Join-Path $Root "$Name.SemanticModel"
|
||||
$RP = Join-Path $Root "$Name.Report"
|
||||
if(Test-Path $Root){ Remove-Item $Root -Recurse -Force }
|
||||
New-Item -ItemType Directory -Force -Path $Root,$SM,(Join-Path $SM "definition"),(Join-Path $SM "definition\tables"),$RP,(Join-Path $RP "definition"),(Join-Path $RP "definition\pages") | Out-Null
|
||||
|
||||
function W($path,$content){
|
||||
$dir = Split-Path $path -Parent
|
||||
if(!(Test-Path $dir)){ New-Item -ItemType Directory -Force -Path $dir | Out-Null }
|
||||
# UTF-8 sin BOM
|
||||
[System.IO.File]::WriteAllText($path, $content, (New-Object System.Text.UTF8Encoding($false)))
|
||||
}
|
||||
function G(){ [guid]::NewGuid().ToString() }
|
||||
$TAB = [char]9
|
||||
|
||||
# ---------------- .pbip ----------------
|
||||
W (Join-Path $Root "$Name.pbip") @"
|
||||
{
|
||||
"version": "1.0",
|
||||
"artifacts": [
|
||||
{ "report": { "path": "$Name.Report" } }
|
||||
],
|
||||
"settings": { "enableAutoRecovery": true }
|
||||
}
|
||||
"@
|
||||
|
||||
# ---------------- SemanticModel/.platform ----------------
|
||||
W (Join-Path $SM ".platform") @"
|
||||
{
|
||||
"`$schema": "https://developer.microsoft.com/json-schemas/fabric/gitIntegration/platformProperties/2.0.0/schema.json",
|
||||
"metadata": { "type": "SemanticModel", "displayName": "$Name" },
|
||||
"config": { "version": "2.0", "logicalId": "$(G)" }
|
||||
}
|
||||
"@
|
||||
|
||||
# ---------------- SemanticModel/definition.pbism ----------------
|
||||
W (Join-Path $SM "definition.pbism") @"
|
||||
{
|
||||
"version": "4.0",
|
||||
"settings": {}
|
||||
}
|
||||
"@
|
||||
|
||||
# ---------------- database.tmdl ----------------
|
||||
W (Join-Path $SM "definition\database.tmdl") ("database`n${TAB}compatibilityLevel: 1550`n")
|
||||
|
||||
# ---------------- model.tmdl ----------------
|
||||
$model = @()
|
||||
$model += "model Model"
|
||||
$model += "${TAB}culture: es-ES"
|
||||
$model += "${TAB}defaultPowerBIDataSourceVersion: powerBI_V3"
|
||||
$model += "${TAB}sourceQueryCulture: es-ES"
|
||||
$model += ""
|
||||
$model += "annotation PBI_QueryOrder = [`"vwPLMensual`",`"vwGastosDepto`",`"vwBalanceMensual`",`"DimCalendario`"]"
|
||||
$model += ""
|
||||
W (Join-Path $SM "definition\model.tmdl") (($model -join "`n") + "`n")
|
||||
|
||||
# ---------------- helper: tabla desde vista SQL ----------------
|
||||
function Table-Sql($tname,$cols){
|
||||
# cols: array de "nombre|tipo"
|
||||
$l = @()
|
||||
$l += "table $tname"
|
||||
foreach($c in $cols){
|
||||
$p = $c.Split("|"); $cn=$p[0]; $ct=$p[1]
|
||||
$l += "${TAB}column '$cn'"
|
||||
$l += "${TAB}${TAB}dataType: $ct"
|
||||
$l += "${TAB}${TAB}sourceColumn: $cn"
|
||||
if($ct -eq "dateTime"){ $l += "${TAB}${TAB}formatString: General Date" }
|
||||
$l += "${TAB}${TAB}summarizeBy: none"
|
||||
$l += ""
|
||||
}
|
||||
$l += "${TAB}partition $tname = m"
|
||||
$l += "${TAB}${TAB}mode: import"
|
||||
$l += "${TAB}${TAB}source ="
|
||||
$l += "${TAB}${TAB}${TAB}${TAB}let"
|
||||
$l += "${TAB}${TAB}${TAB}${TAB} Origen = Sql.Database(`"192.168.40.8`", `"MarmotechBI`"),"
|
||||
$l += "${TAB}${TAB}${TAB}${TAB} Datos = Origen{[Schema=`"presidencia`", Item=`"$tname`"]}[Data]"
|
||||
$l += "${TAB}${TAB}${TAB}${TAB}in"
|
||||
$l += "${TAB}${TAB}${TAB}${TAB} Datos"
|
||||
$l += ""
|
||||
return ($l -join "`n") + "`n"
|
||||
}
|
||||
|
||||
$plCols = @("ano|int64","numero_mes|int64","mes|string","AnoMes|string","fecha_mes|dateTime","grupo|string","orden_linea|int64","linea|string","subgrupo_cod|string","subgrupo_desc|string","cuenta|string","cuenta_desc|string","nivel|int64","debito|decimal","credito|decimal","resultado|decimal","costo_gasto|decimal")
|
||||
$gsCols = @("ano|int64","numero_mes|int64","mes|string","AnoMes|string","fecha_mes|dateTime","gerencia_cod|string","gerencia|string","departamento|int64","depto_nombre|string","subgrupo_cod|string","subgrupo_desc|string","cuenta|string","cuenta_desc|string","debito|decimal","credito|decimal","gasto|decimal")
|
||||
$blCols = @("ano|int64","numero_mes|int64","mes|string","AnoMes|string","fecha_mes|dateTime","grupo|string","grupo_desc|string","subgrupo_cod|string","subgrupo_desc|string","cuenta|string","cuenta_desc|string","movimiento_mes|decimal","saldo_natural|decimal","saldo_presentacion|decimal")
|
||||
|
||||
# --- vwPLMensual (aloja las medidas) ---
|
||||
$pl = Table-Sql "vwPLMensual" $plCols
|
||||
# medidas
|
||||
$M = @()
|
||||
function Meas($n,$expr,$fmt){
|
||||
$s = @()
|
||||
$s += "${TAB}measure '$n' = $expr"
|
||||
if($fmt){ $s += "${TAB}${TAB}formatString: $fmt" }
|
||||
$s += ""
|
||||
return ($s -join "`n")
|
||||
}
|
||||
$m0 = "`n"
|
||||
$m0 += Meas "Ventas Netas" "CALCULATE ( SUM ( vwPLMensual[resultado] ), vwPLMensual[grupo] = `"4`" )" "\`$ #,0,,`" M`";\`$ -#,0,,`" M`";\`$ 0"
|
||||
$m0 += Meas "Costo de Ventas" "CALCULATE ( SUM ( vwPLMensual[costo_gasto] ), vwPLMensual[grupo] = `"5`" )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Gastos Operativos" "CALCULATE ( SUM ( vwPLMensual[costo_gasto] ), vwPLMensual[grupo] = `"7`" )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Otros Ing. y Gastos" "CALCULATE ( SUM ( vwPLMensual[costo_gasto] ), vwPLMensual[linea] = `"Otros Ingresos y Gastos`" )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "ISR" "CALCULATE ( SUM ( vwPLMensual[costo_gasto] ), vwPLMensual[linea] = `"Impuesto sobre la Renta`" )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Utilidad Bruta" "[Ventas Netas] - [Costo de Ventas]" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Utilidad Operativa" "[Utilidad Bruta] - [Gastos Operativos]" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Utilidad antes ISR" "[Utilidad Operativa] - [Otros Ing. y Gastos]" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Utilidad Neta" "SUM ( vwPLMensual[resultado] )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Margen Bruto %" "DIVIDE ( [Utilidad Bruta], [Ventas Netas] )" "0.0%"
|
||||
$m0 += Meas "Margen Operativo %" "DIVIDE ( [Utilidad Operativa], [Ventas Netas] )" "0.0%"
|
||||
$m0 += Meas "Margen Neto %" "DIVIDE ( [Utilidad Neta], [Ventas Netas] )" "0.0%"
|
||||
$m0 += Meas "Costo % Ventas" "DIVIDE ( [Costo de Ventas], [Ventas Netas] )" "0.0%"
|
||||
$m0 += Meas "Gastos % Ventas" "DIVIDE ( [Gastos Operativos], [Ventas Netas] )" "0.0%"
|
||||
$m0 += Meas "Ventas AA" "CALCULATE ( [Ventas Netas], SAMEPERIODLASTYEAR ( DimCalendario[Date] ) )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Utilidad Neta AA" "CALCULATE ( [Utilidad Neta], SAMEPERIODLASTYEAR ( DimCalendario[Date] ) )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Ventas YoY %" "DIVIDE ( [Ventas Netas] - [Ventas AA], [Ventas AA] )" "0.0%"
|
||||
$m0 += Meas "Utilidad YoY %" "DIVIDE ( [Utilidad Neta] - [Utilidad Neta AA], [Utilidad Neta AA] )" "0.0%"
|
||||
$m0 += Meas "Ventas YTD" "TOTALYTD ( [Ventas Netas], DimCalendario[Date] )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Utilidad Neta YTD" "TOTALYTD ( [Utilidad Neta], DimCalendario[Date] )" "\`$ #,0,,`" M`""
|
||||
# medidas de gastos
|
||||
$m0 += Meas "Gasto Total" "SUM ( vwGastosDepto[gasto] )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Gasto AA" "CALCULATE ( [Gasto Total], SAMEPERIODLASTYEAR ( DimCalendario[Date] ) )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Gasto YoY %" "DIVIDE ( [Gasto Total] - [Gasto AA], [Gasto AA] )" "0.0%"
|
||||
$m0 += Meas "Gasto % de Ventas" "DIVIDE ( [Gasto Total], [Ventas Netas] )" "0.0%"
|
||||
# medidas de balance
|
||||
$m0 += Meas "Saldo (fin periodo)" "VAR u = MAX ( vwBalanceMensual[fecha_mes] ) RETURN CALCULATE ( SUM ( vwBalanceMensual[saldo_presentacion] ), vwBalanceMensual[fecha_mes] = u )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Activos" "CALCULATE ( [Saldo (fin periodo)], vwBalanceMensual[grupo] = `"1`" )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Pasivos" "CALCULATE ( [Saldo (fin periodo)], vwBalanceMensual[grupo] = `"2`" )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Patrimonio" "CALCULATE ( [Saldo (fin periodo)], vwBalanceMensual[grupo] = `"3`" )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Activo Corriente" "CALCULATE ( [Saldo (fin periodo)], vwBalanceMensual[subgrupo_cod] = `"11`" )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Pasivo Corriente" "CALCULATE ( [Saldo (fin periodo)], vwBalanceMensual[subgrupo_cod] IN {`"20`",`"21`"} )" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Razon Corriente" "DIVIDE ( [Activo Corriente], [Pasivo Corriente] )" "0.00"
|
||||
$m0 += Meas "Capital de Trabajo" "[Activo Corriente] - [Pasivo Corriente]" "\`$ #,0,,`" M`""
|
||||
$m0 += Meas "Endeudamiento %" "DIVIDE ( [Pasivos], [Activos] )" "0.0%"
|
||||
|
||||
# insertar medidas antes de la particion (deben ir dentro de la tabla, antes de 'partition')
|
||||
$pl = $pl -replace "(?s)(${TAB}partition vwPLMensual = m)", ($m0 + "`$1")
|
||||
W (Join-Path $SM "definition\tables\vwPLMensual.tmdl") $pl
|
||||
|
||||
W (Join-Path $SM "definition\tables\vwGastosDepto.tmdl") (Table-Sql "vwGastosDepto" $gsCols)
|
||||
W (Join-Path $SM "definition\tables\vwBalanceMensual.tmdl") (Table-Sql "vwBalanceMensual" $blCols)
|
||||
|
||||
# ---------------- DimCalendario (tabla calculada) ----------------
|
||||
$dc = @()
|
||||
$dc += "table DimCalendario"
|
||||
foreach($c in @("Date|dateTime","Anio|int64","MesNo|int64","Mes|string","AnioMes|string","PrimerDiaMes|dateTime","Trimestre|string")){
|
||||
$p=$c.Split("|");$cn=$p[0];$ct=$p[1]
|
||||
$dc += "${TAB}column $cn"
|
||||
$dc += "${TAB}${TAB}dataType: $ct"
|
||||
$dc += "${TAB}${TAB}sourceColumn: [$cn]"
|
||||
if($ct -eq "dateTime"){ $dc += "${TAB}${TAB}formatString: General Date" }
|
||||
$dc += "${TAB}${TAB}summarizeBy: none"
|
||||
$dc += ""
|
||||
}
|
||||
$dax = 'ADDCOLUMNS ( CALENDAR ( DATE ( 2015, 1, 1 ), DATE ( 2028, 12, 31 ) ), "Anio", YEAR ( [Date] ), "MesNo", MONTH ( [Date] ), "Mes", FORMAT ( [Date], "MMM" ), "AnioMes", FORMAT ( [Date], "yyyy-MM" ), "PrimerDiaMes", DATE ( YEAR ( [Date] ), MONTH ( [Date] ), 1 ), "Trimestre", "T" & FORMAT ( [Date], "Q" ) )'
|
||||
$dc += "${TAB}partition DimCalendario = calculated"
|
||||
$dc += "${TAB}${TAB}mode: import"
|
||||
$dc += "${TAB}${TAB}source = $dax"
|
||||
$dc += ""
|
||||
W (Join-Path $SM "definition\tables\DimCalendario.tmdl") (($dc -join "`n") + "`n")
|
||||
|
||||
# ---------------- relationships.tmdl ----------------
|
||||
$rel = @()
|
||||
foreach($t in @("vwPLMensual","vwGastosDepto","vwBalanceMensual")){
|
||||
$rel += "relationship $(G)"
|
||||
$rel += "${TAB}fromColumn: $t.fecha_mes"
|
||||
$rel += "${TAB}toColumn: DimCalendario.Date"
|
||||
$rel += ""
|
||||
}
|
||||
W (Join-Path $SM "definition\relationships.tmdl") (($rel -join "`n") + "`n")
|
||||
|
||||
Write-Output "SemanticModel escrito."
|
||||
|
||||
# =====================================================================
|
||||
# REPORTE (PBIR)
|
||||
# =====================================================================
|
||||
W (Join-Path $RP ".platform") @"
|
||||
{
|
||||
"`$schema": "https://developer.microsoft.com/json-schemas/fabric/gitIntegration/platformProperties/2.0.0/schema.json",
|
||||
"metadata": { "type": "Report", "displayName": "$Name" },
|
||||
"config": { "version": "2.0", "logicalId": "$(G)" }
|
||||
}
|
||||
"@
|
||||
|
||||
W (Join-Path $RP "definition.pbir") @"
|
||||
{
|
||||
"version": "4.0",
|
||||
"datasetReference": { "byPath": { "path": "../$Name.SemanticModel" } }
|
||||
}
|
||||
"@
|
||||
|
||||
# PBIR exige version.json dentro de definition/
|
||||
W (Join-Path $RP "definition\version.json") @"
|
||||
{
|
||||
"version": "2.0.0"
|
||||
}
|
||||
"@
|
||||
|
||||
W (Join-Path $RP "definition\report.json") @"
|
||||
{
|
||||
"`$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/report/1.0.0/schema.json",
|
||||
"themeCollection": { "baseTheme": { "name": "CY24SU10" } },
|
||||
"layoutOptimization": "None"
|
||||
}
|
||||
"@
|
||||
|
||||
# ---- helpers de visuales PBIR ----
|
||||
function Field-Measure($entity,$prop){
|
||||
return @"
|
||||
{ "field": { "Measure": { "Expression": { "SourceRef": { "Entity": "$entity" } }, "Property": "$prop" } }, "queryRef": "$entity.$prop", "nativeQueryRef": "$prop" }
|
||||
"@
|
||||
}
|
||||
function Field-Column($entity,$prop){
|
||||
return @"
|
||||
{ "field": { "Column": { "Expression": { "SourceRef": { "Entity": "$entity" } }, "Property": "$prop" } }, "queryRef": "$entity.$prop", "nativeQueryRef": "$prop" }
|
||||
"@
|
||||
}
|
||||
# roles: hashtable rol -> array de proyecciones json
|
||||
function Visual($pageDir,$vtype,$x,$y,$w,$h,$roles,$title){
|
||||
$vid = G
|
||||
$vdir = Join-Path $pageDir "visuals\$vid"
|
||||
New-Item -ItemType Directory -Force -Path $vdir | Out-Null
|
||||
$projBlocks = @()
|
||||
foreach($r in $roles.Keys){
|
||||
$items = ($roles[$r] -join ",`n")
|
||||
$projBlocks += "`"$r`": { `"projections`": [ $items ] }"
|
||||
}
|
||||
$queryState = ($projBlocks -join ",`n")
|
||||
$titleObj = ""
|
||||
if($title){
|
||||
$titleObj = @"
|
||||
,
|
||||
"objects": {
|
||||
"title": [ { "properties": { "text": { "expr": { "Literal": { "Value": "'$title'" } } }, "show": { "expr": { "Literal": { "Value": "true" } } } } } ]
|
||||
}
|
||||
"@
|
||||
}
|
||||
$json = @"
|
||||
{
|
||||
"`$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/1.0.0/schema.json",
|
||||
"name": "$vid",
|
||||
"position": { "x": $x, "y": $y, "z": 0, "width": $w, "height": $h, "tabOrder": 0 },
|
||||
"visual": {
|
||||
"visualType": "$vtype",
|
||||
"query": { "queryState": { $queryState } },
|
||||
"drillFilterOtherVisuals": true$titleObj
|
||||
}
|
||||
}
|
||||
"@
|
||||
W (Join-Path $vdir "visual.json") $json
|
||||
return $vid
|
||||
}
|
||||
|
||||
$pageIds = @()
|
||||
|
||||
# ============ PAGINA 1: Radiografia ============
|
||||
$p1 = G; $pageIds += $p1
|
||||
$p1dir = Join-Path $RP "definition\pages\$p1"
|
||||
New-Item -ItemType Directory -Force -Path $p1dir | Out-Null
|
||||
W (Join-Path $p1dir "page.json") @"
|
||||
{
|
||||
"`$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/page/1.0.0/schema.json",
|
||||
"name": "$p1",
|
||||
"displayName": "Radiografia",
|
||||
"displayOption": "FitToPage",
|
||||
"height": 720,
|
||||
"width": 1280
|
||||
}
|
||||
"@
|
||||
[void](Visual $p1dir "card" 16 16 280 140 @{ "Values" = @((Field-Measure "vwPLMensual" "Ventas Netas")) } "Ventas Netas")
|
||||
[void](Visual $p1dir "card" 312 16 280 140 @{ "Values" = @((Field-Measure "vwPLMensual" "Utilidad Bruta")) } "Utilidad Bruta")
|
||||
[void](Visual $p1dir "card" 688 16 280 140 @{ "Values" = @((Field-Measure "vwPLMensual" "Utilidad Operativa")) } "Utilidad Operativa")
|
||||
[void](Visual $p1dir "card" 984 16 280 140 @{ "Values" = @((Field-Measure "vwPLMensual" "Utilidad Neta")) } "Utilidad Neta")
|
||||
[void](Visual $p1dir "waterfallChart" 16 170 620 300 @{ "Category" = @((Field-Column "vwPLMensual" "linea")); "Y" = @((Field-Measure "vwPLMensual" "Utilidad Neta")) } "Estado de Resultados (cascada)")
|
||||
[void](Visual $p1dir "lineClusteredColumnComboChart" 652 170 612 300 @{ "Category" = @((Field-Column "DimCalendario" "Mes")); "Y" = @((Field-Measure "vwPLMensual" "Ventas Netas")); "Y2" = @((Field-Measure "vwPLMensual" "Utilidad Neta")) } "Comportamiento del periodo (Ventas vs Utilidad)")
|
||||
[void](Visual $p1dir "clusteredColumnChart" 16 484 620 220 @{ "Category" = @((Field-Column "DimCalendario" "Anio")); "Y" = @((Field-Measure "vwPLMensual" "Ventas Netas"),(Field-Measure "vwPLMensual" "Utilidad Neta")) } "Trayectoria anual")
|
||||
[void](Visual $p1dir "slicer" 652 484 300 120 @{ "Values" = @((Field-Column "DimCalendario" "Anio")) } "Ano")
|
||||
|
||||
# ============ PAGINA 2: Gastos ============
|
||||
$p2 = G; $pageIds += $p2
|
||||
$p2dir = Join-Path $RP "definition\pages\$p2"
|
||||
New-Item -ItemType Directory -Force -Path $p2dir | Out-Null
|
||||
W (Join-Path $p2dir "page.json") @"
|
||||
{
|
||||
"`$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/page/1.0.0/schema.json",
|
||||
"name": "$p2",
|
||||
"displayName": "Analisis de Gastos",
|
||||
"displayOption": "FitToPage",
|
||||
"height": 720,
|
||||
"width": 1280
|
||||
}
|
||||
"@
|
||||
[void](Visual $p2dir "card" 16 16 300 140 @{ "Values" = @((Field-Measure "vwPLMensual" "Gasto Total")) } "Gastos Operativos")
|
||||
[void](Visual $p2dir "card" 332 16 300 140 @{ "Values" = @((Field-Measure "vwPLMensual" "Gasto % de Ventas")) } "Gasto / Ventas")
|
||||
[void](Visual $p2dir "barChart" 16 170 620 300 @{ "Category" = @((Field-Column "vwGastosDepto" "gerencia")); "Y" = @((Field-Measure "vwPLMensual" "Gasto Total")) } "Gasto por gerencia")
|
||||
[void](Visual $p2dir "tableEx" 652 170 612 300 @{ "Values" = @((Field-Column "vwGastosDepto" "subgrupo_desc"),(Field-Measure "vwPLMensual" "Gasto Total"),(Field-Measure "vwPLMensual" "Gasto % de Ventas")) } "Naturaleza del gasto")
|
||||
[void](Visual $p2dir "columnChart" 16 484 1248 220 @{ "Category" = @((Field-Column "DimCalendario" "Mes")); "Y" = @((Field-Measure "vwPLMensual" "Gasto Total")) } "Gasto mensual")
|
||||
|
||||
# ============ PAGINA 3: Estructura ============
|
||||
$p3 = G; $pageIds += $p3
|
||||
$p3dir = Join-Path $RP "definition\pages\$p3"
|
||||
New-Item -ItemType Directory -Force -Path $p3dir | Out-Null
|
||||
W (Join-Path $p3dir "page.json") @"
|
||||
{
|
||||
"`$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/page/1.0.0/schema.json",
|
||||
"name": "$p3",
|
||||
"displayName": "Estructura Financiera",
|
||||
"displayOption": "FitToPage",
|
||||
"height": 720,
|
||||
"width": 1280
|
||||
}
|
||||
"@
|
||||
[void](Visual $p3dir "card" 16 16 300 140 @{ "Values" = @((Field-Measure "vwPLMensual" "Activos")) } "Activos Totales")
|
||||
[void](Visual $p3dir "card" 332 16 300 140 @{ "Values" = @((Field-Measure "vwPLMensual" "Razon Corriente")) } "Razon Corriente")
|
||||
[void](Visual $p3dir "card" 648 16 300 140 @{ "Values" = @((Field-Measure "vwPLMensual" "Capital de Trabajo")) } "Capital de Trabajo")
|
||||
[void](Visual $p3dir "card" 964 16 300 140 @{ "Values" = @((Field-Measure "vwPLMensual" "Endeudamiento %")) } "Endeudamiento")
|
||||
[void](Visual $p3dir "clusteredColumnChart" 16 170 620 300 @{ "Category" = @((Field-Column "vwBalanceMensual" "grupo_desc")); "Y" = @((Field-Measure "vwPLMensual" "Saldo (fin periodo)")) } "Activos / Pasivos / Patrimonio")
|
||||
[void](Visual $p3dir "tableEx" 652 170 612 300 @{ "Values" = @((Field-Column "vwBalanceMensual" "subgrupo_desc"),(Field-Measure "vwPLMensual" "Saldo (fin periodo)")) } "Composicion")
|
||||
|
||||
# ---------------- pages.json ----------------
|
||||
$order = ($pageIds | ForEach-Object { "`"$_`"" }) -join ", "
|
||||
W (Join-Path $RP "definition\pages\pages.json") @"
|
||||
{
|
||||
"`$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/pagesMetadata/1.0.0/schema.json",
|
||||
"pageOrder": [ $order ],
|
||||
"activePageName": "$($pageIds[0])"
|
||||
}
|
||||
"@
|
||||
|
||||
Write-Output "Reporte escrito."
|
||||
Write-Output ("PROYECTO GENERADO EN: " + $Root)
|
||||
Get-ChildItem -Recurse $Root | Measure-Object | ForEach-Object { Write-Output ("Archivos: " + $_.Count) }
|
||||
@@ -1619,6 +1619,9 @@ FUNCTION desplegar()
|
||||
IF acc_per.estado_civil = "C" THEN
|
||||
LET estado = "CASADO"
|
||||
END IF
|
||||
IF acc_per.estado_civil = "U" THEN
|
||||
LET estado = "UNION LIBRE"
|
||||
END IF
|
||||
|
||||
IF acc_per.sexo = "M" THEN
|
||||
LET tipo_sexo = "MASCULINO"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<report:Report xmlns:rtl="http://www.4js.com/2004/RTL" xmlns:report="http://www.4js.com/2007/REPORT" xmlns="http://www.4js.com/2004/PXML" gstVersion="3140a" version="6.00">
|
||||
<report:Report xmlns:rtl="http://www.4js.com/2004/RTL" xmlns:report="http://www.4js.com/2007/REPORT" xmlns="http://www.4js.com/2004/PXML" gstVersion="60003" version="7.00">
|
||||
<report:Settings RWPageWidth="letterwidth" RWPageLength="letterlength" RWLeftMargin="0.5inch" RWTopMargin="0.5inch" RWRightMargin="0.5inch" RWBottomMargin="0.5inch">
|
||||
<report:FormatList>
|
||||
<report:Format-PDF/>
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<report:Report xmlns:rtl="http://www.4js.com/2004/RTL" xmlns:report="http://www.4js.com/2007/REPORT" xmlns="http://www.4js.com/2004/PXML" gstVersion="60003" version="7.00">
|
||||
<report:Settings RWPageWidth="tabloidlength" RWPageLength="tabloidwidth" RWLeftMargin="0.5cm" RWTopMargin="0.5cm" RWRightMargin="0.5cm" RWBottomMargin="0.5cm">
|
||||
<report:FormatList>
|
||||
<report:Format-PDF/>
|
||||
<report:Format-image/>
|
||||
<report:Format-SVG/>
|
||||
</report:FormatList>
|
||||
</report:Settings>
|
||||
<report:Data RWDataLocation="../indir/inprrp028.rdd" RWFglReportName="prt_exist"/>
|
||||
<report:Conflicts/>
|
||||
<rtl:stylesheet>
|
||||
<PXML>
|
||||
<rtl:match name="Report" nameConstraint="Report">
|
||||
<MINIPAGE name="MiniPage1" width="max" length="max" fontName="Arial" fontSize="8">
|
||||
<LAYOUTNODE name="HeaderNode" width="min" length="min" swapX="true" port="anyPageHeader">
|
||||
<MINIPAGE name="HeaderStripe" width="min" length="max" alignment="center" layoutDirection="topToBottom">
|
||||
<WORDBOX name="WB1" alignment="baseline" fontBold="true" fontSize="12" text="MARMOTECH, S. A."/>
|
||||
<WORDBOX name="WB2" alignment="baseline" text="Sistema de Inventario de Materia Prima"/>
|
||||
<WORDBOX name="WB3" alignment="baseline" fontBold="true" text="Existencia con Entrada y Salida"/>
|
||||
</MINIPAGE>
|
||||
<LAYOUTNODE name="ColHeader" width="max" length="min" bgColor="#cccccc" fontBold="true" layoutDirection="leftToRight">
|
||||
<WORDBOX name="WBc1" width="3cm" alignment="baseline" text="Codigo"/>
|
||||
<WORDWRAPBOX name="WBc2" width="6cm" alignment="baseline" text="Descripcion"/>
|
||||
<WORDBOX name="WBc3" width="1.5cm" alignment="baseline" text="Unidad"/>
|
||||
<WORDBOX name="WBc4" width="2.5cm" alignment="baseline" textAlignment="right" text="Existencia Ant."/>
|
||||
<WORDBOX name="WBc5" width="2.5cm" alignment="baseline" textAlignment="right" text="Entradas"/>
|
||||
<WORDBOX name="WBc6" width="2.5cm" alignment="baseline" textAlignment="right" text="Salidas"/>
|
||||
<WORDBOX name="WBc7" width="2.5cm" alignment="baseline" textAlignment="right" text="Existencia Act."/>
|
||||
</LAYOUTNODE>
|
||||
</LAYOUTNODE>
|
||||
<rtl:match name="OnEveryRow" nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
|
||||
<LAYOUTNODE name="RowNode" width="max" length="min" layoutDirection="leftToRight">
|
||||
<rtl:input-variable name="x.cod_n" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<rtl:input-variable name="x.cod_grupo" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<rtl:input-variable name="x.cod_tipo" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<rtl:input-variable name="x.cod_sec" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WBcodigo" width="3cm" alignment="baseline" text="{{x.cod_n.format("&")+"-"+x.cod_grupo.format("&")+"-"+x.cod_tipo.format("&&")+"-"+x.cod_sec.format("&&&")}}"/>
|
||||
<rtl:input-variable name="x.descrip_esp" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="WBdesc" width="6cm" alignment="baseline" text="{{x.descrip_esp.trim()}}"/>
|
||||
<rtl:input-variable name="x.unidad_med" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WBund" width="1.5cm" alignment="baseline" text="{{x.unidad_med.trim()}}"/>
|
||||
<rtl:input-variable name="x.existe_ant" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="WBant" width="2.5cm" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---.&&" value="{{x.existe_ant}}"/>
|
||||
<rtl:input-variable name="entradas" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="WBent" width="2.5cm" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---.&&" value="{{entradas}}"/>
|
||||
<rtl:input-variable name="salidas" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="WBsal" width="2.5cm" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---.&&" value="{{salidas}}"/>
|
||||
<rtl:input-variable name="x.existe_act" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="WBact" width="2.5cm" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---.&&" value="{{x.existe_act}}"/>
|
||||
</LAYOUTNODE>
|
||||
</rtl:match>
|
||||
</MINIPAGE>
|
||||
</rtl:match>
|
||||
</PXML>
|
||||
</rtl:stylesheet>
|
||||
</report:Report>
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<report:Report xmlns:rtl="http://www.4js.com/2004/RTL" xmlns:report="http://www.4js.com/2007/REPORT" xmlns="http://www.4js.com/2004/PXML" gstVersion="3140a" version="6.00">
|
||||
<report:Settings RWPageWidth="letterwidth" RWPageLength="letterlength" RWLeftMargin="0.5inch" RWTopMargin="0.5inch" RWRightMargin="0.5inch" RWBottomMargin="0.5inch">
|
||||
<report:FormatList>
|
||||
<report:Format-SVG/>
|
||||
<report:Format-PDF/>
|
||||
<report:Format-image/>
|
||||
</report:FormatList>
|
||||
</report:Settings>
|
||||
<report:Data RWDataLocation="../ipdir/imprequisiciones.rdd" RWFglReportName="requiere"/>
|
||||
<report:Conflicts>
|
||||
<report:Conflict nodeName="despiece" message="Node was in trigger "AfterGroup codigo", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="detalledespiece" message="Node was in trigger "AfterGroup codigo", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="totaldespiece" message="Node was in trigger "AfterGroup codigo", but trigger was removed during schema update"/>
|
||||
</report:Conflicts>
|
||||
<rtl:stylesheet>
|
||||
<PXML>
|
||||
<rtl:match name="Report" nameConstraint="Report" minOccurs="1" maxOccurs="1">
|
||||
<MINIPAGE name="Page Root" width="max" length="max">
|
||||
<LAYOUTNODE name="encabezado" width="min" length="max" alignment="center" fontBold="true" layoutDirection="leftToRight" floatingBehavior="enclosed">
|
||||
<rtl:input-variable name="p_companias.nombre" type="FGLString" expectedLocation="expectedAhead"/>
|
||||
<WORDBOX name="WordBox1" width="max-2cm" floatingBehavior="enclosed" textAlignment="center" text="{{p_companias.nombre}}"/>
|
||||
<WORDBOX name="WordBox" floatingBehavior="enclosed" text="Pagina:"/>
|
||||
<PAGENOBOX name="PageNoBox" floatingBehavior="enclosed"/>
|
||||
</LAYOUTNODE>
|
||||
<LAYOUTNODE name="encabezado2" width="min" length="max" layoutDirection="leftToRight" floatingBehavior="enclosed">
|
||||
<WORDBOX name="WordBox2" width="max-2cm" fontBold="true" floatingBehavior="enclosed" textAlignment="center" text="REQUISICION DOCUMENTOS"/>
|
||||
<rtl:input-variable name="hora" type="FGLString" expectedLocation="expectedAhead"/>
|
||||
<WORDBOX name="WordBox3" floatingBehavior="enclosed" text="{{hora}}"/>
|
||||
</LAYOUTNODE>
|
||||
<LAYOUTNODE name="encabezadomaster" width="min" length="min" fontSize="8" layoutDirection="leftToRight" floatingBehavior="enclosed">
|
||||
<LAYOUTNODE name="LayoutNode1" width="3inch" length="min" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
|
||||
<rtl:input-variable name="nombreUsuario" type="FGLString" expectedLocation="expectedWayAhead"/>
|
||||
<WORDBOX name="WordBox4" length="1cm" floatingBehavior="enclosed" text="{{"USUARIO: "+nombreUsuario.trim()}}"/>
|
||||
<rtl:input-variable name="p_iptb57.numero_doc" type="FGLNumeric" expectedLocation="expectedWayAhead"/>
|
||||
<WORDBOX name="WordBox5" fontSize="12" fontBold="true" floatingBehavior="enclosed" text="{{"DOCUMENTO: "+p_iptb57.numero_doc.format("&&&&&&&")}}"/>
|
||||
<rtl:input-variable name="p_iptb57.cod_mov" type="FGLNumeric" expectedLocation="expectedWayAhead"/>
|
||||
<rtl:input-variable name="nombreMov" type="FGLString" expectedLocation="expectedWayAhead"/>
|
||||
<WORDWRAPBOX name="WordWrapBox" width="width("M")*27" alignment="baseline" floatingBehavior="enclosed" text="{{"TIPO DOCUMENTO: "+"("+p_iptb57.cod_mov.format("<<<")+")"+nombreMov.trim()}}"/>
|
||||
<rtl:input-variable name="p_iptb57.fecha" type="FGLString" expectedLocation="expectedWayAhead"/>
|
||||
<WORDBOX name="WordBox6" floatingBehavior="enclosed" text="{{"FECHA: "+p_iptb57.fecha}}"/>
|
||||
<rtl:input-variable name="nombreBodega" type="FGLString" expectedLocation="expectedWayAhead"/>
|
||||
<WORDBOX name="WordBox8" floatingBehavior="enclosed" text="{{"BODEGA: "+nombreBodega}}"/>
|
||||
</LAYOUTNODE>
|
||||
<LAYOUTNODE name="LayoutNode2" width="3inch" length="min" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
|
||||
<WORDBOX name="WordBox12" length="1cm" alignment="baseline" floatingBehavior="enclosed"/>
|
||||
<rtl:input-variable name="p_iptb57.bodega_destino" type="FGLNumeric" expectedLocation="expectedWayAhead"/>
|
||||
<rtl:input-variable name="nombreBodegaDestino" type="FGLString" expectedLocation="expectedWayAhead"/>
|
||||
<WORDBOX name="WordBox9" floatingBehavior="enclosed" text="{{"BODEGA DESTINO: "+"("+p_iptb57.bodega_destino+")"+nombreBodegaDestino}}"/>
|
||||
<rtl:input-variable name="p_iptb57.num_oc" type="FGLNumeric" expectedLocation="expectedWayAhead"/>
|
||||
<WORDBOX name="WordBox10" floatingBehavior="enclosed" text="{{"NUMERO ORDEN:"+p_iptb57.num_oc.format("&&&&&&&&")}}"/>
|
||||
<rtl:input-variable name="p_iptb57.cliente" type="FGLString" expectedLocation="expectedWayAhead"/>
|
||||
<WORDWRAPBOX name="WordWrapBox1" width="width("M")*27" floatingBehavior="enclosed" text="{{"CLIENTE: "+p_iptb57.cliente}}"/>
|
||||
<rtl:input-variable name="p_iptb57.observacion" type="FGLString" expectedLocation="expectedWayAhead"/>
|
||||
<WORDWRAPBOX name="WordWrapBox2" width="width("M")*20" floatingBehavior="enclosed" text="{{"OBSERVACION: "+p_iptb57.observacion.trim()}}"/>
|
||||
</LAYOUTNODE>
|
||||
</LAYOUTNODE>
|
||||
<LAYOUTNODE name="encabezadodetalle" width="min" length="min" fontSize="8" fontBold="true" layoutDirection="leftToRight" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
|
||||
<WORDBOX name="WordBox13" width="3.5inch" floatingBehavior="enclosed" text="ITEM(S)" roundedCorners="false" borderWidth="1"/>
|
||||
<WORDBOX name="WordBox14" width="2.2inch" floatingBehavior="enclosed" textAlignment="right" text="UNIDAD"/>
|
||||
<WORDBOX name="WordBox15" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="CANTIDAD"/>
|
||||
</LAYOUTNODE>
|
||||
<rtl:match name="FirstPageHeader" nameConstraint="FirstPageHeader" minOccurs="0" maxOccurs="1"/>
|
||||
<rtl:match name="Group codigo" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
|
||||
<MINIPAGE name="table" width="min" length="min" fontSize="8" layoutDirection="leftToRight">
|
||||
<rtl:input-variable name="detalle.cod_n" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<rtl:input-variable name="detalle.cod_grupo" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<rtl:input-variable name="detalle.cod_tipo" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<rtl:input-variable name="detalle.cod_sec" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<rtl:input-variable name="detalle.descripcion" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<rtl:input-variable name="detalle.unidad_med" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="WordWrapBox3" width="width("M")*30" length="min" alignment="baseline" floatingBehavior="enclosed" text="{{detalle.cod_n.format("&&&&")+"-"+detalle.cod_grupo.format("&&&&")+"-"+detalle.cod_tipo.format("&&&&&&")+"-"+detalle.cod_sec.format("&&&&&&&&")+" "+detalle.descripcion.trim()+" "+detalle.unidad_med}}"/>
|
||||
<rtl:input-variable name="detalle.cantidad_1" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox17" width="2.4inch" floatingBehavior="enclosed" textAlignment="right" text="{{detalle.cantidad_1.format("###,###.#####")}}"/>
|
||||
<rtl:input-variable name="detalle.cantidad" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox18" width="1.5inch" floatingBehavior="enclosed" textAlignment="right" text="{{detalle.cantidad.format("###,###.#####")}}"/>
|
||||
</MINIPAGE>
|
||||
<rtl:input-variable name="tienedespiece" type="FGLNumeric" expectedLocation="expectedAhead"/>
|
||||
<LAYOUTNODE name="despiece" rtl:condition="tienedespiece==1" width="min" length="min" fontSize="8" layoutDirection="topToBottom" floatingBehavior="enclosed">
|
||||
<WORDBOX name="WordBox20" width="max" floatingBehavior="enclosed" textAlignment="center" text="DESPIECE" roundedCorners="true" borderWidth="1" borderStyle="solid"/>
|
||||
<LAYOUTNODE name="encabezadodespiece" width="min" length="max" layoutDirection="leftToRight" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
|
||||
<WORDBOX name="WordBox24" width="1.5inch" floatingBehavior="enclosed" text="Etiquetas"/>
|
||||
<WORDBOX name="WordBox26" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Lado 1"/>
|
||||
<WORDBOX name="WordBox27" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Lado 2"/>
|
||||
<WORDBOX name="WordBox28" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Lado 3"/>
|
||||
<WORDBOX name="WordBox29" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Unidades"/>
|
||||
<WORDBOX name="WordBox30" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Medida"/>
|
||||
</LAYOUTNODE>
|
||||
</LAYOUTNODE>
|
||||
<rtl:match name="OnEveryRow" nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
|
||||
<rtl:input-variable name="tienedespiece" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<LAYOUTNODE name="detalledespiece" rtl:condition="tienedespiece==1" width="min" length="min" fontSize="8" layoutDirection="leftToRight" floatingBehavior="enclosed">
|
||||
<rtl:input-variable name="etiqueta" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="etiqueta Value" class="grwStringValue" width="width("M")*15" alignment="baseline" floatingBehavior="enclosed" text="{{etiqueta}}"/>
|
||||
<rtl:input-variable name="xdespiece.lado_1" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="despiece.lado_1 Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&.&&" value="{{xdespiece.lado_1}}"/>
|
||||
<rtl:input-variable name="xdespiece.lado_2" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="despiece.lado_2 Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&.&&" value="{{xdespiece.lado_2}}"/>
|
||||
<rtl:input-variable name="xdespiece.lado_3" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="despiece.lado_3 Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&.&&" value="{{xdespiece.lado_3}}"/>
|
||||
<rtl:input-variable name="xdespiece.cantidad" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="despiece.cantidad Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&.&&" value="{{xdespiece.cantidad}}"/>
|
||||
<rtl:input-variable name="xdespiece.medida" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="despiece.medida Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&.&&" value="{{xdespiece.medida}}"/>
|
||||
</LAYOUTNODE>
|
||||
</rtl:match>
|
||||
<rtl:input-variable name="tienedespiece" type="FGLNumeric" expectedLocation="expectedBefore"/>
|
||||
<LAYOUTNODE name="totaldespiece" rtl:condition="tienedespiece==1" width="min" length="min" fontSize="8" layoutDirection="leftToRight" floatingBehavior="enclosed">
|
||||
<WORDBOX name="WordBox21" width="4.8inch" floatingBehavior="enclosed" text="TOTALES"/>
|
||||
<rtl:input-variable name="total_cantidad" type="FGLNumeric" expectedLocation="expectedBefore"/>
|
||||
<WORDBOX name="WordBox22" width="1inch" floatingBehavior="enclosed" text="{{total_cantidad.format("##,###.#####")}}"/>
|
||||
<rtl:input-variable name="total_medida" type="FGLNumeric" expectedLocation="expectedBefore"/>
|
||||
<WORDBOX name="WordBox23" width="1inch" floatingBehavior="enclosed" text="{{total_medida.format("##,###.######")}}"/>
|
||||
</LAYOUTNODE>
|
||||
</rtl:match>
|
||||
</MINIPAGE>
|
||||
</rtl:match>
|
||||
</PXML>
|
||||
</rtl:stylesheet>
|
||||
</report:Report>
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<report:Report xmlns:rtl="http://www.4js.com/2004/RTL" xmlns:report="http://www.4js.com/2007/REPORT" xmlns="http://www.4js.com/2004/PXML" gstVersion="3140a" version="6.00">
|
||||
<report:Settings RWPageWidth="letterwidth" RWPageLength="letterlength" RWLeftMargin="0.5inch" RWTopMargin="0.5inch" RWRightMargin="0.5inch" RWBottomMargin="0.5inch">
|
||||
<report:FormatList>
|
||||
<report:Format-SVG/>
|
||||
<report:Format-PDF/>
|
||||
<report:Format-image/>
|
||||
</report:FormatList>
|
||||
</report:Settings>
|
||||
<report:Data RWDataLocation="../ipdir/ipautorizareq.rdd" RWFglReportName="requiereAutoriza"/>
|
||||
<report:Conflicts>
|
||||
<report:Conflict nodeName="encabezado" message="Node was in trigger "FirstPageHeader [0; 1]", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="encabezado2" message="Node was in trigger "FirstPageHeader [0; 1]", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="encabezadomaster" message="Node was in trigger "FirstPageHeader [0; 1]", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="encabezadodetalle" message="Node was in trigger "FirstPageHeader [0; 1]", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="despiece" message="Node was in trigger "AfterGroup codigo", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="detalledespiece" message="Node was in trigger "AfterGroup codigo", but trigger was removed during schema update"/>
|
||||
<report:Conflict nodeName="totaldespiece" message="Node was in trigger "AfterGroup codigo", but trigger was removed during schema update"/>
|
||||
</report:Conflicts>
|
||||
<rtl:stylesheet>
|
||||
<PXML>
|
||||
<rtl:match name="Report" nameConstraint="Report" minOccurs="1" maxOccurs="1">
|
||||
<MINIPAGE name="Page Root" width="max" length="max">
|
||||
<rtl:match name="FirstPageHeader" nameConstraint="FirstPageHeader" minOccurs="0" maxOccurs="1">
|
||||
<LAYOUTNODE name="encabezado" width="min" length="max" alignment="center" fontBold="true" layoutDirection="leftToRight" floatingBehavior="enclosed">
|
||||
<rtl:input-variable name="p_companias.nombre" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox1" width="max-2cm" floatingBehavior="enclosed" textAlignment="center" text="{{p_companias.nombre}}"/>
|
||||
<WORDBOX name="WordBox" floatingBehavior="enclosed" text="Pagina:"/>
|
||||
<PAGENOBOX name="PageNoBox" floatingBehavior="enclosed"/>
|
||||
</LAYOUTNODE>
|
||||
<LAYOUTNODE name="encabezado2" width="min" length="max" layoutDirection="leftToRight" floatingBehavior="enclosed">
|
||||
<WORDBOX name="WordBox2" width="max-2cm" fontBold="true" floatingBehavior="enclosed" textAlignment="center" text="REQUISICION DOCUMENTOS"/>
|
||||
<rtl:input-variable name="hora" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox3" floatingBehavior="enclosed" text="{{hora}}"/>
|
||||
</LAYOUTNODE>
|
||||
<LAYOUTNODE name="encabezadomaster" width="min" length="min" fontSize="8" layoutDirection="leftToRight" floatingBehavior="enclosed">
|
||||
<LAYOUTNODE name="LayoutNode1" width="3inch" length="min" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
|
||||
<rtl:input-variable name="nombreusuario" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox4" length="1cm" floatingBehavior="enclosed" text="{{"USUARIO: "+nombreusuario.trim()}}"/>
|
||||
<rtl:input-variable name="x.numero_doc" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox5" fontSize="12" fontBold="true" floatingBehavior="enclosed" text="{{"DOCUMENTO: "+x.numero_doc.format("&&&&&&&")}}"/>
|
||||
<rtl:input-variable name="x.cod_mov" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<rtl:input-variable name="nombreMov" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="WordWrapBox" width="width("M")*27" alignment="baseline" floatingBehavior="enclosed" text="{{"TIPO DOCUMENTO: "+"("+x.cod_mov.format("<<<")+")"+nombreMov.trim()}}"/>
|
||||
<rtl:input-variable name="x.fecha" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox6" floatingBehavior="enclosed" text="{{"FECHA: "+x.fecha}}"/>
|
||||
<rtl:input-variable name="nombreBodega" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox8" floatingBehavior="enclosed" text="{{"BODEGA: "+nombreBodega}}"/>
|
||||
</LAYOUTNODE>
|
||||
<LAYOUTNODE name="LayoutNode2" width="3inch" length="min" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
|
||||
<WORDBOX name="WordBox12" length="1cm" alignment="baseline" floatingBehavior="enclosed"/>
|
||||
<rtl:input-variable name="nombreBodegaDestino" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox9" floatingBehavior="enclosed" text="{{"BODEGA DESTINO: "+nombreBodegaDestino}}"/>
|
||||
<rtl:input-variable name="x.num_oc" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox10" floatingBehavior="enclosed" text="{{"NUMERO ORDEN:"+x.num_oc.format("&&&&&&&&")}}"/>
|
||||
<rtl:input-variable name="vendedor" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="vendedor Value" class="grwStringValue" width="width("M")*25" alignment="baseline" floatingBehavior="enclosed" text="{{"VENDEDOR: "+vendedor.trim()}}"/>
|
||||
<rtl:input-variable name="x.cliente" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="WordWrapBox1" width="width("M")*27" floatingBehavior="enclosed" text="{{"CLIENTE: "+x.cliente}}"/>
|
||||
<rtl:input-variable name="x.observacion" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="WordWrapBox2" width="width("M")*20" floatingBehavior="enclosed" text="{{"OBSERVACION: "+x.observacion.trim()}}"/>
|
||||
</LAYOUTNODE>
|
||||
</LAYOUTNODE>
|
||||
<LAYOUTNODE name="encabezadodetalle" width="min" length="min" fontSize="8" fontBold="true" layoutDirection="leftToRight" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
|
||||
<WORDBOX name="WordBox13" width="3.5inch" floatingBehavior="enclosed" text="ITEM(S)" roundedCorners="false" borderWidth="1"/>
|
||||
<WORDBOX name="WordBox14" width="2.2inch" floatingBehavior="enclosed" textAlignment="right" text="UNIDAD"/>
|
||||
<WORDBOX name="WordBox15" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="CANTIDAD"/>
|
||||
</LAYOUTNODE>
|
||||
</rtl:match>
|
||||
<rtl:match name="Group codigo" nameConstraint="Group" minOccurs="0" maxOccurs="unbounded">
|
||||
<MINIPAGE name="table" width="min" length="min" fontSize="8" layoutDirection="leftToRight">
|
||||
<rtl:input-variable name="detalle.cod_n" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<rtl:input-variable name="detalle.cod_grupo" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<rtl:input-variable name="detalle.cod_tipo" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<rtl:input-variable name="detalle.cod_sec" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<rtl:input-variable name="detalle.descripcion" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<rtl:input-variable name="detalle.unidad_med" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="WordWrapBox3" width="width("M")*30" length="min" alignment="baseline" floatingBehavior="enclosed" text="{{detalle.cod_n.format("&&&&")+"-"+detalle.cod_grupo.format("&&&&")+"-"+detalle.cod_tipo.format("&&&&&&")+"-"+detalle.cod_sec.format("&&&&&&&&")+" "+detalle.descripcion.trim()+" "+detalle.unidad_med}}"/>
|
||||
<rtl:input-variable name="detalle.cantidad_1" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox17" width="2.4inch" floatingBehavior="enclosed" textAlignment="right" text="{{detalle.cantidad_1.format("###,###.#####")}}"/>
|
||||
<rtl:input-variable name="detalle.cantidad" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<WORDBOX name="WordBox18" width="1.5inch" floatingBehavior="enclosed" textAlignment="right" text="{{detalle.cantidad.format("###,###.#####")}}"/>
|
||||
</MINIPAGE>
|
||||
<rtl:input-variable name="tienedespiece" type="FGLNumeric" expectedLocation="expectedAhead"/>
|
||||
<LAYOUTNODE name="despiece" rtl:condition="tienedespiece==1" width="min" length="min" fontSize="8" layoutDirection="topToBottom" floatingBehavior="enclosed">
|
||||
<WORDBOX name="WordBox20" width="max" floatingBehavior="enclosed" textAlignment="center" text="DESPIECE" roundedCorners="true" borderWidth="1" borderStyle="solid"/>
|
||||
<LAYOUTNODE name="encabezadodespiece" width="min" length="max" layoutDirection="leftToRight" floatingBehavior="enclosed" roundedCorners="true" borderWidth="1" borderStyle="solid">
|
||||
<WORDBOX name="WordBox24" width="1.5inch" floatingBehavior="enclosed" text="Etiquetas"/>
|
||||
<WORDBOX name="WordBox26" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Lado 1"/>
|
||||
<WORDBOX name="WordBox27" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Lado 2"/>
|
||||
<WORDBOX name="WordBox28" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Lado 3"/>
|
||||
<WORDBOX name="WordBox29" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Unidades"/>
|
||||
<WORDBOX name="WordBox30" width="1inch" floatingBehavior="enclosed" textAlignment="right" text="Medida"/>
|
||||
</LAYOUTNODE>
|
||||
</LAYOUTNODE>
|
||||
<rtl:match name="OnEveryRow" nameConstraint="OnEveryRow" minOccurs="0" maxOccurs="unbounded">
|
||||
<rtl:input-variable name="tienedespiece" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<LAYOUTNODE name="detalledespiece" rtl:condition="tienedespiece==1" width="min" length="min" fontSize="8" layoutDirection="leftToRight" floatingBehavior="enclosed">
|
||||
<rtl:input-variable name="etiqueta" type="FGLString" expectedLocation="expectedHere"/>
|
||||
<WORDWRAPBOX name="etiqueta Value" class="grwStringValue" width="width("M")*15" alignment="baseline" floatingBehavior="enclosed" text="{{etiqueta}}"/>
|
||||
<rtl:input-variable name="xdespiece.lado_1" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="despiece.lado_1 Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&.&&" value="{{xdespiece.lado_1}}"/>
|
||||
<rtl:input-variable name="xdespiece.lado_2" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="despiece.lado_2 Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&.&&" value="{{xdespiece.lado_2}}"/>
|
||||
<rtl:input-variable name="xdespiece.lado_3" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="despiece.lado_3 Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&.&&" value="{{xdespiece.lado_3}}"/>
|
||||
<rtl:input-variable name="xdespiece.cantidad" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="despiece.cantidad Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&.&&" value="{{xdespiece.cantidad}}"/>
|
||||
<rtl:input-variable name="xdespiece.medida" type="FGLNumeric" expectedLocation="expectedHere"/>
|
||||
<DECIMALFORMATBOX name="despiece.medida Value" class="grwNumericValue" width="1inch" anchorX="1" floatingBehavior="enclosed" textAlignment="right" format="---,---,---,--&.&&" value="{{xdespiece.medida}}"/>
|
||||
</LAYOUTNODE>
|
||||
</rtl:match>
|
||||
<rtl:input-variable name="tienedespiece" type="FGLNumeric" expectedLocation="expectedBefore"/>
|
||||
<LAYOUTNODE name="totaldespiece" rtl:condition="tienedespiece==1" width="min" length="min" fontSize="8" layoutDirection="leftToRight" floatingBehavior="enclosed">
|
||||
<WORDBOX name="WordBox21" width="4.8inch" floatingBehavior="enclosed" text="TOTALES"/>
|
||||
<rtl:input-variable name="total_cantidad" type="FGLNumeric" expectedLocation="expectedBefore"/>
|
||||
<WORDBOX name="WordBox22" width="1inch" floatingBehavior="enclosed" text="{{total_cantidad.format("##,###.#####")}}"/>
|
||||
<rtl:input-variable name="total_medida" type="FGLNumeric" expectedLocation="expectedBefore"/>
|
||||
<WORDBOX name="WordBox23" width="1inch" floatingBehavior="enclosed" text="{{total_medida.format("##,###.######")}}"/>
|
||||
</LAYOUTNODE>
|
||||
</rtl:match>
|
||||
</MINIPAGE>
|
||||
</rtl:match>
|
||||
</PXML>
|
||||
</rtl:stylesheet>
|
||||
</report:Report>
|
||||
@@ -1,4 +1,4 @@
|
||||
database marmotech
|
||||
database smarmotech
|
||||
screen size 24 by 80
|
||||
{
|
||||
|
||||
@@ -9,10 +9,10 @@ screen size 24 by 80
|
||||
\g-----------------------------------------------------------------------------\g
|
||||
Requi. Codigo Cantidad Precio Valor
|
||||
\g-----------------------------------------------------------------------------\g
|
||||
[r1 ][c1 ][c2 ] [p1 ][v1 ]
|
||||
[r1 ][c1 ][c2 ] [p1 ][v1 ]
|
||||
[r1 ][c1 ][c2 ] [p1 ][v1 ]
|
||||
[r1 ][c1 ][c2 ] [p1 ][v1 ]
|
||||
[r1 ][c1 ][c2 ] [p1 ][v1 ]
|
||||
[r1 ][c1 ][c2 ] [p1 ][v1 ]
|
||||
[r1 ][c1 ][c2 ] [p1 ][v1 ]
|
||||
[r1 ][c1 ][c2 ] [p1 ][v1 ]
|
||||
Descripcion [d1 ]
|
||||
}
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
database marmotech
|
||||
database smarmotech
|
||||
screen size 24 by 80
|
||||
{
|
||||
Fecha [f1 ]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
DATABASE marmotech
|
||||
DATABASE smarmotech
|
||||
screen
|
||||
{
|
||||
Ship To [st ]
|
||||
|
||||
@@ -243,10 +243,10 @@ LET idx = 1
|
||||
FOREACH buscate INTO detalle1.*
|
||||
|
||||
LET cs_ordena[idx].num_req = detalle1.num_req
|
||||
LET cs_ordena[idx].codigo = detalle1.cod_n using "&","-",
|
||||
detalle1.cod_grupo using "&","-",
|
||||
detalle1.cod_tipo using "&&","-",
|
||||
detalle1.cod_sec using "&&&"
|
||||
LET cs_ordena[idx].codigo = detalle1.cod_n using "##","-",
|
||||
detalle1.cod_grupo using "####","-",
|
||||
detalle1.cod_tipo using "####","-",
|
||||
detalle1.cod_sec using "#####"
|
||||
LET cs_ordena[idx].cantidad = detalle1.cantidad using "##########.##"
|
||||
LET cs_ordena[idx].precio = detalle1.precio using "##########.##"
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ GLOBALS
|
||||
|
||||
DEFINE cs_ordena ARRAY [20] OF RECORD
|
||||
num_req INTEGER,
|
||||
codigo CHAR(10),
|
||||
codigo CHAR(20),
|
||||
cantidad CHAR(14),
|
||||
precio CHAR(13),
|
||||
valor CHAR(14)
|
||||
|
||||
@@ -1037,6 +1037,9 @@ FUNCTION copcmf009()
|
||||
CALL lugarentregas()
|
||||
|
||||
# Aqui se prepara para la captura del criterio de seleccion
|
||||
-- cotb00014.bodega excluido: es el mismo combo oculto (tabIndex=-1) en
|
||||
-- cofmmt009 que ya se excluye en copcad009(); el CONSTRUCT fallaba con
|
||||
-- "Field (bodega) not found in form".
|
||||
CONSTRUCT criterio
|
||||
ON cotb00014.num_oc,
|
||||
cotb00014.tipo,
|
||||
@@ -1049,8 +1052,7 @@ FUNCTION copcmf009()
|
||||
cotb00014.fech_enviada,
|
||||
cotb00014.pago,
|
||||
cotb00014.fech_pago,
|
||||
cotb00014.cierre,
|
||||
cotb00014.bodega
|
||||
cotb00014.cierre
|
||||
FROM num_oc,
|
||||
tipo,
|
||||
fech_oc,
|
||||
@@ -1062,8 +1064,7 @@ FUNCTION copcmf009()
|
||||
fech_enviada,
|
||||
pago,
|
||||
fech_pago,
|
||||
cierre,
|
||||
bodega
|
||||
cierre
|
||||
|
||||
IF int_flag THEN
|
||||
LET numero_msg = 2
|
||||
@@ -2360,7 +2361,8 @@ FUNCTION escoge()
|
||||
ordenes.pago,
|
||||
ordenes.fech_pago
|
||||
|
||||
DISPLAY BY NAME ordenes.bodega
|
||||
-- ordenes.bodega excluido (ver nota en copcad009()): no esta en el
|
||||
-- formulario, DISPLAY BY NAME fallaba con "Field (bodega) not found in form".
|
||||
|
||||
IF ordenes.cod_sp = 22 OR ordenes.cod_sp = 24 THEN
|
||||
LET flete1.total_1 =
|
||||
|
||||
@@ -178,7 +178,7 @@ FUNCTION copcmf010()
|
||||
|
||||
COMMAND "Escoger"
|
||||
"<Esc> Actualiza Registro <Delete> Cancela Operacion"
|
||||
IF paises.status_t != "E" THEN
|
||||
IF paises.status_t = "E" THEN
|
||||
LET numero_msg = 36
|
||||
CALL msg(numero_msg)
|
||||
RETURN
|
||||
|
||||
@@ -191,7 +191,16 @@ FUNCTION insertData()
|
||||
|
||||
BEGIN WORK
|
||||
|
||||
INSERT INTO cotb00024
|
||||
INSERT INTO cotb00024 (
|
||||
term_sp,
|
||||
descrip_term,
|
||||
descrip_ting,
|
||||
status_t,
|
||||
us_crea,
|
||||
fech_crea,
|
||||
us_mod,
|
||||
fech_mod,
|
||||
dias)
|
||||
VALUES (pagos.term_sp,
|
||||
pagos.descrip_term,
|
||||
pagos.descrip_ting,
|
||||
@@ -199,7 +208,8 @@ FUNCTION insertData()
|
||||
usuarios, -- us_crea
|
||||
pagos.fech_crea, -- fech_crea
|
||||
NULL, -- us_mod
|
||||
NULL) -- fech_mod
|
||||
NULL, -- fech_mod
|
||||
NULL) -- dias (no se captura en esta pantalla)
|
||||
|
||||
|
||||
CALL integridad()
|
||||
|
||||
@@ -35,7 +35,10 @@ DEFINE xusername,xsmtphost,xsmtpport,xpassword STRING,
|
||||
|
||||
toEmail, orden_trabajo, answer_workorder, descrip_depto STRING, depto INT
|
||||
|
||||
DEFINE data RECORD
|
||||
-- Debe coincidir exactamente (mismos campos, mismo orden) con el RECORD
|
||||
-- "data" del parametro de ApiMaintainC() en otrodir/api_test.4gl: el
|
||||
-- enlazador exige la misma aridad en todos los llamadores.
|
||||
DEFINE data RECORD
|
||||
area_sp VARCHAR(10),
|
||||
ciu_sp VARCHAR(30),
|
||||
cod_pais VARCHAR(3),
|
||||
@@ -43,6 +46,7 @@ DEFINE data RECORD
|
||||
cod_sp_sec SMALLINT,
|
||||
cont_sp VARCHAR(30),
|
||||
contactID INTEGER,
|
||||
cuenta_no VARCHAR(10),
|
||||
dir_sp VARCHAR(60),
|
||||
email VARCHAR(60),
|
||||
fax_sp VARCHAR(25),
|
||||
@@ -50,14 +54,18 @@ DEFINE data RECORD
|
||||
fech_mod DATETIME YEAR TO FRACTION,
|
||||
id_maintainx INTEGER,
|
||||
nom_sp VARCHAR(41),
|
||||
rnc VARCHAR(11),
|
||||
status_t VARCHAR(1),
|
||||
tel_sp VARCHAR(25),
|
||||
term_sp SMALLINT,
|
||||
tipo_doc VARCHAR(10),
|
||||
us_crea VARCHAR(50),
|
||||
us_mod VARCHAR(50)
|
||||
END RECORD
|
||||
|
||||
DEFINE container RECORD
|
||||
DEFINE p_reportfile STRING
|
||||
|
||||
DEFINE container RECORD
|
||||
tipo_inv STRING,
|
||||
cod_n INT,
|
||||
cod_grupo INT,
|
||||
@@ -110,7 +118,8 @@ FUNCTION coprmt025()
|
||||
END FUNCTION
|
||||
|
||||
FUNCTION copcad025()
|
||||
DEFINE tiene_Dato CHAR(2), answer STRING
|
||||
DEFINE tiene_Dato CHAR(2), answer STRING
|
||||
DEFINE answer2 INTEGER
|
||||
INITIALIZE depto TO NULL
|
||||
# Captura los datos que va a contener el registro
|
||||
|
||||
@@ -312,7 +321,7 @@ FUNCTION copcad025()
|
||||
|
||||
INITIALIZE data.* TO NULL
|
||||
|
||||
CALL ApiMaintainC('CHECK', orden_trabajo, data.*, usuarios) RETURNING answer
|
||||
CALL ApiMaintainC('CHECK', orden_trabajo, data.*, usuarios) RETURNING answer, answer2
|
||||
|
||||
IF answer = 0 OR answer IS NULL THEN
|
||||
|
||||
@@ -732,8 +741,8 @@ ON ACTION guardar ATTRIBUTE(TEXT="Salvar", IMAGE="save")
|
||||
|
||||
ELSE
|
||||
|
||||
CALL ApiMaintainC('PATCH_WORKORDER',answer_workorder, Data.*, usuarios)
|
||||
RETURNING answer
|
||||
CALL ApiMaintainC('PATCH_WORKORDER',answer_workorder, Data.*, usuarios)
|
||||
RETURNING answer, answer2
|
||||
|
||||
IF answer != 1 THEN
|
||||
DISPLAY "AQUI PATCH_WORKORDER"
|
||||
@@ -777,8 +786,12 @@ ON ACTION guardar ATTRIBUTE(TEXT="Salvar", IMAGE="save")
|
||||
COMMIT WORK
|
||||
|
||||
CALL seleccionarsalida() RETURNING salida
|
||||
CALL configureoutput(salida) RETURNING HANDLER
|
||||
|
||||
-- La API de configuracion de reportes (fgl_report_*) no esta
|
||||
-- disponible en este FGL; se escribe el XML directo a un archivo
|
||||
-- en FGLSPOOL en lugar de la vista previa/exportacion nativa.
|
||||
LET p_reportfile = FGL_GETENV("FGLSPOOL"), "/coprmt025_req1.xml"
|
||||
LET handler = om.XmlWriter.createFileWriter(p_reportfile)
|
||||
|
||||
START REPORT print_req TO XML HANDLER HANDLER
|
||||
|
||||
PREPARE query FROM
|
||||
@@ -894,7 +907,9 @@ ON ACTION guardar ATTRIBUTE(TEXT="Salvar", IMAGE="save")
|
||||
COMMIT WORK
|
||||
|
||||
CALL seleccionarsalida() RETURNING salida
|
||||
CALL configureoutput(salida) RETURNING HANDLER
|
||||
-- Ver nota sobre fgl_report_* mas arriba en este archivo.
|
||||
LET p_reportfile = FGL_GETENV("FGLSPOOL"), "/coprmt025_req2.xml"
|
||||
LET handler = om.XmlWriter.createFileWriter(p_reportfile)
|
||||
START REPORT print_req TO XML HANDLER HANDLER
|
||||
|
||||
PREPARE query FROM
|
||||
@@ -1177,7 +1192,9 @@ FUNCTION copcmf025()
|
||||
IF salida IS NULL THEN
|
||||
LET salida = 'PDF'
|
||||
END IF
|
||||
CALL configureoutput(salida) RETURNING HANDLER
|
||||
-- Ver nota sobre fgl_report_* mas arriba en este archivo.
|
||||
LET p_reportfile = FGL_GETENV("FGLSPOOL"), "/coprmt025_req3.xml"
|
||||
LET handler = om.XmlWriter.createFileWriter(p_reportfile)
|
||||
START REPORT print_req TO XML HANDLER HANDLER
|
||||
|
||||
PREPARE query FROM
|
||||
|
||||
@@ -144,19 +144,11 @@ FUNCTION coprrp001()
|
||||
archivo,
|
||||
copia
|
||||
|
||||
LET r_filename = 'coprrp001.4rp'
|
||||
CALL seleccionarSalida() RETURNING r_output
|
||||
|
||||
LET preview = 1
|
||||
|
||||
IF fgl_report_loadCurrentSettings(r_filename) THEN -- load the .4rp file
|
||||
|
||||
CALL fgl_report_selectDevice(r_output) -- changing default
|
||||
CALL fgl_report_selectPreview(preview) -- changing default
|
||||
|
||||
|
||||
LET handler = fgl_report_commitCurrentSettings() -- commit changes
|
||||
END IF
|
||||
-- La API de configuracion de reportes (fgl_report_*) no esta
|
||||
-- disponible en este FGL; se escribe el XML directo a un archivo
|
||||
-- en FGLSPOOL en lugar de usar la plantilla .4rp con vista previa.
|
||||
LET r_filename = FGL_GETENV("FGLSPOOL"), "/coprrp001_catalogo.xml"
|
||||
LET handler = om.XmlWriter.createFileWriter(r_filename)
|
||||
|
||||
START REPORT catalogo2 TO XML HANDLER handler
|
||||
#### Enviando la informacion al registro del reporte
|
||||
|
||||
@@ -35,6 +35,8 @@ FUNCTION coprrp004()
|
||||
monto DECIMAL(12,2)
|
||||
END RECORD
|
||||
|
||||
DEFINE r_filename STRING
|
||||
|
||||
#WHENEVER ERROR CONTINUE
|
||||
|
||||
OPTIONS
|
||||
@@ -115,9 +117,14 @@ END IF
|
||||
# doce,normal,archivo,copia
|
||||
|
||||
|
||||
CALL seleccionarsalida() RETURNING salida
|
||||
CALL configureoutput(salida) RETURNING HANDLER
|
||||
|
||||
-- La API de configuracion de reportes (fgl_report_*) no esta
|
||||
-- disponible en este FGL; seleccionarsalida()/configureoutput()
|
||||
-- tampoco estan definidas en este programa. Se escribe el XML
|
||||
-- directo a un archivo en FGLSPOOL en lugar de usar la plantilla
|
||||
-- .4rp con vista previa.
|
||||
LET r_filename = FGL_GETENV("FGLSPOOL"), "/coprrp004_cronologico.xml"
|
||||
LET handler = om.XmlWriter.createFileWriter(r_filename)
|
||||
|
||||
START REPORT cronologico TO XML HANDLER handler
|
||||
|
||||
|
||||
|
||||
@@ -38,9 +38,11 @@ FUNCTION coprrp007()
|
||||
uso VARCHAR(100),
|
||||
descrip_esp VARCHAR(100),
|
||||
unidad_med LIKE intb00001.unidad_med
|
||||
|
||||
|
||||
END RECORD
|
||||
|
||||
DEFINE r_filename STRING
|
||||
|
||||
# WHENEVER ERROR CONTINUE
|
||||
|
||||
OPTIONS
|
||||
@@ -161,9 +163,14 @@ LET idx = 1
|
||||
RETURN
|
||||
END IF
|
||||
IF idx = 1 THEN
|
||||
|
||||
CALL seleccionarsalida() RETURNING salida
|
||||
CALL configureoutput(salida) RETURNING HANDLER
|
||||
|
||||
-- La API de configuracion de reportes (fgl_report_*) no esta
|
||||
-- disponible en este FGL; seleccionarsalida()/configureoutput()
|
||||
-- tampoco estan definidas en este programa. Se escribe el XML
|
||||
-- directo a un archivo en FGLSPOOL en lugar de usar la plantilla
|
||||
-- .4rp con vista previa.
|
||||
LET r_filename = FGL_GETENV("FGLSPOOL"), "/coprrp007_organiza.xml"
|
||||
LET handler = om.XmlWriter.createFileWriter(r_filename)
|
||||
START REPORT organiza TO XML HANDLER handler
|
||||
|
||||
END IF
|
||||
|
||||
@@ -10,12 +10,20 @@ DIRECTOR PROYECTO : JOSE ALFREDO PAULINO ALEJO
|
||||
GLOBALS "coprgb000.4gl"
|
||||
MAIN
|
||||
DEFER INTERRUPT
|
||||
CALL ARG_VAL(1) RETURNING usuarios
|
||||
CALL ARG_VAL(2) RETURNING clave
|
||||
CALL ARG_VAL(3) RETURNING impresor
|
||||
|
||||
CONNECT TO "smarmotech" USER usuarios USING clave
|
||||
SELECT a.* INTO p_companias.* FROM companias a
|
||||
|
||||
CALL coprrp019()
|
||||
END MAIN
|
||||
|
||||
FUNCTION coprrp019()
|
||||
|
||||
DEFINE select_fech,select_movi,select_ent CHAR(1000)
|
||||
DEFINE r_filename STRING
|
||||
DEFINE idx_o,idx_e,idx_p,idx_m SMALLINT
|
||||
DEFINE esta,encontre,salir2,salir1,salir CHAR(1)
|
||||
DEFINE recibida,pendiente DECIMAL(12,2)
|
||||
@@ -97,9 +105,14 @@ FUNCTION coprrp019()
|
||||
DECLARE ent_curs SCROLL CURSOR FOR busca_entrega
|
||||
OPEN ent_curs
|
||||
|
||||
CALL seleccionarsalida() RETURNING r_output
|
||||
CALL configureoutput(r_output) RETURNING HANDLER
|
||||
|
||||
-- La API de configuracion de reportes (fgl_report_*) no esta
|
||||
-- disponible en este FGL; seleccionarsalida()/configureoutput()
|
||||
-- tampoco estan definidas en este programa. Se escribe el XML
|
||||
-- directo a un archivo en FGLSPOOL en lugar de usar la plantilla
|
||||
-- .4rp con vista previa.
|
||||
LET r_filename = FGL_GETENV("FGLSPOOL"), "/coprrp019_documento.xml"
|
||||
LET handler = om.XmlWriter.createFileWriter(r_filename)
|
||||
|
||||
START REPORT documento TO XML HANDLER handler
|
||||
|
||||
DISPLAY " " AT 19,14
|
||||
|
||||
@@ -2,8 +2,11 @@ FUNCTION busca_departamento()
|
||||
DEFINE pdepartamento ui.combobox,
|
||||
kdepartamento SMALLINT,kdescripcion CHAR(30)
|
||||
|
||||
LET pdepartamento = ui.combobox.forname("formonly.depto_a")
|
||||
CALL pdepartamento.clear()
|
||||
LET pdepartamento = ui.combobox.forname("formonly.departamento")
|
||||
IF pdepartamento IS NULL THEN
|
||||
RETURN
|
||||
END IF
|
||||
CALL pdepartamento.clear()
|
||||
DECLARE pagar CURSOR FOR
|
||||
SELECT departamento, nom_dpto FROM adtb00001
|
||||
WHERE status_t is null
|
||||
|
||||
@@ -199,6 +199,9 @@ adtb00003^sexo^0^10^67^
|
||||
adtb00003^email_corporativo^201^100^68^
|
||||
adtb00003^enviar_encuesta^0^10^69^
|
||||
adtb00003^enviar_volante^0^10^70^
|
||||
adtb00003^telefonoCorporativo^0^15^71^
|
||||
adtb00003^numeroOficina^0^15^72^
|
||||
adtb00003^extension^0^5^73^
|
||||
adtb00004^cod_puesto^1^2^1^
|
||||
adtb00004^nom_puesto^0^180^2^
|
||||
adtb00004^otra_descripcion^0^180^3^
|
||||
|
||||
+3192
-994
File diff suppressed because it is too large
Load Diff
+8320
-835
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,25 @@
|
||||
FUNCTION msgrp000(tipo_papel)
|
||||
DEFINE tipo_papel SMALLINT,
|
||||
longitud CHAR(11),
|
||||
linea_papel CHAR(50)
|
||||
|
||||
CASE
|
||||
WHEN tipo_papel = 1
|
||||
LET longitud = " 9 1/2 x 11"
|
||||
WHEN tipo_papel = 2
|
||||
LET longitud = "14 7/8 x 11"
|
||||
END CASE
|
||||
|
||||
LET linea_papel = "Coloque papel ",longitud," en la impresora."
|
||||
DISPLAY linea_papel
|
||||
AT 15,14
|
||||
DISPLAY "Asegurese de que la impresora este encendida."
|
||||
AT 16,14
|
||||
DISPLAY "<Esc> Ejecuta impresion <Delete> Cancela impresion"
|
||||
AT 18,14
|
||||
|
||||
END FUNCTION
|
||||
|
||||
FUNCTION defecto(usuarios,clave,impresor)
|
||||
|
||||
DEFINE impresor,idx SMALLINT,
|
||||
@@ -142,3 +164,50 @@ RETURN imprime,negrillas_on,negrillas_off,doble_on,doble_off,
|
||||
comp_on,comp_off,doce,normal,archivo,copia
|
||||
|
||||
END FUNCTION
|
||||
|
||||
FUNCTION configureOutput(tipo_file)
|
||||
DEFINE tipo_file CHAR(3)
|
||||
IF NOT fgl_report_loadCurrentSettings(NULL) THEN
|
||||
RETURN NULL
|
||||
END IF
|
||||
CALL fgl_report_setPageMargins("0.5cm", "0.5cm", "0.5cm", "0.5cm")
|
||||
CALL fgl_report_configureCompatibilityOutput(160,"Monospaced",NULL,NULL,NULL,NULL)
|
||||
CALL fgl_report_selectDevice(tipo_file)
|
||||
CALL fgl_report_configurexlsxdevice(NULL, NULL, NULL, FALSE, FALSE, NULL, 1)
|
||||
CALL fgl_report_selectPreview(TRUE)
|
||||
RETURN fgl_report_commitCurrentSettings()
|
||||
|
||||
RETURN NULL
|
||||
END FUNCTION
|
||||
|
||||
FUNCTION selectOutput()
|
||||
DEFINE
|
||||
r_output STRING,
|
||||
r_action STRING,
|
||||
preview INTEGER
|
||||
|
||||
OPTIONS INPUT WRAP
|
||||
OPEN WINDOW f_configuration WITH FORM "Configuration"
|
||||
LET INT_FLAG=FALSE
|
||||
LET preview = FALSE
|
||||
INPUT BY NAME r_output
|
||||
ON ACTION CANCEL
|
||||
EXIT PROGRAM
|
||||
ON ACTION CLOSE
|
||||
EXIT PROGRAM
|
||||
END INPUT
|
||||
CLOSE WINDOW f_configuration
|
||||
CALL ui.interface.refresh()
|
||||
|
||||
IF r_action IS NOT NULL THEN
|
||||
IF r_action == "preview" THEN
|
||||
LET preview = TRUE
|
||||
END IF
|
||||
END IF
|
||||
|
||||
RETURN r_output
|
||||
END FUNCTION
|
||||
|
||||
FUNCTION seleccionarSalida()
|
||||
RETURN selectOutput()
|
||||
END FUNCTION
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
<RecordField colName="unidad_med" fieldIdRef="5" fieldType="TABLE_COLUMN" name="intb00001.unidad_med" sqlTabName="intb00001" uid="{720c8ace-b521-4ab2-93a4-5aaebd3c052d}"/>
|
||||
<RecordField colName="fech_in" fieldIdRef="7" name="fech_in" sqlTabName="formonly" sqlType="DATE" uid="{f7cdd239-7791-4788-9c92-1e29d181a356}"/>
|
||||
<RecordField colName="fech_fi" fieldIdRef="8" name="fech_fi" sqlTabName="formonly" sqlType="DATE" uid="{ef37027a-09ec-4b91-8016-58321fe9523c}"/>
|
||||
<RecordField fieldIdRef="6" name="bodega" uid="{900b8556-f902-4c08-b7f1-a2de9d054534}"/>
|
||||
<RecordField fieldIdRef="9" name="mensaje_ini" uid="{5fcab4dd-77dd-4cc5-8641-848be157b658}"/>
|
||||
<RecordField colName="bodega" fieldIdRef="6" name="bodega" sqlTabName="formonly" uid="{900b8556-f902-4c08-b7f1-a2de9d054534}"/>
|
||||
<RecordField colName="mensaje_ini" fieldIdRef="9" name="mensaje_ini" sqlTabName="formonly" uid="{5fcab4dd-77dd-4cc5-8641-848be157b658}"/>
|
||||
</Record>
|
||||
<Record name="s_csmov" uid="{d4ca2e1f-7d30-4026-84bc-8e7b2b0ae0cb}">
|
||||
<RecordField fieldIdRef="18" name="num_doc" uid="{15a69691-abe4-4c90-bb06-486540da34b4}"/>
|
||||
@@ -25,8 +25,8 @@
|
||||
<RecordField fieldIdRef="13" name="parent_id" uid="{4a028887-b5ed-4b25-9eb1-702752bee614}"/>
|
||||
<RecordField fieldIdRef="19" name="chield_id" uid="{a972d067-b0bc-478a-add7-995fd25b5c9c}"/>
|
||||
</Record>
|
||||
<Form gridHeight="24" gridWidth="80" name="infmcs006">
|
||||
<Grid gridHeight="24" gridWidth="80" name="grid1" posX="0" posY="0">
|
||||
<Form gridHeight="24" gridWidth="86" name="infmcs006" text="MOVIMIENTO MATERIA PRIMA">
|
||||
<Grid gridHeight="24" gridWidth="86" name="grid1" posX="0" posY="0">
|
||||
<Label gridHeight="1" gridWidth="22" justify="right" name="label1" posX="1" posY="1" text="Codigo Materia Prima :"/>
|
||||
<Edit autoNext="true" colName="cod_n" fieldId="0" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="intb00001.cod_n" posX="24" posY="1" sqlTabName="intb00001" tabIndex="1" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="cod_grupo" fieldId="1" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="intb00001.cod_grupo" posX="28" posY="1" sqlTabName="intb00001" tabIndex="2" widget="Edit"/>
|
||||
@@ -39,8 +39,8 @@
|
||||
<Label gridHeight="1" gridWidth="14" justify="right" name="label7" posX="9" posY="3" text="Fecha Final:"/>
|
||||
<DateEdit colName="fech_fi" fieldId="8" format="dd/mm/yyyy" gridHeight="1" gridWidth="10" name="fech_fi" posX="24" posY="3" sqlTabName="formonly" sqlType="DATE" tabIndex="8" widget="DateEdit"/>
|
||||
<Label gridHeight="1" gridWidth="7" justify="right" name="label5" posX="16" posY="4" text="Bodega:"/>
|
||||
<ComboBox fieldId="6" gridHeight="1" gridWidth="48" items="" name="bodega" posX="24" posY="4" tabIndex="-1" title="combobox1" widget="ComboBox"/>
|
||||
<Edit fieldId="9" gridHeight="1" gridWidth="53" name="mensaje_ini" posX="2" posY="7" scroll="true" style="encabezado name" tabIndex="-1" title="edit1" widget="Edit"/>
|
||||
<ComboBox colName="bodega" fieldId="6" gridHeight="1" gridWidth="60" items="" name="bodega" posX="24" posY="4" sqlTabName="formonly" tabIndex="9" title="combobox1" widget="ComboBox"/>
|
||||
<Edit colName="mensaje_ini" fieldId="9" gridHeight="1" gridWidth="53" name="mensaje_ini" posX="2" posY="7" scroll="true" sqlTabName="formonly" style="encabezado name" tabIndex="-1" title="edit1" widget="Edit"/>
|
||||
<Group gridHeight="9" gridWidth="76" name="group1" posX="2" posY="8">
|
||||
<Tree gridHeight="6" gridWidth="73" idColumn="chield_id" name="table1" parentIdColumn="parent_id" posX="2" posY="1" style="Table.detalle" totalRows="5">
|
||||
<Edit fieldId="18" gridHeight="1" gridWidth="8" name="num_doc" posX="0" posY="0" tabIndex="-1" title="Documento" widget="Edit"/>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
database smarmotech
|
||||
screen size 24 by 80
|
||||
screen size 24 by 80 TITLE "CONSULTA BALANCES MATERIA PRIMA"
|
||||
{
|
||||
|
||||
Codigo Materia Prima :[a]-[b]-[c ]-[d ] [a1 ] [a2 ]
|
||||
Bodega: [h ]
|
||||
Fecha Inicial:[f1 ] Fecha Final:[f2 ]
|
||||
[g ]
|
||||
\g---------------------------------------------------------------------------\g
|
||||
C a n t i d a d
|
||||
Fecha Documento Entrada Salida Balance
|
||||
@@ -31,7 +32,7 @@ c = intb00001.cod_tipo,autonext;
|
||||
d = intb00001.cod_sec,autonext;
|
||||
a1 = intb00001.descrip_esp,noentry;
|
||||
a2 = intb00001.unidad_med,noentry;
|
||||
h = intb00006.bodega,autonext;
|
||||
COMBOBOX h = formonly.bodega;
|
||||
f1 = formonly.fech_in type date,format = "dd/mm/yyyy";
|
||||
f2 = formonly.fech_fi type date,format = "dd/mm/yyyy";
|
||||
d1 = intb00006.num_doc;
|
||||
@@ -39,6 +40,7 @@ f2 = formonly.fech_fi type date,format = "dd/mm/yyyy";
|
||||
d4 = formonly.entrada;
|
||||
d5 = formonly.salida;
|
||||
d6 = formonly.balance;
|
||||
g = formonly.mensaje_ini,noentry;
|
||||
|
||||
instructions
|
||||
screen record s_csmov[8] (num_doc,fecha,entrada,salida,balance)
|
||||
|
||||
@@ -1,75 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<ManagedForm databaseName="smarmotech" fileVersion="31400" gstVersion="3140a" name="ManagedForm" uid="{e7174189-8870-4ba4-8809-0d7723748408}">
|
||||
<ManagedForm databaseName="smarmotech" fileVersion="40100" gstVersion="60003" name="ManagedForm" uid="{2588a591-b057-476a-b4a8-b08042d6f2f7}">
|
||||
<AGSettings>
|
||||
<DynamicProperties version="2"/>
|
||||
<DynamicProperties version="4"/>
|
||||
</AGSettings>
|
||||
<Record name="record1" uid="{5f98391b-bea0-4211-a080-65f585d7f377}">
|
||||
<RecordField colName="num_doc" fieldIdRef="0" fieldType="TABLE_COLUMN" name="intb00006.num_doc" sqlTabName="intb00006" uid="{d2a35378-2bc5-4c14-a5b2-d9d31602318b}"/>
|
||||
<RecordField colName="fecha" fieldIdRef="1" fieldType="TABLE_COLUMN" name="intb00006.fecha" sqlTabName="intb00006" uid="{b2c2e592-dc75-4e19-a9ff-93cc5b1f77c2}"/>
|
||||
<RecordField colName="depto_a" fieldIdRef="2" fieldType="TABLE_COLUMN" name="intb00006.depto_a" sqlTabName="intb00006" uid="{acbbeead-342c-4c6f-a091-347f83c07636}"/>
|
||||
<RecordField colName="nom_dpto" fieldIdRef="3" fieldType="NON_DATABASE" name="nombre_d" sqlTabName="adtb00001" uid="{0dac7bb5-0381-4afe-8c40-96b4b36dd9cd}"/>
|
||||
<RecordField colName="bodega" fieldIdRef="10" fieldType="TABLE_COLUMN" name="intb00006.bodega" sqlTabName="intb00006" uid="{cadd22d3-f600-4af7-9fc9-696c6e7f1bbb}"/>
|
||||
<RecordField fieldIdRef="4" name="cod_mov" uid="{fc7dc520-056a-4e29-9fd9-06882be58fd6}"/>
|
||||
<RecordField fieldIdRef="5" name="descrip_mov" uid="{db6f3fa0-9339-4078-8c1f-c07b259095f4}"/>
|
||||
<RecordField fieldIdRef="6" name="nombre" uid="{9601d4ae-5d55-452b-9426-6235f628d523}"/>
|
||||
<RecordField fieldIdRef="7" name="apellido" uid="{7ab2f8e2-4efd-4810-aac8-f702974f3d82}"/>
|
||||
<RecordField fieldIdRef="9" name="impresion" uid="{77ff2cb8-ae51-4e61-9880-5bedaf2864ef}"/>
|
||||
<Record name="s_movi1" uid="{ea5f2f49-b9ed-4006-89ed-1b0ccb85921a}">
|
||||
<RecordField colName="cod_n" fieldIdRef="4" fieldType="TABLE_COLUMN" name="intb00006.cod_n" sqlTabName="intb00006" uid="{035e9495-92e7-49b4-b08b-9c0d186cda04}"/>
|
||||
<RecordField colName="cod_grupo" fieldIdRef="5" fieldType="TABLE_COLUMN" name="intb00006.cod_grupo" sqlTabName="intb00006" uid="{5fd30570-d08f-4a17-a017-2e344b0e17e7}"/>
|
||||
<RecordField colName="cod_tipo" fieldIdRef="6" fieldType="TABLE_COLUMN" name="intb00006.cod_tipo" sqlTabName="intb00006" uid="{e25df3e0-273a-437a-8175-bcb27619b24a}"/>
|
||||
<RecordField colName="cod_sec" fieldIdRef="7" fieldType="TABLE_COLUMN" name="intb00006.cod_sec" sqlTabName="intb00006" uid="{7c65560d-d48e-4bf5-b7f9-b20d9569c99e}"/>
|
||||
<RecordField colName="cantidad_1" fieldIdRef="8" fieldType="TABLE_COLUMN" name="intb00006.cantidad_1" sqlTabName="intb00006" uid="{1175d8c0-9c6c-454d-bcb7-55661372b958}"/>
|
||||
<RecordField colName="cantidad_2" fieldIdRef="9" fieldType="TABLE_COLUMN" name="intb00006.cantidad_2" sqlTabName="intb00006" uid="{ed4c635e-94b8-4c6e-bedf-23ec775579f8}"/>
|
||||
<RecordField colName="unidad_med" fieldIdRef="13" fieldType="TABLE_COLUMN" name="intb00001.unidad_med" sqlTabName="intb00001" uid="{ead4e1e1-a2fe-45e1-b2c7-6561bd53f367}"/>
|
||||
<RecordField colName="descrip_esp" fieldIdRef="12" fieldType="TABLE_COLUMN" name="intb00001.descrip_esp" sqlTabName="intb00001" uid="{9d609a5f-5f39-478f-826e-5bc411f55e52}"/>
|
||||
<RecordField colName="existencia" fieldIdRef="14" name="existencia" sqlTabName="formonly" uid="{a1b2c3d4-4444-4001-8001-000000000001}"/>
|
||||
</Record>
|
||||
<Record name="s_movi1" uid="{f4a6ba20-de96-44b0-846f-190d18414d47}">
|
||||
<RecordField fieldIdRef="13" name="cod_n" uid="{db75acf0-1055-476c-8243-3de0be0ff959}"/>
|
||||
<RecordField fieldIdRef="14" name="cod_grupo" uid="{5f8f596e-eac0-4b35-b7c4-b1a8a3c6ef0d}"/>
|
||||
<RecordField fieldIdRef="15" name="cod_tipo" uid="{1ccef9ef-ed49-42c7-a21d-0057636e5c93}"/>
|
||||
<RecordField fieldIdRef="16" name="cod_Sec" uid="{39fdf508-1f80-4033-8ef6-5cccac37de36}"/>
|
||||
<RecordField fieldIdRef="17" name="cantidad_1" uid="{7d6c051e-7772-4f29-bc49-2db9b7f3317f}"/>
|
||||
<RecordField fieldIdRef="18" name="cantidad_2" uid="{228f3fb6-d439-4bdb-8304-2ea2a813db1c}"/>
|
||||
<RecordField fieldIdRef="19" name="unidad_med" uid="{5776cd4e-a3f2-4ff0-b540-a00b6e0fdf5e}"/>
|
||||
<RecordField fieldIdRef="20" name="descrip_esp" uid="{73bfd3ea-3edd-4965-a5e8-cdc35e4a16f8}"/>
|
||||
<RecordField fieldIdRef="8" name="existencia" uid="{b583914e-c5af-4370-80a5-ba66b7779a23}"/>
|
||||
<Record name="record1" uid="{5cc1cbdd-fac8-4ffc-98e4-331d5c9fb810}">
|
||||
<RecordField colName="num_doc" fieldIdRef="0" fieldType="TABLE_COLUMN" name="intb00006.num_doc" sqlTabName="intb00006" uid="{3dcc2cab-2a20-4581-b11b-95c27ba55b87}"/>
|
||||
<RecordField colName="fecha" fieldIdRef="1" fieldType="TABLE_COLUMN" name="intb00006.fecha" sqlTabName="intb00006" uid="{effe3be7-6235-4ebb-88d9-4d99fe14bf42}"/>
|
||||
<RecordField colName="depto_a" fieldIdRef="2" fieldType="TABLE_COLUMN" name="intb00006.depto_a" sqlTabName="intb00006" uid="{408aa475-0b97-4d2c-aa5e-b6695c0b4299}"/>
|
||||
<RecordField colName="nombre_d" fieldIdRef="3" name="nombre_d" sqlTabName="formonly" uid="{b2e366d3-59b8-4d1e-96ca-68a7eac26f2b}"/>
|
||||
<RecordField colName="bodega" fieldIdRef="10" fieldType="TABLE_COLUMN" name="intb00006.bodega" sqlTabName="intb00006" uid="{9befab7b-9bfd-4fb5-ac59-646fca90afe9}"/>
|
||||
<RecordField colName="impresion" defaultValue="MATRICIAL" fieldIdRef="11" name="impresion" sqlTabName="formonly" uid="{97a456ba-6f98-44dd-962d-203916eabb50}"/>
|
||||
</Record>
|
||||
<Form gridHeight="22" gridWidth="92" name="infmmt036" text="REQUISICION MATERIALES">
|
||||
<Form gridHeight="18" gridWidth="100" name="infmmt036" text="REQUISICION MATERIALES">
|
||||
<ToolBar name="toolbar1">
|
||||
<ToolBarItem comment="Nuevo Documento" image="new" name="nuevo" text="Documento"/>
|
||||
<ToolBarItem comment="Criterio de busqueda" image="find" name="buscar" text="Buscar Documentos"/>
|
||||
<ToolBarSeparator name="toolbarseparator1"/>
|
||||
<ToolBarItem image="quit" name="salir" text="Salir"/>
|
||||
</ToolBar>
|
||||
<Grid gridHeight="22" gridWidth="92" name="grid1" posX="0" posY="0">
|
||||
<Group gridHeight="7" gridWidth="83" name="group1" posX="1" posY="1">
|
||||
<Grid gridHeight="18" gridWidth="100" name="grid1" posX="0" posY="0">
|
||||
<Group gridHeight="5" gridWidth="78" name="group1" posX="1" posY="1">
|
||||
<Label gridHeight="1" gridWidth="9" name="label1" posX="1" posY="1" text="Documento"/>
|
||||
<Edit colName="num_doc" fieldId="0" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="6" name="intb00006.num_doc" noEntry="true" posX="17" posY="1" sqlTabName="intb00006" tabIndex="1" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="6" name="label2" posX="28" posY="1" text="Fecha"/>
|
||||
<Edit autoNext="true" colName="fecha" comment="Digite Fecha Documento" fieldId="1" fieldType="TABLE_COLUMN" format="dd/mm/yyyy" gridHeight="1" gridWidth="10" name="intb00006.fecha" posX="35" posY="1" sqlTabName="intb00006" tabIndex="2" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="15" name="label3" posX="1" posY="2" text="Codigo de Dpto"/>
|
||||
<Edit autoNext="true" colName="depto_a" comment="Digite Codigo Departamento" fieldId="2" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="5" name="intb00006.depto_a" posX="17" posY="2" sqlTabName="intb00006" tabIndex="3" widget="Edit"/>
|
||||
<Edit colName="nom_dpto" fieldId="3" fieldType="NON_DATABASE" gridHeight="1" gridWidth="30" length="30" name="nombre_d" noEntry="true" posX="24" posY="2" sqlTabName="adtb00001" sqlType="CHAR" tabIndex="4" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="depto_a" comment="Digite Codigo Departamento" fieldId="2" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="4" name="intb00006.depto_a" posX="17" posY="2" sqlTabName="intb00006" tabIndex="3" widget="Edit"/>
|
||||
<Edit colName="nombre_d" fieldId="3" gridHeight="1" gridWidth="30" name="nombre_d" noEntry="true" posX="24" posY="2" sqlTabName="formonly" tabIndex="4" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="8" name="label4" posX="1" posY="3" text="Bodega :"/>
|
||||
<Edit autoNext="true" colName="bodega" comment="Digite el codigo de la bodega de almacenamiento" fieldId="10" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="5" name="intb00006.bodega" posX="17" posY="3" sqlTabName="intb00006" tabIndex="5" widget="Edit"/>
|
||||
<RadioGroup fieldId="9" gridHeight="1" gridWidth="10" items="PDF, MATRICIAL" name="impresion" posX="27" posY="3" tabIndex="-1" title="radiogroup1" widget="RadioGroup">
|
||||
<Item lstrtext="false" name="PDF" text="PDF"/>
|
||||
<Item lstrtext="false" name="MATRICIAL" text="MATRICIAL"/>
|
||||
<Edit autoNext="true" colName="bodega" comment="Digite el codigo de la bodega de almacenamiento" fieldId="10" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="2" name="intb00006.bodega" posX="17" posY="3" sqlTabName="intb00006" tabIndex="5" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="10" name="label5" posX="24" posY="3" text="Impresion"/>
|
||||
<RadioGroup colName="impresion" defaultValue="MATRICIAL" fieldId="11" gridHeight="1" gridWidth="3" items="MATRICIAL, PDF" name="impresion" posX="35" posY="3" sqlTabName="formonly" tabIndex="6" widget="RadioGroup">
|
||||
<Item name="MATRICIAL" text="MATRICIAL"/>
|
||||
<Item name="PDF" text="PDF"/>
|
||||
</RadioGroup>
|
||||
<Label gridHeight="1" gridWidth="10" name="label5" posX="1" posY="4" text="Codigo Mov"/>
|
||||
<Edit fieldId="4" gridHeight="1" gridWidth="5" name="cod_mov" posX="17" posY="4" tabIndex="-1" title="edit1" widget="Edit"/>
|
||||
<Edit fieldId="5" gridHeight="1" gridWidth="30" name="descrip_mov" posX="24" posY="4" tabIndex="-1" title="edit1" widget="Edit"/>
|
||||
<Edit fieldId="6" gridHeight="1" gridWidth="10" name="nombre" posX="24" posY="5" tabIndex="-1" title="edit1" widget="Edit"/>
|
||||
<Edit fieldId="7" gridHeight="1" gridWidth="10" name="apellido" posX="36" posY="5" tabIndex="-1" title="edit2" widget="Edit"/>
|
||||
</Group>
|
||||
<Group gridHeight="11" gridWidth="90" name="group2" posX="2" posY="9" text="Detalle">
|
||||
<Table gridHeight="8" gridWidth="82" name="table1" posX="7" posY="2" totalRows="5">
|
||||
<Edit fieldId="13" gridHeight="1" gridWidth="8" name="cod_n" posX="0" posY="0" tabIndex="-1" title="Codigo" widget="Edit"/>
|
||||
<Edit fieldId="14" gridHeight="1" gridWidth="8" name="cod_grupo" posX="8" posY="0" tabIndex="-1" widget="Edit"/>
|
||||
<Edit fieldId="15" gridHeight="1" gridWidth="8" name="cod_tipo" posX="16" posY="0" tabIndex="-1" widget="Edit"/>
|
||||
<Edit fieldId="16" gridHeight="1" gridWidth="8" name="cod_Sec" posX="24" posY="0" tabIndex="-1" widget="Edit"/>
|
||||
<Edit fieldId="17" gridHeight="1" gridWidth="8" name="cantidad_1" posX="32" posY="0" tabIndex="-1" title="Ordenada" widget="Edit"/>
|
||||
<Edit fieldId="18" gridHeight="1" gridWidth="8" name="cantidad_2" posX="40" posY="0" tabIndex="-1" title="Entregada" widget="Edit"/>
|
||||
<Edit fieldId="19" gridHeight="1" gridWidth="8" name="unidad_med" posX="48" posY="0" tabIndex="-1" title="Unidad Med" widget="Edit"/>
|
||||
<Edit fieldId="20" gridHeight="1" gridWidth="8" name="descrip_esp" posX="56" posY="0" scroll="true" tabIndex="-1" title="Descripcion" widget="Edit"/>
|
||||
<Edit fieldId="8" gridHeight="1" gridWidth="8" name="existencia" posX="64" posY="0" tabIndex="-1" title="Existencia" widget="Edit"/>
|
||||
</Table>
|
||||
<Group gridHeight="12" gridWidth="98" name="group2" posX="1" posY="6">
|
||||
<Label gridHeight="1" gridWidth="15" name="label6" posX="19" posY="1" text="C A N T I D A D"/>
|
||||
<Label gridHeight="1" gridWidth="6" name="label7" posX="2" posY="2" text="Codigo"/>
|
||||
<Label gridHeight="1" gridWidth="8" name="label8" posX="18" posY="2" text="Ordenada"/>
|
||||
<Label gridHeight="1" gridWidth="9" name="label9" posX="31" posY="2" text="Entregada"/>
|
||||
<Label gridHeight="1" gridWidth="6" name="label10" posX="42" posY="2" text="Unidad"/>
|
||||
<Label gridHeight="1" gridWidth="21" name="label11" posX="53" posY="2" text="D e s c r i p c i o n"/>
|
||||
<Edit autoNext="true" colName="cod_n" columnCount="1" comment="Digite Codigo Articulo" fieldId="4" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="intb00006.cod_n" posX="3" posY="4" repeat="true" rowCount="6" sqlTabName="intb00006" stepX="1" stepY="0" tabIndex="7" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="cod_grupo" columnCount="1" comment="Digite Codigo Articulo" fieldId="5" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="intb00006.cod_grupo" posX="8" posY="4" repeat="true" rowCount="6" sqlTabName="intb00006" stepX="1" stepY="0" tabIndex="8" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="cod_tipo" columnCount="1" comment="Digite Codigo Articulo" fieldId="6" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="intb00006.cod_tipo" posX="13" posY="4" repeat="true" rowCount="6" sqlTabName="intb00006" stepX="1" stepY="0" tabIndex="9" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="cod_sec" columnCount="1" comment="Digite Codigo Articulo" fieldId="7" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="4" name="intb00006.cod_sec" posX="18" posY="4" repeat="true" rowCount="6" sqlTabName="intb00006" stepX="1" stepY="0" tabIndex="10" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="cantidad_1" columnCount="1" comment="Digite La Cantidad Ordenada" fieldId="8" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="11" name="intb00006.cantidad_1" posX="24" posY="4" repeat="true" rowCount="6" sqlTabName="intb00006" stepX="1" stepY="0" tabIndex="11" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="cantidad_2" columnCount="1" comment="Digite La Cantidad Entregada" fieldId="9" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="11" name="intb00006.cantidad_2" posX="37" posY="4" repeat="true" rowCount="6" sqlTabName="intb00006" stepX="1" stepY="0" tabIndex="12" widget="Edit"/>
|
||||
<Edit colName="unidad_med" columnCount="1" fieldId="13" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="intb00001.unidad_med" noEntry="true" posX="50" posY="4" repeat="true" rowCount="6" sqlTabName="intb00001" stepX="1" stepY="0" tabIndex="13" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="descrip_esp" columnCount="1" fieldId="12" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="31" name="intb00001.descrip_esp" noEntry="true" posX="55" posY="4" repeat="true" rowCount="6" sqlTabName="intb00001" stepX="1" stepY="0" tabIndex="14" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="10" name="label12" posX="87" posY="2" text="Existencia"/>
|
||||
<Edit colName="existencia" columnCount="1" fieldId="14" gridHeight="1" gridWidth="10" name="existencia" noEntry="true" posX="87" posY="4" repeat="true" rowCount="6" sqlTabName="formonly" stepX="1" stepY="0" tabIndex="15" widget="Edit"/>
|
||||
</Group>
|
||||
</Grid>
|
||||
</Form>
|
||||
<DiagramLayout>
|
||||
<![CDATA[AAAAAgAAAEwAewA1AGYAOQA4ADMAOQAxAGIALQBiAGUAYQAwAC0ANAAyADEAMQAtAGEAMAA4ADAALQA2ADUAZgA1ADgANQBkADcAZgAzADcANwB9QGqZmcGAABhAIAAAGAAADz9gYk3S8an8AQAAAEwAewBmADQAYQA2AGIAYQAyADAALQBkAGUAOQA2AC0ANAA0AGIAMAAtADgANAA2AGYALQAxADkAMABkADEAOAA0ADEANABkADQANwB9QICszOXQABBANMzM7AAAEz9wYk3S8an8AQ==]]>
|
||||
</DiagramLayout>
|
||||
</ManagedForm>
|
||||
@@ -22,8 +22,8 @@ LAYOUT (TEXT="REQUISICION MATERIALES")
|
||||
<g >
|
||||
Documento [f000 ] Fecha [f001 ]
|
||||
Codigo de Dpto [f4 ] [a1 ]
|
||||
Bodega : [a7]
|
||||
|
||||
Bodega : [a7] Impresion [imp]
|
||||
|
||||
<g >
|
||||
C A N T I D A D
|
||||
Codigo Ordenada Entregada Unidad D e s c r i p c i o n
|
||||
@@ -49,7 +49,7 @@ f001 = intb00006.fecha, format = "dd/mm/yyyy",autonext,
|
||||
f4 = intb00006.depto_a,autonext,
|
||||
comments = "Digite Codigo Departamento";
|
||||
|
||||
a1 = adtb00001.nom_dpto,noentry;
|
||||
a1 = formonly.nombre_d,noentry;
|
||||
a = intb00006.cod_n,autonext,
|
||||
comments = "Digite Codigo Articulo";
|
||||
b = intb00006.cod_grupo,autonext,
|
||||
@@ -63,7 +63,8 @@ f02 = intb00006.cantidad_1,autonext,
|
||||
f03 = intb00006.cantidad_2,autonext,
|
||||
comments = "Digite La Cantidad Entregada";
|
||||
a7 = intb00006.bodega,autonext,
|
||||
comments = "Digite el codigo de la bodega de almacenamiento";
|
||||
comments = "Digite el codigo de la bodega de almacenamiento";
|
||||
RADIOGROUP imp = formonly.impresion,ITEMS=(("MATRICIAL","MATRICIAL"),("PDF","PDF")),DEFAULT="MATRICIAL";
|
||||
k = intb00001.descrip_esp,noentry,autonext;
|
||||
p = intb00001.unidad_med,noentry;
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
<RecordField colName="unidad_med" fieldIdRef="15" fieldType="TABLE_COLUMN" name="intb00001.unidad_med" sqlTabName="intb00001" uid="{5d253d6f-9d68-4c95-9a22-76aabe75fa79}"/>
|
||||
<RecordField colName="descrip_esp" fieldIdRef="14" fieldType="TABLE_COLUMN" name="intb00001.descrip_esp" sqlTabName="intb00001" uid="{ff167e69-f067-4d4c-ac10-5ec84b88decd}"/>
|
||||
<RecordField colName="existencia" fieldIdRef="0" name="existencia" sqlTabName="formonly" uid="{efcd0bfb-50b3-4fae-b2fc-1649d7f569da}"/>
|
||||
<RecordField colName="maquina" fieldIdRef="25" name="codigo" sqlTabName="formonly" uid="{a1b2c3d4-3333-4001-8001-000000000001}"/>
|
||||
<RecordField colName="clasf_bloque" fieldIdRef="26" name="clasf_bloque" sqlTabName="formonly" uid="{a1b2c3d4-3333-4001-8001-000000000002}"/>
|
||||
</Record>
|
||||
<Record name="record1" uid="{43dfdfd8-2c00-47d0-888c-3c710875f92b}">
|
||||
<RecordField colName="num_doc" fieldIdRef="7" fieldType="TABLE_COLUMN" name="intb00006.num_doc" sqlTabName="intb00006" uid="{3654cddf-82ff-4ffc-8f10-5ee4ab25b47c}"/>
|
||||
@@ -20,50 +22,65 @@
|
||||
<RecordField colName="descrip_mov" fieldIdRef="18" name="descrip_mov" sqlTabName="formonly" uid="{813f8ba1-8157-4849-a0e8-f3140299e9ce}"/>
|
||||
<RecordField colName="fecha" fieldIdRef="8" fieldType="TABLE_COLUMN" name="intb00006.fecha" sqlTabName="intb00006" uid="{f2a62dee-1ec8-465f-aa1c-f58542f4edd1}"/>
|
||||
<RecordField colName="bodega" fieldIdRef="16" name="bodega" sqlTabName="formonly" uid="{41b65fc5-5db4-45f6-99af-ff9c385e505b}"/>
|
||||
<RecordField colName="depto_a" fieldIdRef="2" name="depto_a" sqlTabName="formonly" uid="{6bdacdf3-1238-4efc-8288-c9e414078e9f}"/>
|
||||
<RecordField colName="nombre_d" fieldIdRef="3" name="nombre_d" sqlTabName="formonly" uid="{17baeaa2-59e8-43c6-acfa-36eab3ba34dd}"/>
|
||||
<RecordField colName="departamento" fieldIdRef="2" name="departamento" sqlTabName="formonly" uid="{6bdacdf3-1238-4efc-8288-c9e414078e9f}"/>
|
||||
<RecordField colName="conduce" fieldIdRef="19" name="conduce" sqlTabName="formonly" uid="{a1b2c3d4-2222-4001-8001-000000000001}"/>
|
||||
<RecordField colName="cod_transp" fieldIdRef="20" name="cod_transp" sqlTabName="formonly" uid="{a1b2c3d4-2222-4001-8001-000000000002}"/>
|
||||
<RecordField colName="sec_transp" fieldIdRef="21" name="sec_transp" sqlTabName="formonly" uid="{a1b2c3d4-2222-4001-8001-000000000003}"/>
|
||||
<RecordField colName="nombre_transp" fieldIdRef="22" name="nombre_transp" sqlTabName="formonly" uid="{a1b2c3d4-2222-4001-8001-000000000004}"/>
|
||||
<RecordField colName="ficha_vehiculo" fieldIdRef="23" name="ficha_vehiculo" sqlTabName="formonly" uid="{a1b2c3d4-2222-4001-8001-000000000005}"/>
|
||||
<RecordField colName="placa" fieldIdRef="24" name="placa" sqlTabName="formonly" uid="{a1b2c3d4-2222-4001-8001-000000000006}"/>
|
||||
<RecordField colName="pnum_emp" fieldIdRef="4" name="pnum_emp" sqlTabName="formonly" uid="{bfe61fca-3b3d-4e21-b8e1-5932090c7559}"/>
|
||||
<RecordField colName="nombre" fieldIdRef="5" name="nombre" sqlTabName="formonly" uid="{60a5474c-aa47-4275-a45f-98d878404e80}"/>
|
||||
<RecordField colName="apellido" fieldIdRef="6" name="apellido" sqlTabName="formonly" uid="{7c4796f9-5c66-4c91-a3d5-c3a44527d85e}"/>
|
||||
</Record>
|
||||
<Form gridHeight="16" gridWidth="87" name="infmmt046" text="TRANSACCIONES INVENTARIOS">
|
||||
<Form gridHeight="19" gridWidth="87" name="infmmt046" text="TRANSACCIONES INVENTARIOS">
|
||||
<ToolBar name="toolbar1">
|
||||
<ToolBarItem comment="Nuevo Documento" image="new" name="nuevo" text="Documento"/>
|
||||
<ToolBarItem comment="Criterio de busqueda" image="find" name="buscar" text="Buscar Documento"/>
|
||||
<ToolBarSeparator name="toolbarseparator1"/>
|
||||
<ToolBarItem image="quit" name="salir" text="Salir"/>
|
||||
</ToolBar>
|
||||
<Grid gridHeight="16" gridWidth="87" name="grid1" posX="0" posY="0">
|
||||
<Group gridHeight="7" gridWidth="83" name="group1" posX="1" posY="1">
|
||||
<Grid gridHeight="19" gridWidth="87" name="grid1" posX="0" posY="0">
|
||||
<Group gridHeight="10" gridWidth="83" name="group1" posX="1" posY="1">
|
||||
<Label gridHeight="1" gridWidth="17" name="label1" posX="2" posY="1" text="Documento Numero"/>
|
||||
<Edit autoNext="true" colName="num_doc" fieldId="7" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="6" name="intb00006.num_doc" noEntry="true" posX="20" posY="1" sqlTabName="intb00006" tabIndex="1" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="13" name="label2" posX="32" posY="1" text="Orden Compra"/>
|
||||
<Edit colName="orden_compra" fieldId="1" gridHeight="1" gridWidth="7" name="orden_compra" posX="46" posY="1" sqlTabName="formonly" tabIndex="2" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="17" name="label3" posX="2" posY="2" text="Codigo Movimiento"/>
|
||||
<ComboBox autoNext="true" colName="cod_mov" comment="Digite codigo del movimiento" fieldId="17" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="2" name="intb00006.cod_mov" posX="20" posY="2" sqlTabName="intb00006" tabIndex="3" widget="ComboBox"/>
|
||||
<Edit colName="descrip_mov" fieldId="18" gridHeight="1" gridWidth="34" name="descrip_mov" noEntry="true" posX="25" posY="2" sqlTabName="formonly" tabIndex="4" widget="Edit"/>
|
||||
<ComboBox autoNext="true" colName="cod_mov" comment="Digite codigo del movimiento" fieldId="17" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="35" name="intb00006.cod_mov" posX="20" posY="2" sqlTabName="intb00006" tabIndex="3" widget="ComboBox"/>
|
||||
<Edit colName="descrip_mov" fieldId="18" gridHeight="1" gridWidth="26" name="descrip_mov" noEntry="true" posX="56" posY="2" sqlTabName="formonly" tabIndex="4" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="5" name="label4" posX="2" posY="3" text="Fecha"/>
|
||||
<Edit autoNext="true" colName="fecha" comment="Digite Fecha Documento" fieldId="8" fieldType="TABLE_COLUMN" format="dd/mm/yyyy" gridHeight="1" gridWidth="10" name="intb00006.fecha" posX="20" posY="3" sqlTabName="intb00006" tabIndex="5" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="8" name="label5" posX="32" posY="3" text="Bodega :"/>
|
||||
<ComboBox autoNext="true" colName="bodega" fieldId="16" gridHeight="1" gridWidth="3" name="bodega" posX="41" posY="3" sqlTabName="formonly" tabIndex="6" widget="ComboBox"/>
|
||||
<Label gridHeight="1" gridWidth="7" name="label6" posX="45" posY="3" text="Conduce"/>
|
||||
<Label gridHeight="1" gridWidth="12" name="label7" posX="2" posY="4" text="DEPARTAMENTO"/>
|
||||
<ComboBox colName="depto_a" fieldId="2" gridHeight="1" gridWidth="4" name="depto_a" posX="20" posY="4" sqlTabName="formonly" tabIndex="7" widget="ComboBox"/>
|
||||
<Edit colName="nombre_d" fieldId="3" gridHeight="1" gridWidth="23" name="nombre_d" noEntry="true" posX="26" posY="4" sqlTabName="formonly" tabIndex="8" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="13" name="label8" posX="2" posY="5" text="Operador Grua"/>
|
||||
<Edit colName="pnum_emp" fieldId="4" gridHeight="1" gridWidth="4" name="pnum_emp" posX="20" posY="5" sqlTabName="formonly" tabIndex="9" widget="Edit"/>
|
||||
<Edit colName="nombre" fieldId="5" gridHeight="1" gridWidth="17" name="nombre" noEntry="true" posX="26" posY="5" sqlTabName="formonly" tabIndex="10" widget="Edit"/>
|
||||
<Edit colName="apellido" fieldId="6" gridHeight="1" gridWidth="23" name="apellido" noEntry="true" posX="45" posY="5" sqlTabName="formonly" tabIndex="11" widget="Edit"/>
|
||||
<ComboBox autoNext="true" colName="bodega" fieldId="16" gridHeight="1" gridWidth="35" name="bodega" posX="41" posY="3" sqlTabName="formonly" tabIndex="6" widget="ComboBox"/>
|
||||
<Label gridHeight="1" gridWidth="7" name="label6" posX="2" posY="4" text="Conduce"/>
|
||||
<Edit colName="conduce" fieldId="19" gridHeight="1" gridWidth="9" name="conduce" posX="20" posY="4" sqlTabName="formonly" tabIndex="7" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="12" name="label7" posX="2" posY="5" text="DEPARTAMENTO"/>
|
||||
<ComboBox colName="departamento" fieldId="2" gridHeight="1" gridWidth="35" name="departamento" posX="20" posY="5" sqlTabName="formonly" tabIndex="8" widget="ComboBox"/>
|
||||
<Label gridHeight="1" gridWidth="13" name="label8" posX="2" posY="6" text="Operador Grua"/>
|
||||
<Edit colName="pnum_emp" fieldId="4" gridHeight="1" gridWidth="4" name="pnum_emp" posX="20" posY="6" sqlTabName="formonly" tabIndex="9" widget="Edit"/>
|
||||
<Edit colName="nombre" fieldId="5" gridHeight="1" gridWidth="17" name="nombre" noEntry="true" posX="26" posY="6" sqlTabName="formonly" tabIndex="10" widget="Edit"/>
|
||||
<Edit colName="apellido" fieldId="6" gridHeight="1" gridWidth="23" name="apellido" noEntry="true" posX="45" posY="6" sqlTabName="formonly" tabIndex="11" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="13" name="label9" posX="2" posY="7" text="Transportista"/>
|
||||
<Edit colName="cod_transp" fieldId="20" gridHeight="1" gridWidth="4" name="cod_transp" posX="20" posY="7" sqlTabName="formonly" tabIndex="12" widget="Edit"/>
|
||||
<Edit colName="sec_transp" fieldId="21" gridHeight="1" gridWidth="4" name="sec_transp" posX="25" posY="7" sqlTabName="formonly" tabIndex="13" widget="Edit"/>
|
||||
<Edit colName="nombre_transp" fieldId="22" gridHeight="1" gridWidth="30" name="nombre_transp" noEntry="true" posX="30" posY="7" sqlTabName="formonly" tabIndex="14" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="14" name="label10" posX="2" posY="8" text="Ficha Vehiculo"/>
|
||||
<Edit colName="ficha_vehiculo" fieldId="23" gridHeight="1" gridWidth="20" name="ficha_vehiculo" posX="20" posY="8" sqlTabName="formonly" tabIndex="15" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="6" name="label11" posX="42" posY="8" text="Placa"/>
|
||||
<Edit colName="placa" fieldId="24" gridHeight="1" gridWidth="15" name="placa" posX="49" posY="8" sqlTabName="formonly" tabIndex="16" widget="Edit"/>
|
||||
</Group>
|
||||
<Table gridHeight="7" gridWidth="86" name="table1" posX="1" posY="8" totalRows="6" unitWidth="characters" width="86">
|
||||
<Edit colName="cod_n" comment="Digite el NIVEL" fieldId="9" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="2" name="intb00006.cod_n" posX="0" posY="0" sqlTabName="intb00006" tabIndex="12" title="CODIGO" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="cod_grupo" comment="Digite el GRUPO" fieldId="10" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="intb00006.cod_grupo" posX="2" posY="0" sqlTabName="intb00006" tabIndex="13" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="cod_tipo" comment="Digite el TIPO" fieldId="11" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="intb00006.cod_tipo" posX="5" posY="0" sqlTabName="intb00006" tabIndex="14" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="cod_sec" comment="Digite la SECUENCIA " fieldId="12" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="4" name="intb00006.cod_sec" posX="8" posY="0" sqlTabName="intb00006" tabIndex="15" widget="Edit"/>
|
||||
<Edit colName="cantidad_2" comment="Digite La Cantidad Ordenada" fieldId="13" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="11" name="intb00006.cantidad_2" posX="12" posY="0" sqlTabName="intb00006" tabIndex="16" title="CANTIDAD" widget="Edit"/>
|
||||
<Edit colName="unidad_med" fieldId="15" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="intb00001.unidad_med" noEntry="true" posX="23" posY="0" sqlTabName="intb00001" tabIndex="17" widget="Edit"/>
|
||||
<Edit colName="descrip_esp" fieldId="14" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="30" name="intb00001.descrip_esp" posX="26" posY="0" sqlTabName="intb00001" tabIndex="18" title="DESCRIPCION" widget="Edit"/>
|
||||
<Edit colName="existencia" fieldId="0" gridHeight="1" gridWidth="8" name="existencia" posX="56" posY="0" sqlTabName="formonly" tabIndex="19" title="EXISTENCIA" widget="Edit"/>
|
||||
<Table gridHeight="7" gridWidth="86" name="table1" posX="1" posY="11" totalRows="6" unitWidth="characters" width="114">
|
||||
<Edit colName="cod_n" comment="Digite el NIVEL" fieldId="9" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="2" name="intb00006.cod_n" posX="0" posY="0" sqlTabName="intb00006" tabIndex="18" title="CODIGO" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="cod_grupo" comment="Digite el GRUPO" fieldId="10" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="intb00006.cod_grupo" posX="2" posY="0" sqlTabName="intb00006" tabIndex="19" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="cod_tipo" comment="Digite el TIPO" fieldId="11" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="intb00006.cod_tipo" posX="5" posY="0" sqlTabName="intb00006" tabIndex="20" widget="Edit"/>
|
||||
<Edit autoNext="true" colName="cod_sec" comment="Digite la SECUENCIA " fieldId="12" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="4" name="intb00006.cod_sec" posX="8" posY="0" sqlTabName="intb00006" tabIndex="21" widget="Edit"/>
|
||||
<Edit colName="cantidad_2" comment="Digite La Cantidad Ordenada" fieldId="13" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="11" name="intb00006.cantidad_2" posX="12" posY="0" sqlTabName="intb00006" tabIndex="22" title="CANTIDAD" widget="Edit"/>
|
||||
<Edit colName="unidad_med" fieldId="15" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="intb00001.unidad_med" noEntry="true" posX="23" posY="0" sqlTabName="intb00001" tabIndex="23" widget="Edit"/>
|
||||
<Edit colName="descrip_esp" fieldId="14" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="30" name="intb00001.descrip_esp" posX="26" posY="0" sqlTabName="intb00001" tabIndex="24" title="DESCRIPCION" widget="Edit"/>
|
||||
<Edit colName="existencia" fieldId="0" gridHeight="1" gridWidth="8" name="existencia" posX="56" posY="0" sqlTabName="formonly" tabIndex="25" title="EXISTENCIA" widget="Edit"/>
|
||||
<ComboBox colName="maquina" fieldId="25" gridHeight="1" gridWidth="25" name="codigo" posX="64" posY="0" sqlTabName="formonly" tabIndex="26" title="MAQUINA" widget="ComboBox"/>
|
||||
<ComboBox colName="clasf_bloque" fieldId="26" gridHeight="1" gridWidth="25" name="clasf_bloque" posX="89" posY="0" sqlTabName="formonly" tabIndex="27" title="CLASF. BLOQUE" widget="ComboBox"/>
|
||||
</Table>
|
||||
</Grid>
|
||||
</Form>
|
||||
|
||||
@@ -13,9 +13,11 @@ GRID
|
||||
<G >
|
||||
Documento Numero [f000 ] Orden Compra [ord ]
|
||||
Codigo Movimiento[m ] [m1 ]
|
||||
Fecha [f001 ] Bodega :[p1 ]Conduce
|
||||
DEPARTAMENTO [f1 ][d1 ]
|
||||
Operador Grua [op ][nomop ][ap ]
|
||||
Fecha [f001 ] Bodega :[p1 ]Conduce [f002 ]
|
||||
DEPARTAMENTO [f1 ][d1 ]
|
||||
Operador Grua [op ][nomop ][ap ]
|
||||
Transportista [tr1 ][tr2 ][nomtr ]
|
||||
Ficha Vehiculo [fveh ] Placa [pplaca ]
|
||||
|
||||
<t >
|
||||
[a ][b ][c ][d ][f02 ] [p ][k ] [ex1 ]
|
||||
@@ -34,11 +36,17 @@ cotb00001
|
||||
ATTRIBUTES
|
||||
ex1 = formonly.existencia, TITLE="EXISTENCIA";
|
||||
ord = formonly.orden_compra;
|
||||
f1 = formonly.depto_a;
|
||||
COMBOBOX f1 = formonly.departamento;
|
||||
d1 = formonly.nombre_d,noentry;
|
||||
op = formonly.pnum_emp;
|
||||
nomop = formonly.nombre,noentry;
|
||||
ap = formonly.apellido,noentry;
|
||||
f002 = formonly.conduce;
|
||||
tr1 = formonly.cod_transp;
|
||||
tr2 = formonly.sec_transp;
|
||||
nomtr = formonly.nombre_transp,noentry;
|
||||
fveh = formonly.ficha_vehiculo;
|
||||
pplaca = formonly.placa;
|
||||
f000 = intb00006.num_doc,autonext,noentry;
|
||||
f001 = intb00006.fecha, format = "dd/mm/yyyy",autonext,
|
||||
comments = "Digite Fecha Documento";
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<ManagedForm databaseName="smarmotech" fileVersion="40100" gstVersion="60003" name="ManagedForm" uid="{7a1f2c30-8e4b-4d5a-9b6a-2f3c4d5e6f70}">
|
||||
<AGSettings>
|
||||
<DynamicProperties version="4"/>
|
||||
</AGSettings>
|
||||
<Record name="record1" uid="{4a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d}">
|
||||
<RecordField colName="decide" comment="Digite A - Alfabetico N - Numerico" fieldIdRef="0" name="decide" sqlTabName="formonly" uid="{1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c51}"/>
|
||||
<RecordField colName="cod_mov" fieldIdRef="1" fieldType="TABLE_COLUMN" name="intb00005.cod_mov" sqlTabName="intb00005" uid="{1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c52}"/>
|
||||
</Record>
|
||||
<Form gridHeight="5" gridWidth="60" name="infmrp008" text="Tipos de Movimientos">
|
||||
<Grid gridHeight="5" gridWidth="60" name="grid1" posX="0" posY="0">
|
||||
<Label gridHeight="1" gridWidth="20" name="label1" posX="0" posY="0" text="Ordenamiento"/>
|
||||
<Edit autoNext="true" colName="decide" comment="Digite A - Alfabetico N - Numerico" fieldId="0" gridHeight="1" gridWidth="2" name="decide" posX="22" posY="0" sqlTabName="formonly" tabIndex="1" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="20" name="label2" posX="0" posY="1" text="Codigo Movimiento"/>
|
||||
<Edit colName="cod_mov" fieldId="1" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="3" name="intb00005.cod_mov" posX="22" posY="1" sqlTabName="intb00005" tabIndex="2" widget="Edit"/>
|
||||
</Grid>
|
||||
</Form>
|
||||
</ManagedForm>
|
||||
@@ -2,7 +2,7 @@ database smarmotech
|
||||
screen size 24 by 80
|
||||
{
|
||||
|
||||
Ordenamiento [k]
|
||||
Ordenamiento [k ]
|
||||
Codigo Movimiento [a ]
|
||||
}
|
||||
end
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<RecordField fieldIdRef="9" name="bodega" uid="{29e8d1d3-d3fb-4bb5-9a5e-5870d09c4012}"/>
|
||||
<RecordField fieldIdRef="3" name="tipoReporte" uid="{af73cc7b-ed97-4526-9306-7ceb3e14bb9d}"/>
|
||||
</Record>
|
||||
<Form gridHeight="24" gridWidth="80" name="infmrp009">
|
||||
<Form gridHeight="24" gridWidth="80" name="infmrp009" text="Existencias a Diferentes Fechas">
|
||||
<Grid gridHeight="24" gridWidth="80" name="grid1" posX="0" posY="0">
|
||||
<Label gridHeight="1" gridWidth="11" name="label2" posX="9" posY="1" text="Fecha Final"/>
|
||||
<Edit colName="fech_fi" comment="Introduzca Fecha Final" fieldId="4" format="dd/mm/yyyy" gridHeight="1" gridWidth="10" name="fech_fi" posX="24" posY="1" sqlTabName="formonly" sqlType="DATE" tabIndex="1" widget="Edit"/>
|
||||
@@ -34,7 +34,7 @@
|
||||
<Edit colName="cod_tipo" fieldId="7" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="5" name="intb00001.cod_tipo" posX="39" posY="5" sqlTabName="intb00001" tabIndex="6" widget="Edit"/>
|
||||
<Edit colName="cod_sec" fieldId="8" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="5" name="intb00001.cod_sec" posX="46" posY="5" sqlTabName="intb00001" tabIndex="7" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="10" name="label12" posX="10" posY="6" text="Bodega"/>
|
||||
<ComboBox fieldId="9" gridHeight="1" gridWidth="31" items="" name="bodega" posX="25" posY="6" tabIndex="-1" title="combobox1" widget="ComboBox"/>
|
||||
<ComboBox fieldId="9" gridHeight="1" gridWidth="31" items="" name="bodega" notNull="true" posX="25" posY="6" tabIndex="-1" title="combobox1" widget="ComboBox"/>
|
||||
<Label gridHeight="1" gridWidth="1" name="label9" posX="10" posY="8" text="0"/>
|
||||
<Label gridHeight="1" gridWidth="2" name="label10" posX="21" posY="8" text="50"/>
|
||||
<Label gridHeight="1" gridWidth="3" name="label11" posX="35" posY="8" text="100"/>
|
||||
|
||||
@@ -1,33 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<ManagedForm databaseName="smarmotech" fileVersion="31400" gstVersion="3140a" name="ManagedForm" uid="{65e99c2b-637a-44ff-8fe8-a549b250be19}">
|
||||
<ManagedForm databaseName="smarmotech" fileVersion="40100" gstVersion="60003" name="ManagedForm" uid="{2fae125f-712d-4f29-87a1-51b726921e16}">
|
||||
<AGSettings>
|
||||
<DynamicProperties version="2"/>
|
||||
<DynamicProperties version="4"/>
|
||||
</AGSettings>
|
||||
<Record name="record1" uid="{4fb0f919-f3a6-4b1e-aeea-b43f83982b8d}">
|
||||
<RecordField colName="cod_mov" fieldIdRef="1" fieldType="TABLE_COLUMN" name="intb00006.cod_mov" sqlTabName="intb00006" uid="{6d6beaab-e13f-455b-a61c-41a07f5bb273}"/>
|
||||
<RecordField colName="descrip_mov" fieldIdRef="0" name="descrip_mov" sqlTabName="formonly" uid="{cf4f43bc-bc24-4688-944e-dca1a58acf72}"/>
|
||||
<RecordField colName="num_doc" fieldIdRef="2" fieldType="TABLE_COLUMN" name="intb00006.num_doc" sqlTabName="intb00006" uid="{7c5fe677-d27f-45db-a069-79ea3f129654}"/>
|
||||
<RecordField colName="fecha" fieldIdRef="5" fieldType="TABLE_COLUMN" name="intb00006.fecha" sqlTabName="intb00006" uid="{1e9e7956-1f9c-4dec-9275-727f4c491b23}"/>
|
||||
<RecordField colName="cod_sp" fieldIdRef="3" name="cod_sp" sqlTabName="formonly" uid="{f394897d-ade5-4aca-8038-701585ee1147}"/>
|
||||
<RecordField colName="cod_sp_sec" fieldIdRef="4" name="cod_sp_sec" sqlTabName="formonly" uid="{20475402-fe48-4d1b-8183-fa75e7cfe42c}"/>
|
||||
<RecordField fieldIdRef="6" name="bodega" uid="{b7e97b0b-c303-4171-bd41-37f7be2a872f}"/>
|
||||
<Record name="record1" uid="{32862f17-82e9-4928-817b-6c11b279ff27}">
|
||||
<RecordField colName="cod_mov" fieldIdRef="1" fieldType="TABLE_COLUMN" name="intb00006.cod_mov" sqlTabName="intb00006" uid="{50bb55c2-f401-4e27-acc9-fa6cf556b0d9}"/>
|
||||
<RecordField colName="descrip_mov" fieldIdRef="0" name="descrip_mov" sqlTabName="formonly" uid="{28315cc1-66c8-423e-a86b-af455ec52be9}"/>
|
||||
<RecordField colName="num_doc" fieldIdRef="2" fieldType="TABLE_COLUMN" name="intb00006.num_doc" sqlTabName="intb00006" uid="{7368fae7-1c4b-437e-9c34-1f1572963b87}"/>
|
||||
<RecordField colName="fecha" fieldIdRef="5" fieldType="TABLE_COLUMN" name="intb00006.fecha" sqlTabName="intb00006" uid="{0f076029-3b03-4f4f-bde6-3616828a265a}"/>
|
||||
<RecordField colName="bodega" fieldIdRef="6" name="bodega" sqlTabName="formonly" uid="{3aabc13b-ab73-4e6c-acb9-389250bda868}"/>
|
||||
<RecordField colName="cod_sp" fieldIdRef="3" name="cod_sp" sqlTabName="formonly" uid="{fb3bd8a4-297a-4ff5-93cc-dafeb2f762c9}"/>
|
||||
<RecordField colName="cod_sp_sec" fieldIdRef="4" name="cod_sp_sec" sqlTabName="formonly" uid="{3b346e58-ffc8-4572-bc0f-49c1312d3120}"/>
|
||||
</Record>
|
||||
<Form gridHeight="9" gridWidth="56" name="infmwd005" text="ANULAR DOCUMENTOS">
|
||||
<Grid gridHeight="9" gridWidth="56" name="grid1" posX="0" posY="0">
|
||||
<Label gridHeight="1" gridWidth="10" name="label4" posX="2" posY="1" text="Bodega"/>
|
||||
<ComboBox fieldId="6" gridHeight="1" gridWidth="34" items="" name="bodega" posX="21" posY="1" tabIndex="-1" title="combobox1" widget="ComboBox"/>
|
||||
<Label gridHeight="1" gridWidth="18" name="label1" posX="2" posY="2" text="Codigo Movimiento"/>
|
||||
<Edit colName="cod_mov" fieldId="1" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="2" name="intb00006.cod_mov" posX="21" posY="2" sqlTabName="intb00006" tabIndex="1" widget="Edit"/>
|
||||
<Edit colName="descrip_mov" fieldId="0" gridHeight="1" gridWidth="30" name="descrip_mov" noEntry="true" posX="25" posY="2" sqlTabName="formonly" tabIndex="2" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="16" name="label2" posX="2" posY="3" text="Numero Documento"/>
|
||||
<Edit colName="num_doc" fieldId="2" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="6" name="intb00006.num_doc" posX="21" posY="3" sqlTabName="intb00006" tabIndex="3" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="5" name="label3" posX="2" posY="4" text="Fecha"/>
|
||||
<Edit colName="fecha" fieldId="5" fieldType="TABLE_COLUMN" format="dd/mm/yy" gridHeight="1" gridWidth="9" name="intb00006.fecha" noEntry="true" posX="21" posY="4" sqlTabName="intb00006" tabIndex="4" widget="Edit"/>
|
||||
<Edit colName="cod_sp" fieldId="3" gridHeight="1" gridWidth="2" name="cod_sp" noEntry="true" posX="21" posY="5" sqlTabName="formonly" tabIndex="5" widget="Edit"/>
|
||||
<Edit colName="cod_sp_sec" fieldId="4" gridHeight="1" gridWidth="4" name="cod_sp_sec" noEntry="true" posX="25" posY="5" sqlTabName="formonly" tabIndex="6" widget="Edit"/>
|
||||
<Form gridHeight="5" gridWidth="56" name="infmwd005" text="ANULAR DOCUMENTOS">
|
||||
<Grid gridHeight="5" gridWidth="56" name="grid1" posX="0" posY="0">
|
||||
<Label gridHeight="1" gridWidth="18" name="label1" posX="2" posY="0" text="Codigo Movimiento"/>
|
||||
<Edit colName="cod_mov" fieldId="1" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="2" name="intb00006.cod_mov" posX="21" posY="0" sqlTabName="intb00006" tabIndex="1" widget="Edit"/>
|
||||
<Edit colName="descrip_mov" fieldId="0" gridHeight="1" gridWidth="30" name="descrip_mov" noEntry="true" posX="25" posY="0" sqlTabName="formonly" tabIndex="2" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="16" name="label2" posX="2" posY="1" text="Numero Documento"/>
|
||||
<Edit colName="num_doc" fieldId="2" fieldType="TABLE_COLUMN" gridHeight="1" gridWidth="6" name="intb00006.num_doc" posX="21" posY="1" sqlTabName="intb00006" tabIndex="3" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="5" name="label3" posX="2" posY="2" text="Fecha"/>
|
||||
<Edit colName="fecha" fieldId="5" fieldType="TABLE_COLUMN" format="dd/mm/yy" gridHeight="1" gridWidth="9" name="intb00006.fecha" noEntry="true" posX="21" posY="2" sqlTabName="intb00006" tabIndex="4" widget="Edit"/>
|
||||
<Label gridHeight="1" gridWidth="6" name="label4" posX="2" posY="3" text="Bodega"/>
|
||||
<ComboBox colName="bodega" fieldId="6" gridHeight="1" gridWidth="35" items="" name="bodega" posX="21" posY="3" sqlTabName="formonly" tabIndex="5" widget="ComboBox"/>
|
||||
<Edit colName="cod_sp" fieldId="3" gridHeight="1" gridWidth="2" name="cod_sp" noEntry="true" posX="21" posY="4" sqlTabName="formonly" tabIndex="6" widget="Edit"/>
|
||||
<Edit colName="cod_sp_sec" fieldId="4" gridHeight="1" gridWidth="4" name="cod_sp_sec" noEntry="true" posX="25" posY="4" sqlTabName="formonly" tabIndex="7" widget="Edit"/>
|
||||
</Grid>
|
||||
</Form>
|
||||
<DiagramLayout>
|
||||
<![CDATA[AAAAAgAAAEwAewA0AGYAYgAwAGYAOQAxADkALQBmADMAYQA2AC0ANABiADEAZQAtAGEAZQBlAGEALQBiADQAMwBmADgAMwA5ADgAMgBiADgAZAB9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQ==]]>
|
||||
</DiagramLayout>
|
||||
</ManagedForm>
|
||||
@@ -15,7 +15,8 @@ LAYOUT (TEXT="ANULAR DOCUMENTOS")
|
||||
{
|
||||
Codigo Movimiento [f0][a ]
|
||||
Numero Documento [f02 ]
|
||||
Fecha [f5 ]
|
||||
Fecha [f5 ]
|
||||
Bodega [bod]
|
||||
[f1][f2 ]
|
||||
}
|
||||
end
|
||||
@@ -28,6 +29,7 @@ f02 = intb00006.num_doc;
|
||||
f1 = formonly.cod_sp,noentry;
|
||||
f2 = formonly.cod_sp_sec,noentry;
|
||||
f5 = intb00006.fecha,noentry,format = "dd/mm/yy";
|
||||
COMBOBOX bod = formonly.bodega;
|
||||
instructions
|
||||
delimiters " "
|
||||
end
|
||||
|
||||
@@ -101,15 +101,13 @@ FUNCTION inprcs006()
|
||||
|
||||
END INPUT
|
||||
|
||||
CONSTRUCT criterio ON p.bodega FROM bodega
|
||||
BEFORE CONSTRUCT
|
||||
CALL bodegas('1')
|
||||
ON ACTION buscar ATTRIBUTE(TEXT="Ejecuta Busqueda",IMAGE="find")
|
||||
|
||||
ON ACTION buscar ATTRIBUTE(TEXT="Ejecuta Busqueda",IMAGE="find")
|
||||
|
||||
IF datos_cons.fech_fi IS NULL THEN
|
||||
CALL msg(16)
|
||||
NEXT FIELD fecha_in
|
||||
CONTINUE DIALOG
|
||||
END IF
|
||||
LET criterio = "p.bodega = ", datos_cons.bodega
|
||||
LET query1 =
|
||||
"SELECT ISNULL(SUM(p.cantidad_2),0) FROM intb00006 p
|
||||
WHERE ", criterio clipped," and p.cod_n = ? and p.cod_grupo = ? and
|
||||
@@ -207,8 +205,7 @@ FUNCTION inprcs006()
|
||||
# FOR idx = 1 TO csmov2.getLength()
|
||||
# DISPLAY csmov2[idx].num_doc," ",csmov2[idx].fecha_2," ",csmov2[idx].entrada," p ",csmov2[idx].parent_id," c ",csmov2[idx].chield_id
|
||||
# END FOR
|
||||
END CONSTRUCT
|
||||
|
||||
|
||||
DISPLAY ARRAY csmov2 TO s_csmov.*
|
||||
END DISPLAY
|
||||
|
||||
|
||||
+162
-117
@@ -3,7 +3,8 @@ GLOBALS
|
||||
DEFINE nombre,apellido CHAR(30),
|
||||
xinserta CHAR(1),
|
||||
kprograma varchar(20),
|
||||
xdescrip_mov VARCHAR(50)
|
||||
xdescrip_mov VARCHAR(50),
|
||||
xcod_mov_tmp LIKE intb00005.cod_mov
|
||||
|
||||
FUNCTION reimprime(xprograma)
|
||||
DEFINE xprograma CHAR(20),
|
||||
@@ -11,7 +12,7 @@ FUNCTION reimprime(xprograma)
|
||||
|
||||
IF xprograma = 'inprmt046' THEN
|
||||
CONSTRUCT criterio ON a.cod_mov,a.num_doc,a.fecha,a.depto_a,a.bodega FROM
|
||||
cod_mov,num_doc,fecha,depto_a,bodega
|
||||
cod_mov,num_doc,fecha,departamento,bodega
|
||||
BEFORE CONSTRUCT
|
||||
CALL cincodmov()
|
||||
CALL busca_departamento()
|
||||
@@ -41,148 +42,192 @@ FUNCTION reimprime(xprograma)
|
||||
LET xinserta = 'N'
|
||||
END IF
|
||||
|
||||
LET kprograma = xprograma
|
||||
|
||||
PREPARE breimprime FROM selec
|
||||
DECLARE bdocumento SCROLL CURSOR FOR breimprime
|
||||
OPEN bdocumento
|
||||
|
||||
FETCH FIRST bdocumento INTO otros_mov.cod_mov,xdescrip_mov,
|
||||
otros_mov.num_doc,otros_mov.fecha,
|
||||
datos1.depto_a,pnum_emp,otros_mov.bodega
|
||||
|
||||
IF kprograma = 'inprmt046' THEN
|
||||
FETCH FIRST bdocumento INTO otros_mov.cod_mov,xdescrip_mov,
|
||||
otros_mov.num_doc,otros_mov.fecha,
|
||||
datos1.depto_a,pnum_emp,otros_mov.bodega
|
||||
ELSE
|
||||
FETCH FIRST bdocumento INTO xcod_mov_tmp,xdescrip_mov,
|
||||
datos1.num_doc,datos1.fecha,
|
||||
datos1.depto_a,pnum_emp,datos1.bodega
|
||||
END IF
|
||||
|
||||
IF STATUS = NOTFOUND THEN
|
||||
CALL msg(3)
|
||||
RETURN
|
||||
END IF
|
||||
LET kprograma = xprograma
|
||||
CALL busca_info()
|
||||
|
||||
|
||||
MENU "NAVEGACION:"
|
||||
COMMAND "Siguiente" "Busca el siguiente documento"
|
||||
FETCH NEXT bdocumento INTO otros_mov.cod_mov,xdescrip_mov,
|
||||
otros_mov.num_doc,otros_mov.fecha,
|
||||
datos1.depto_a,pnum_emp,otros_mov.bodega
|
||||
IF kprograma = 'inprmt046' THEN
|
||||
FETCH NEXT bdocumento INTO otros_mov.cod_mov,xdescrip_mov,
|
||||
otros_mov.num_doc,otros_mov.fecha,
|
||||
datos1.depto_a,pnum_emp,otros_mov.bodega
|
||||
ELSE
|
||||
FETCH NEXT bdocumento INTO xcod_mov_tmp,xdescrip_mov,
|
||||
datos1.num_doc,datos1.fecha,
|
||||
datos1.depto_a,pnum_emp,datos1.bodega
|
||||
END IF
|
||||
CALL busca_info()
|
||||
|
||||
|
||||
COMMAND "Primero" "Busca el siguiente documento"
|
||||
FETCH FIRST bdocumento INTO otros_mov.cod_mov,xdescrip_mov,
|
||||
otros_mov.num_doc,otros_mov.fecha,
|
||||
datos1.depto_a,pnum_emp,otros_mov.bodega
|
||||
CALL busca_info()
|
||||
IF kprograma = 'inprmt046' THEN
|
||||
FETCH FIRST bdocumento INTO otros_mov.cod_mov,xdescrip_mov,
|
||||
otros_mov.num_doc,otros_mov.fecha,
|
||||
datos1.depto_a,pnum_emp,otros_mov.bodega
|
||||
ELSE
|
||||
FETCH FIRST bdocumento INTO xcod_mov_tmp,xdescrip_mov,
|
||||
datos1.num_doc,datos1.fecha,
|
||||
datos1.depto_a,pnum_emp,datos1.bodega
|
||||
END IF
|
||||
CALL busca_info()
|
||||
COMMAND "Anterior" "Busca el Registrosiguiente documento"
|
||||
FETCH PREVIOUS bdocumento INTO otros_mov.cod_mov,xdescrip_mov,
|
||||
otros_mov.num_doc,otros_mov.fecha,
|
||||
datos1.depto_a,pnum_emp,otros_mov.bodega
|
||||
IF kprograma = 'inprmt046' THEN
|
||||
FETCH PREVIOUS bdocumento INTO otros_mov.cod_mov,xdescrip_mov,
|
||||
otros_mov.num_doc,otros_mov.fecha,
|
||||
datos1.depto_a,pnum_emp,otros_mov.bodega
|
||||
ELSE
|
||||
FETCH PREVIOUS bdocumento INTO xcod_mov_tmp,xdescrip_mov,
|
||||
datos1.num_doc,datos1.fecha,
|
||||
datos1.depto_a,pnum_emp,datos1.bodega
|
||||
END IF
|
||||
CALL busca_info()
|
||||
COMMAND "Ultimo" "Busca el Ultimo Documento"
|
||||
FETCH LAST bdocumento INTO otros_mov.cod_mov,xdescrip_mov,
|
||||
otros_mov.num_doc,otros_mov.fecha,
|
||||
datos1.depto_a,pnum_emp,otros_mov.bodega
|
||||
IF kprograma = 'inprmt046' THEN
|
||||
FETCH LAST bdocumento INTO otros_mov.cod_mov,xdescrip_mov,
|
||||
otros_mov.num_doc,otros_mov.fecha,
|
||||
datos1.depto_a,pnum_emp,otros_mov.bodega
|
||||
ELSE
|
||||
FETCH LAST bdocumento INTO xcod_mov_tmp,xdescrip_mov,
|
||||
datos1.num_doc,datos1.fecha,
|
||||
datos1.depto_a,pnum_emp,datos1.bodega
|
||||
END IF
|
||||
CALL busca_info()
|
||||
COMMAND KEY("T") "reTornar" "Salir de busqueda"
|
||||
EXIT MENU
|
||||
END MENU
|
||||
END FUNCTION
|
||||
FUNCTION busca_info()
|
||||
|
||||
SELECT UNIQUE nom_dpto INTO nombre_d FROM adtb00001 a
|
||||
WHERE a.departamento = datos1.depto_a and
|
||||
a.status_t is NULL
|
||||
|
||||
LET nombre =NULL
|
||||
LET apellido = NULL
|
||||
|
||||
SELECT a.nom1_emp,a.apell1_emp INTO nombre,apellido FROM adtb00003 a
|
||||
WHERE a.num_Emp = pnum_emp
|
||||
|
||||
DISPLAY BY NAME otros_mov.cod_mov,otros_mov.num_doc,
|
||||
otros_mov.fecha,nombre,apellido
|
||||
DISPLAY datos1.depto_a TO departamento
|
||||
DECLARE busca CURSOR FOR
|
||||
SELECT a.cod_n,a.cod_Grupo,a.cod_tipo,a.cod_Sec,a.cantidad_2, b.unidad_med, b.descrip_Esp,NULL,
|
||||
a.maquina, a.clasf_bloque
|
||||
FROM intb00006 a,intb00001 b
|
||||
WHERE a.num_Doc = otros_mov.num_doc AND
|
||||
a.cod_mov = otros_mov.cod_mov AND
|
||||
a.cod_n = b.cod_n AND
|
||||
a.cod_grupo = b.cod_grupo AND
|
||||
a.cod_tipo = b.cod_tipo AND
|
||||
a.cod_Sec = b.cod_Sec AND
|
||||
a.bodega = otros_mov.bodega
|
||||
IF kprograma = 'inprmt046' THEN
|
||||
SELECT UNIQUE nom_dpto INTO nombre_d FROM adtb00001 a
|
||||
WHERE a.departamento = datos1.depto_a and
|
||||
a.status_t is NULL
|
||||
|
||||
LET idx = 1
|
||||
IF kprograma = 'inprmt046' THEN
|
||||
FOREACH busca INTO movi2[idx].cod_n,movi2[idx].cod_grupo,
|
||||
movi2[idx].cod_tipo,movi2[idx].cod_sec,
|
||||
movi2[idx].cantidad_2, movi2[idx].unidad_med,
|
||||
movi2[idx].descrip_esp, movi2[idx].existencia,
|
||||
movi2[idx].maquina, movi2[idx].clasf_bloque
|
||||
LET idx = idx + 1
|
||||
END FOREACH
|
||||
|
||||
CALL set_count(idx-1)
|
||||
DISPLAY ARRAY movi2 TO s_movi1.*
|
||||
BEFORE DISPLAY
|
||||
CALL maquinaria()
|
||||
CALL clasf_bloque()
|
||||
ON ACTION rimprimir
|
||||
|
||||
CALL defecto(usuarios,clave,impresor) RETURNING imprime,negrilla_on,negrillas_of,
|
||||
doble_on,doble_off,comp_on,comp_off,
|
||||
doce,normal,archivo,copia
|
||||
LET nombre =NULL
|
||||
LET apellido = NULL
|
||||
|
||||
# CALL configureoutput('PDF') RETURNING handler
|
||||
# START REPORT formu46 TO XML HANDLER handler
|
||||
SELECT a.nom1_emp,a.apell1_emp INTO nombre,apellido FROM adtb00003 a
|
||||
WHERE a.num_Emp = pnum_emp
|
||||
|
||||
DISPLAY BY NAME otros_mov.cod_mov,otros_mov.num_doc,
|
||||
otros_mov.fecha,nombre,apellido
|
||||
DISPLAY datos1.depto_a TO departamento
|
||||
DECLARE busca CURSOR FOR
|
||||
SELECT a.cod_n,a.cod_Grupo,a.cod_tipo,a.cod_Sec,a.cantidad_2, b.unidad_med, b.descrip_Esp,NULL,
|
||||
a.maquina, a.clasf_bloque
|
||||
FROM intb00006 a,intb00001 b
|
||||
WHERE a.num_Doc = otros_mov.num_doc AND
|
||||
a.cod_mov = otros_mov.cod_mov AND
|
||||
a.cod_n = b.cod_n AND
|
||||
a.cod_grupo = b.cod_grupo AND
|
||||
a.cod_tipo = b.cod_tipo AND
|
||||
a.cod_Sec = b.cod_Sec AND
|
||||
a.bodega = otros_mov.bodega
|
||||
|
||||
LET idx = 1
|
||||
FOREACH busca INTO movi2[idx].cod_n,movi2[idx].cod_grupo,
|
||||
movi2[idx].cod_tipo,movi2[idx].cod_sec,
|
||||
movi2[idx].cantidad_2, movi2[idx].unidad_med,
|
||||
movi2[idx].descrip_esp, movi2[idx].existencia,
|
||||
movi2[idx].maquina, movi2[idx].clasf_bloque
|
||||
LET idx = idx + 1
|
||||
END FOREACH
|
||||
|
||||
CALL set_count(idx-1)
|
||||
DISPLAY ARRAY movi2 TO s_movi1.*
|
||||
BEFORE DISPLAY
|
||||
CALL maquinaria()
|
||||
CALL clasf_bloque()
|
||||
ON ACTION rimprimir
|
||||
|
||||
CALL defecto(usuarios,clave,impresor) RETURNING imprime,negrilla_on,negrillas_of,
|
||||
doble_on,doble_off,comp_on,comp_off,
|
||||
doce,normal,archivo,copia
|
||||
|
||||
START REPORT formu46 TO archivo
|
||||
|
||||
FOR idx = 1 TO movi2.getLength()
|
||||
OUTPUT TO REPORT formu46(otros_mov.num_doc,otros_mov.fecha,
|
||||
otros_mov.cod_mov,otros_mov.bodega,xdescrip_mov,
|
||||
nombre_d,
|
||||
movi2[idx].*)
|
||||
END FOR
|
||||
FINISH REPORT formu46
|
||||
|
||||
RUN imprime
|
||||
END DISPLAY
|
||||
ELSE
|
||||
SELECT UNIQUE nom_dpto INTO datos1.nom_dpto FROM adtb00001 a
|
||||
WHERE a.departamento = datos1.depto_a and
|
||||
a.status_t is NULL
|
||||
|
||||
DISPLAY BY NAME datos1.num_doc,datos1.fecha,datos1.depto_a,datos1.bodega
|
||||
DISPLAY datos1.nom_dpto TO nombre_d
|
||||
|
||||
DECLARE busca36 CURSOR FOR
|
||||
SELECT a.cod_n,a.cod_Grupo,a.cod_tipo,a.cod_Sec,a.cantidad_1,a.cantidad_2,
|
||||
b.unidad_med, b.descrip_Esp
|
||||
FROM intb00006 a,intb00001 b
|
||||
WHERE a.num_Doc = datos1.num_doc AND
|
||||
a.cod_mov = 36 AND
|
||||
a.cod_n = b.cod_n AND
|
||||
a.cod_grupo = b.cod_grupo AND
|
||||
a.cod_tipo = b.cod_tipo AND
|
||||
a.cod_Sec = b.cod_Sec AND
|
||||
a.bodega = datos1.bodega
|
||||
|
||||
LET idx = 1
|
||||
FOREACH busca36 INTO movi[idx].cod_n,movi[idx].cod_grupo,
|
||||
movi[idx].cod_tipo,movi[idx].cod_sec,
|
||||
movi[idx].cantidad_1,movi[idx].cantidad_2,
|
||||
movi[idx].unidad_med,movi[idx].descrip_esp
|
||||
LET idx = idx + 1
|
||||
END FOREACH
|
||||
|
||||
CALL set_count(idx-1)
|
||||
DISPLAY ARRAY movi TO s_movi1.*
|
||||
ON ACTION rimprimir
|
||||
|
||||
CALL defecto(usuarios,clave,impresor) RETURNING imprime,negrilla_on,negrillas_of,
|
||||
doble_on,doble_off,comp_on,comp_off,
|
||||
doce,normal,archivo,copia
|
||||
|
||||
START REPORT formu36 TO archivo
|
||||
|
||||
FOR idx = 1 TO movi.getLength()
|
||||
IF movi[idx].cod_n is not null and movi[idx].cod_grupo is not null and
|
||||
movi[idx].cod_tipo is not null and movi[idx].cod_sec is not null THEN
|
||||
|
||||
LET movi[idx].cantidad_2 = movi[idx].cantidad_2 * -1
|
||||
|
||||
OUTPUT TO REPORT formu36(datos1.num_doc,datos1.fecha,
|
||||
datos1.depto_a,datos1.nom_dpto,
|
||||
movi[idx].*)
|
||||
END IF
|
||||
END FOR
|
||||
FINISH REPORT formu36
|
||||
RUN imprime
|
||||
|
||||
START REPORT formu46 TO archivo
|
||||
|
||||
FOR idx = 1 TO movi2.getLength()
|
||||
OUTPUT TO REPORT formu46(otros_mov.num_doc,otros_mov.fecha,
|
||||
otros_mov.cod_mov,otros_mov.bodega,xdescrip_mov,
|
||||
nombre_d,
|
||||
movi2[idx].*)
|
||||
END FOR
|
||||
FINISH REPORT formu46
|
||||
|
||||
RUN imprime
|
||||
END DISPLAY
|
||||
{ ELSE
|
||||
FOREACH busca INTO movi[idx].cod_n,movi[idx].cod_grupo,
|
||||
movi[idx].cod_tipo,movi[idx].cod_sec,
|
||||
movi[idx].descrip_esp,movi[idx].cantidad_2
|
||||
LET idx = idx + 1
|
||||
END FOREACH
|
||||
|
||||
|
||||
DISPLAY ARRAY movi TO s_movi1.*
|
||||
ON ACTION rimprimir
|
||||
|
||||
CALL defecto(usuarios,clave,impresor) RETURNING imprime,negrilla_on,negrillas_of,
|
||||
doble_on,doble_off,comp_on,comp_off,
|
||||
doce,normal,archivo,copia
|
||||
|
||||
# CALL configureoutput('PDF') RETURNING HANDLER
|
||||
# START REPORT formu36 TO XML HANDLER HANDLER
|
||||
|
||||
START REPORT formu36 TO archivo
|
||||
|
||||
FOR idx = 1 TO movi.getLength()
|
||||
IF movi[idx].cod_n is not null and movi[idx].cod_grupo is not null and
|
||||
movi[idx].cod_tipo is not null and movi[idx].cod_sec is not null THEN
|
||||
|
||||
LET movi[idx].cantidad_2 = movi[idx].cantidad_2 * -1
|
||||
|
||||
|
||||
OUTPUT TO REPORT formu36(datos1.num_doc,datos1.fecha,
|
||||
datos1.depto_a,datos1.nom_dpto,
|
||||
movi[idx].*)
|
||||
END IF
|
||||
END FOR
|
||||
FINISH REPORT formu36
|
||||
RUN imprime
|
||||
|
||||
END DISPLAY
|
||||
}
|
||||
END IF
|
||||
END IF
|
||||
END FUNCTION
|
||||
|
||||
REPORT formu46(x,xnombre_d,z)
|
||||
|
||||
@@ -663,24 +663,3 @@ FUNCTION inprad046()
|
||||
END INPUT
|
||||
END FUNCTION
|
||||
|
||||
FUNCTION maquinaria()
|
||||
|
||||
DEFINE
|
||||
kmaquina VARCHAR(14),
|
||||
kdescripcion CHAR(75),
|
||||
maquinas ui.ComboBox
|
||||
|
||||
LET maquinas = ui.combobox.forname("formonly.codigo")
|
||||
|
||||
DECLARE busca_maquinas1 CURSOR FOR
|
||||
SELECT a.cod_maquina, a.descrip_maquina
|
||||
FROM intb00059 a
|
||||
ORDER BY a.cod_maquina
|
||||
|
||||
CALL maquinas.clear()
|
||||
|
||||
FOREACH busca_maquinas1 INTO kmaquina, kdescripcion
|
||||
CALL maquinas.additem(kmaquina, kdescripcion)
|
||||
END FOREACH
|
||||
|
||||
END FUNCTION
|
||||
|
||||
@@ -46,6 +46,10 @@ FUNCTION inprrp005()
|
||||
us_anula CHAR(9)
|
||||
END RECORD
|
||||
DEFINE nombre_suplidor CHAR(30)
|
||||
DEFINE p_fecha RECORD
|
||||
fecha DATE
|
||||
END RECORD
|
||||
DEFINE filtro_fecha CHAR(60)
|
||||
|
||||
|
||||
OPTIONS
|
||||
@@ -61,11 +65,9 @@ FUNCTION inprrp005()
|
||||
DISPLAY " Documentos " AT 6,33
|
||||
|
||||
LET tipo_papel = 1
|
||||
CALL msgrp000(tipo_papel)
|
||||
CALL msgrp000(tipo_papel)
|
||||
|
||||
|
||||
CONSTRUCT criterio ON a.fecha,a.cod_mov,a.num_doc
|
||||
FROM fecha,cod_mov,num_doc
|
||||
INPUT BY NAME p_fecha.fecha
|
||||
|
||||
IF int_flag THEN
|
||||
LET numero_msg = 2
|
||||
@@ -73,6 +75,22 @@ FUNCTION inprrp005()
|
||||
LET int_flag = FALSE
|
||||
RETURN
|
||||
END IF
|
||||
|
||||
CONSTRUCT criterio ON a.cod_mov,a.num_doc
|
||||
FROM cod_mov,num_doc
|
||||
|
||||
IF int_flag THEN
|
||||
LET numero_msg = 2
|
||||
CALL msg(numero_msg)
|
||||
LET int_flag = FALSE
|
||||
RETURN
|
||||
END IF
|
||||
|
||||
LET filtro_fecha = ""
|
||||
IF p_fecha.fecha IS NOT NULL THEN
|
||||
LET filtro_fecha = " AND CONVERT(CHAR(10),a.fecha,103) = '",
|
||||
p_fecha.fecha USING "dd/mm/yyyy", "' "
|
||||
END IF
|
||||
CALL defecto(usuarios,clave,impresor) RETURNING imprime,negrilla_on,negrillas_of,
|
||||
doble_on,doble_off,comp_on,comp_off,
|
||||
doce,normal,archivo,copia
|
||||
@@ -82,7 +100,7 @@ FUNCTION inprrp005()
|
||||
|
||||
let selec =
|
||||
"SELECT a.cod_n, a.cod_grupo, a.cod_tipo, a.cod_sec,b.descrip_esp, ",
|
||||
" b.unidad_med,a.num_doc,CONVERT(char(10),a.fecha,104),a.cantidad_1,a.cantidad_2, ",
|
||||
" b.unidad_med,a.num_doc,CONVERT(char(10),a.fecha,103),a.cantidad_1,a.cantidad_2, ",
|
||||
" c.cod_mov,c.descrip_mov,a.conduce_no,a.fact_no,a.orden_compra, ",
|
||||
" a.cod_sp,a.cod_sp_sec,a.depto_de,a.depto_a,a.cod_seccion, ",
|
||||
" a.status_t,CONVERT(CHAR(16),a.fech_mod),a.us_mod ",
|
||||
@@ -91,7 +109,8 @@ FUNCTION inprrp005()
|
||||
" a.cod_grupo = b.cod_grupo AND a.cod_tipo = b.cod_tipo AND " ,
|
||||
" a.cod_sec = b.cod_sec AND c.cod_mov = a.cod_mov AND ",
|
||||
" b.status_t is NULL AND c.status_t is NULL ",
|
||||
"ORDER BY c.cod_mov,a.num_doc "
|
||||
filtro_fecha CLIPPED,
|
||||
"ORDER BY c.cod_mov,a.num_doc "
|
||||
|
||||
PREPARE busca FROM selec
|
||||
DECLARE accion CURSOR FOR busca
|
||||
|
||||
@@ -8,8 +8,13 @@ FECHA REALIZACION : Septiembre 29, 1992
|
||||
}
|
||||
GLOBALS "inprgb000.4gl"
|
||||
|
||||
MAIN
|
||||
MAIN
|
||||
DEFER INTERRUPT
|
||||
CALL ARG_VAL(1) RETURNING usuarios
|
||||
CALL ARG_VAL(2) RETURNING clave
|
||||
CALL ARG_VAL(3) RETURNING impresor
|
||||
CONNECT to "smarmotech" USER usuarios USING clave
|
||||
|
||||
SELECT * INTO p_companias.* FROM companias
|
||||
CALL inprrp008()
|
||||
END MAIN
|
||||
@@ -92,8 +97,10 @@ WHENEVER ERROR CONTINUE
|
||||
DISPLAY "<< Reporte Generandose ... Por Favor Espere. >>"
|
||||
AT 19,14 ATTRIBUTE (REVERSE)
|
||||
|
||||
START REPORT movimiento TO "C:\\archivo"
|
||||
FOREACH accion INTO tipo.*
|
||||
LET archivo = FGL_GETENV("FGLSPOOL"),"\\archivo_tipomov.txt"
|
||||
|
||||
START REPORT movimiento TO archivo
|
||||
FOREACH accion INTO tipo.*
|
||||
IF status = NOTFOUND THEN
|
||||
EXIT FOREACH
|
||||
ELSE
|
||||
@@ -104,7 +111,9 @@ WHENEVER ERROR CONTINUE
|
||||
|
||||
CLEAR SCREEN
|
||||
|
||||
RUN "type C:\\archivo > %USPRINT%" END FUNCTION
|
||||
LET dcmd = "type \"",archivo CLIPPED,"\" > %USPRINT%"
|
||||
RUN dcmd
|
||||
END FUNCTION
|
||||
|
||||
REPORT movimiento(x)
|
||||
DEFINE x RECORD
|
||||
|
||||
@@ -159,14 +159,11 @@ LET selec =
|
||||
|
||||
DISPLAY "<< Reporte Generandose ... Por Favor Espere. >>"
|
||||
AT 19,14 ATTRIBUTE (REVERSE)
|
||||
CALL defecto(usuarios,clave,impresor) RETURNING imprime,negrilla_on,negrillas_of,
|
||||
doble_on,doble_off,comp_on,comp_off,
|
||||
doce,normal,archivo,copia
|
||||
LET opt1 = "yes"
|
||||
CALL seleccionarsalida() RETURNING r_output
|
||||
CALL configureoutput(r_output) RETURNING handler
|
||||
START REPORT opera TO XML HANDLER HANDLER
|
||||
|
||||
CALL seleccionarsalida() RETURNING r_output
|
||||
CALL configureoutput(r_output) RETURNING handler
|
||||
START REPORT opera TO XML HANDLER HANDLER
|
||||
|
||||
PREPARE busca_p FROM selec
|
||||
DECLARE periodo SCROLL CURSOR FOR busca_p
|
||||
OPEN periodo using ano_act,datos_cons.fech_in,datos_cons.fech_fi
|
||||
@@ -185,6 +182,9 @@ LET selec =
|
||||
FINISH REPORT opera
|
||||
CLEAR SCREEN
|
||||
|
||||
IF opt1 <> "yes" THEN
|
||||
RUN imprime
|
||||
END IF
|
||||
END FUNCTION
|
||||
|
||||
REPORT opera(x)
|
||||
|
||||
@@ -179,14 +179,19 @@ LET select_ant =
|
||||
DISPLAY "<< Reporte Generandose ... Por Favor Espere. >>"
|
||||
AT 19,14 ATTRIBUTE (REVERSE)
|
||||
|
||||
#CALL defecto(usuarios,clave,impresor) RETURNING imprime,negrilla_on,negrillas_of,
|
||||
# doble_on,doble_off,comp_on,comp_off,
|
||||
# doce,normal,archivo,copia
|
||||
LET opt1 = fgl_winquestion("Atencion","Desea Reporte Grafico?",
|
||||
"no","yes|no","question",0)
|
||||
|
||||
CALL seleccionarsalida() RETURNING r_output
|
||||
CALL configureoutput(r_output) RETURNING HANDLER
|
||||
|
||||
START REPORT prt_exist TO XML HANDLER handler
|
||||
IF opt1 = "yes" THEN
|
||||
CALL seleccionarsalida() RETURNING r_output
|
||||
CALL configureOutputRp028(r_output) RETURNING HANDLER
|
||||
START REPORT prt_exist TO XML HANDLER handler
|
||||
ELSE
|
||||
CALL defecto(usuarios,clave,impresor) RETURNING imprime,negrilla_on,negrillas_of,
|
||||
doble_on,doble_off,comp_on,comp_off,
|
||||
doce,normal,archivo,copia
|
||||
START REPORT prt_exist TO archivo
|
||||
END IF
|
||||
|
||||
|
||||
LET idx_ant = 1
|
||||
@@ -277,8 +282,10 @@ END WHILE
|
||||
|
||||
FINISH REPORT prt_exist
|
||||
CLEAR SCREEN
|
||||
|
||||
RUN imprime
|
||||
|
||||
IF opt1 <> "yes" THEN
|
||||
RUN imprime
|
||||
END IF
|
||||
END FUNCTION
|
||||
|
||||
REPORT prt_exist(x)
|
||||
@@ -431,3 +438,17 @@ END FUNCTION
|
||||
PRINT COLUMN 4, ASCII 27, ASCII 80
|
||||
END REPORT
|
||||
|
||||
FUNCTION configureOutputRp028(tipo_file)
|
||||
DEFINE tipo_file CHAR(3)
|
||||
IF NOT fgl_report_loadCurrentSettings("inprrp028.4rp") THEN
|
||||
RETURN NULL
|
||||
END IF
|
||||
CALL fgl_report_setPageMargins("0.5cm", "0.5cm", "0.5cm", "0.5cm")
|
||||
CALL fgl_report_selectDevice(tipo_file)
|
||||
CALL fgl_report_configurexlsxdevice(NULL, NULL, NULL, FALSE, FALSE, NULL, 1)
|
||||
CALL fgl_report_selectPreview(TRUE)
|
||||
RETURN fgl_report_commitCurrentSettings()
|
||||
|
||||
RETURN NULL
|
||||
END FUNCTION
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
FUNCTION maquinaria()
|
||||
|
||||
DEFINE
|
||||
kmaquina VARCHAR(14),
|
||||
kdescripcion CHAR(75),
|
||||
maquinas ui.ComboBox
|
||||
|
||||
LET maquinas = ui.combobox.forname("formonly.codigo")
|
||||
|
||||
DECLARE busca_maquinas1 CURSOR FOR
|
||||
SELECT a.cod_maquina, a.descrip_maquina
|
||||
FROM intb00059 a
|
||||
ORDER BY a.cod_maquina
|
||||
|
||||
CALL maquinas.clear()
|
||||
|
||||
FOREACH busca_maquinas1 INTO kmaquina, kdescripcion
|
||||
CALL maquinas.additem(kmaquina, kdescripcion)
|
||||
END FOREACH
|
||||
|
||||
END FUNCTION
|
||||
-3213
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user