Merge remote-tracking branch 'origin/master'

This commit is contained in:
2026-02-16 15:07:21 +03:00
parent 5a6350250a
commit 0a5ffe1407
2 changed files with 16 additions and 15 deletions

View File

@@ -5,8 +5,6 @@ import (
"database/sql"
"errors"
"fmt"
"github.com/gorilla/mux"
"github.com/jung-kurt/gofpdf"
"log"
"math"
"net/http"
@@ -15,6 +13,9 @@ import (
"strconv"
"strings"
"time"
"github.com/gorilla/mux"
"github.com/jung-kurt/gofpdf"
)
/* ===========================================================
@@ -416,7 +417,7 @@ func newOrderPdf() (*gofpdf.Fpdf, error) {
pdf.AliasNbPages("")
pdf.SetFooterFunc(func() {
pdf.SetY(-10)
pdf.SetFont("dejavu", "", 8)
pdf.SetFont("dejavu", "B", 8)
txt := fmt.Sprintf("Sayfa %d/{nb}", pdf.PageNo())
pdf.CellFormat(0, 10, txt, "", 0, "R", false, 0, "")
})
@@ -724,7 +725,7 @@ func drawOrderHeader(pdf *gofpdf.Fpdf, h *OrderHeader, showDesc bool) float64 {
pdf.SetFillColor(149, 113, 22) // Baggi altın
pdf.Rect(titleX, titleY, titleW, 10, "F")
pdf.SetFont("dejavu-b", "", 13)
pdf.SetFont("dejavu", "B", 13)
pdf.SetTextColor(255, 255, 255)
pdf.SetXY(titleX+4, titleY+2)
pdf.CellFormat(titleW-8, 6, "BAGGI TEKSTİL - SİPARİŞ FORMU", "", 0, "L", false, 0, "")
@@ -740,7 +741,7 @@ func drawOrderHeader(pdf *gofpdf.Fpdf, h *OrderHeader, showDesc bool) float64 {
pdf.SetDrawColor(180, 180, 180)
pdf.Rect(boxX, boxY, boxW, boxH, "")
pdf.SetFont("dejavu-b", "", 9)
pdf.SetFont("dejavu", "B", 9)
pdf.SetTextColor(149, 113, 22)
rep := strings.TrimSpace(h.CustomerRep)
if rep == "" {
@@ -795,7 +796,7 @@ func drawOrderHeader(pdf *gofpdf.Fpdf, h *OrderHeader, showDesc bool) float64 {
pdf.Rect(marginL, y, pageW-marginL*2, descBoxH, "")
// Başlık
pdf.SetFont("dejavu-b", "", 8)
pdf.SetFont("dejavu", "B", 8)
pdf.SetTextColor(149, 113, 22)
pdf.SetXY(marginL+3, y+2)
pdf.CellFormat(40, 4, "Sipariş Genel Açıklaması:", "", 0, "L", false, 0, "")
@@ -823,7 +824,7 @@ func drawOrderHeader(pdf *gofpdf.Fpdf, h *OrderHeader, showDesc bool) float64 {
===========================================================
*/
func drawGridHeader(pdf *gofpdf.Fpdf, layout pdfLayout, startY float64, catSizes CategorySizeMap) float64 {
pdf.SetFont("dejavu-b", "", 6)
pdf.SetFont("dejavu", "B", 6)
pdf.SetDrawColor(baggiGrayBorderR, baggiGrayBorderG, baggiGrayBorderB)
pdf.SetFillColor(baggiCreamR, baggiCreamG, baggiCreamB)
pdf.SetTextColor(20, 20, 20) // 🟣 TÜM HEADER YAZILARI SİYAH
@@ -1191,7 +1192,7 @@ func drawTotalsBox(
valueX := x + w - 70 // değerlerin sağda hizalanacağı kolon
pdf.SetTextColor(149, 113, 22) // Sol başlık gold
pdf.SetFont("dejavu-b", "", 8.5)
pdf.SetFont("dejavu", "B", 8.5)
y := startY + 2
@@ -1202,7 +1203,7 @@ func drawTotalsBox(
pdf.CellFormat(80, lineH, "TOPLAM TUTAR", "", 0, "L", false, 0, "")
pdf.SetTextColor(201, 162, 39)
pdf.SetFont("dejavu-b", "", 9)
pdf.SetFont("dejavu", "B", 9)
pdf.SetXY(valueX, y)
pdf.CellFormat(65, lineH,
@@ -1217,7 +1218,7 @@ func drawTotalsBox(
if hasVat {
pdf.SetTextColor(149, 113, 22) // gold başlık
pdf.SetFont("dejavu-b", "", 8.5)
pdf.SetFont("dejavu", "B", 8.5)
pdf.SetXY(labelX, y)
pdf.CellFormat(80, lineH,
@@ -1225,7 +1226,7 @@ func drawTotalsBox(
"", 0, "L", false, 0, "")
pdf.SetTextColor(20, 20, 20)
pdf.SetFont("dejavu-b", "", 9)
pdf.SetFont("dejavu", "B", 9)
pdf.SetXY(valueX, y)
pdf.CellFormat(65, lineH,
@@ -1238,13 +1239,13 @@ func drawTotalsBox(
3⃣ KDV DAHİL TOPLAM
---------------------------------------------------- */
pdf.SetTextColor(201, 162, 39)
pdf.SetFont("dejavu-b", "", 8.5)
pdf.SetFont("dejavu", "B", 8.5)
pdf.SetXY(labelX, y)
pdf.CellFormat(80, lineH, "KDV DAHİL TOPLAM TUTAR", "", 0, "L", false, 0, "")
pdf.SetTextColor(20, 20, 20)
pdf.SetFont("dejavu-b", "", 9)
pdf.SetFont("dejavu", "B", 9)
pdf.SetXY(valueX, y)
pdf.CellFormat(65, lineH,
@@ -1273,7 +1274,7 @@ func drawGroupSummaryBar(pdf *gofpdf.Fpdf, layout pdfLayout, groupName string, t
pdf.SetDrawColor(214, 192, 106)
pdf.Rect(x, y, w, h, "DF")
pdf.SetFont("dejavu-b", "", 8.5)
pdf.SetFont("dejavu", "B", 8.5)
pdf.SetTextColor(20, 20, 20)
leftTxt := strings.ToUpper(strings.TrimSpace(groupName))