Update monthly order app
This commit is contained in:
parent
7dd246b585
commit
a8d20d58d9
|
|
@ -255,8 +255,33 @@ func (s *MonthlyOrderService) SubmitOrdersToTelegram(ctx context.Context, manage
|
|||
}
|
||||
|
||||
var contentBuilder strings.Builder
|
||||
contentBuilder.WriteString(fmt.Sprintf("🏢 Клиент: %s\n", *order.ClientName))
|
||||
// ... (здесь ваш код сборки текста contentBuilder.WriteString из прошлого ответа) ...
|
||||
contentBuilder.WriteString(fmt.Sprintf("Клиент: %s\n", *order.ClientName))
|
||||
|
||||
if order.Decade != nil {
|
||||
contentBuilder.WriteString(fmt.Sprintf("Декада: %s\n", *order.Decade))
|
||||
}
|
||||
if order.Delivery != nil {
|
||||
contentBuilder.WriteString(fmt.Sprintf("Доставка: %s\n", *order.Delivery))
|
||||
}
|
||||
if order.Conditions != nil {
|
||||
contentBuilder.WriteString(fmt.Sprintf("⚖️ Условия: %s\n", *order.Conditions))
|
||||
}
|
||||
if order.PaymentForm != nil {
|
||||
contentBuilder.WriteString(fmt.Sprintf("💳 Оплата: %s\n", *order.PaymentForm))
|
||||
}
|
||||
|
||||
contentBuilder.WriteString("\n📦 <b>Заказ:</b>\n")
|
||||
for _, item := range items {
|
||||
contentBuilder.WriteString(fmt.Sprintf("- %s (%s): %d шт.\n", *item.NomenclatureName, *item.NomenclatureType, *item.Quantity))
|
||||
}
|
||||
|
||||
if order.ManagerComment != nil {
|
||||
contentBuilder.WriteString(fmt.Sprintf("\n💬 Комментарий: %s", *order.ManagerComment))
|
||||
}
|
||||
if order.FreeFormComment != nil && *order.FreeFormComment != "" {
|
||||
contentBuilder.WriteString(fmt.Sprintf("\n✍️ Доп. комментарий: %s", *order.FreeFormComment))
|
||||
}
|
||||
|
||||
contentStr := contentBuilder.String()
|
||||
status := "pending"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue