Chưa kết nối --:--
⚡ Kết nối Google Sheets
Dán URL sau khi deploy Apps Script để tự động lưu kết quả:
Cấu hình dữ liệu / Data setup
Tỷ lệ hao phí công đoạn
IDCông đoạnEnglish% thực tếBật
Danh mục giấy
Mã giấyGSMLoại dùngGhi chúXóa
Sau khi bấm Lưu cấu hình, dữ liệu sẽ ghi vào sheet Process_ConfigPaper_Collection. Các dropdown và tỷ lệ hao phí sẽ cập nhật lại theo dữ liệu mới.
Thông Số Sản Phẩm
Mặt trên
— g/m²
Sóng
— g/m²
Mặt dưới
— g/m²
Sóng 2
— g/m²
Mặt dưới
— g/m²
Công Đoạn Sản Xuất Hao phí: 11.00%
Thông Số Phụ

* Khổ giấy thực tế dùng tính khối lượng giấy. Có thể khác với khổ tính toán lý thuyết.

Ghi Chú
Kích Thước Tấm Phôi
Dài tấm — dọc máy
mm
Rộng tấm — ngang máy
mm
Diện tích 1 tấm phôi
Số part / khổ giấy
Khổ tính toán — lý thuyết
— – — – —
Sản Lượng & Tổ Chức Sản Xuất
Tổng tỷ lệ hao phí
Sản lượng sản xuất thực tế
Số tờ phôi cần chạy sóng
Khối Lượng Giấy Khổ TT: 1300mm
Vật tư phụ
Keo dán tai (kg)
Hồ máy sóng — thể tích (lít)
Hồ tinh bột — bột khô (kg)

* Keo: 70g/m² × (flap × H × 0.75). Hồ: 0.18L/m² × tờ phôi. Bột khô: nồng độ 24%.

Key do PTS cung cấp khi mua bản quyền. Chỉ cần nhập 1 lần.
Liên hệ PTS để được cấp License Key.
PTS
KẾT QUẢ TÍNH GIÁ — V2.5

Thông số tính giá

Nhập trực tiếp — giá bán tự cập nhật ngay.

Đơn giá nguyên vật liệu

GiấyGSMVND/kgVND/m²
Sửa đơn giá giấy và vật tư phụ, sau đó bấm Lưu giá để cập nhật sheet Material_cost / Cost_Config.

Thông tin sản phẩm

Kết quả tính giá

`); w.document.close(); setTimeout(()=>{w.focus();w.print();},250); }; window.saveCostingV2=async function(){ calcCostingV2();const R=window._COST_V2;if(!R)return; const costing={timestamp:new Date().toISOString(),email:(window.currentUser&&window.currentUser.email)||localStorage.getItem('pts_user_email')||'',productCode:R.C.pCode||'',productName:R.C.pName||'',size:R.sizeText,flute:R.fluteText,routing:R.routing,qty:R.C.qty||0,prodQty:R.C.prodQty||0,totalPaperKg:R.totalPaperKg,sellArea:R.sellArea,fxRate:R.fx,paperCostM2:R.paperM2,paperCost:R.paperCost,productionCostM2:R.productionM2,costM2:R.costM2,costProduct:R.costProduct,transport:R.transport,grossProfit:R.profit,sellM2:R.sellM2,sellM2Usd:R.sellM2Usd,sellProduct:R.sellProduct,sellProductUsd:R.sellProductUsd,orderValue:R.sellTotal,orderValueUsd:R.sellTotalUsd,materialCost:R.materialCost,materialCostM2:R.materialCostM2,materialCostProduct:R.materialCostProduct,auxCost:R.auxCost,auxCostM2:R.auxM2&&R.auxM2.total,auxSideGlueM2:R.auxM2&&R.auxM2.sideGlue,auxStarchM2:R.auxM2&&R.auxM2.starch,auxInkM2:R.auxM2&&R.auxM2.ink,sideGlueKg:R.auxM2&&R.auxM2.sideGlueKg,sideGlueUnitPrice:AUX.SIDE_GLUE_UNIT_PRICE,starchCost:(R.auxM2&&R.auxM2.starch||0)*R.sellArea,starchCostM2:R.auxM2&&R.auxM2.starch,inkGsm:5,inkUnitPrice:AUX.INK_UNIT_PRICE,inkCost:(R.auxM2&&R.auxM2.ink||0)*R.sellArea,corrGlueGsm:30,corrGlueUnitPrice:AUX.STARCH_UNIT_PRICE,note:R.C.notes||''}; try{ if(window.google&&google.script&&google.script.run){ google.script.run.withSuccessHandler(js=>{if(js&&js.status==='ok'){if(window.toast)toast(cv2t('toastSaved'),'success');}else{if(window.toast)toast(cv2t('toastSaveErr')+((js&&js.message)||'Save error'),'error');}}).withFailureHandler(e=>{if(window.toast)toast(cv2t('toastSaveErr')+(e.message||e),'error');}).saveCostingFromSidebar({costing}); return; } }catch(e){} const url=(localStorage.getItem('PTS_BOX_GS_URL')||localStorage.getItem('pts_gs_url')||'').trim(); if(!url){if(window.toast)toast(cv2t('toastNoUrl'),'error');return;} try{ const js=await ptsCostPost(url,'savecostrecord',{costing}); if(js.status==='ok'){if(window.toast)toast(cv2t('toastSaved'),'success');} else throw new Error(js.message||'Save error'); }catch(e){if(window.toast)toast(cv2t('toastSaveErr')+e.message,'error');else alert(e.message);} }; function wireInputs(){ ['cv2_transport','cv2_profit','cv2_fx','cv2_currency'].forEach(id=>{ const el=ge(id); if(el&&!el.dataset.wired){ ['input','change','keyup'].forEach(ev=>el.addEventListener(ev,calcCostingV2)); el.dataset.wired='1'; } }); } function addButton(){ const row=document.querySelector('.pane-l .btnrow'); if(!row||ge('costBtnV2'))return; const b=document.createElement('button'); b.className='btn cost-btn';b.id='costBtnV2';b.type='button'; b.innerHTML='💰 '+cv2t('btnCalc')+''; b.onclick=openCostingV2; row.insertBefore(b,row.children[1]||null); } /* Hook toggleLang to keep overlay in sync */ const _origToggle=window.toggleLang; window.toggleLang=function(){ if(typeof _origToggle==='function')_origToggle(); applyCV2Lang(); buildMaterialEditor(); if(ge('costOverlay')?.classList.contains('open'))calcCostingV2(); }; document.addEventListener('DOMContentLoaded',()=>{addButton();wireInputs();buildMaterialEditor();loadMaterialConfig();}); setTimeout(()=>{addButton();wireInputs();},300); setInterval(()=>{addButton();wireInputs();},1200); })();