Compare commits
4 Commits
v1.4.1
...
09a9e8c2f0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09a9e8c2f0 | ||
|
|
b26a6f40b9 | ||
|
|
40cb5a4d76 | ||
|
|
ecd97ae5a3 |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "app-ts",
|
"name": "app-ts",
|
||||||
"version": "1.4.1",
|
"version": "1.4.3",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "app-ts",
|
"name": "app-ts",
|
||||||
"version": "1.4.1",
|
"version": "1.4.3",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dnd-kit/core": "^6.3.1",
|
"@dnd-kit/core": "^6.3.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "app-ts",
|
"name": "app-ts",
|
||||||
"version": "1.4.1",
|
"version": "1.4.3",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/server.js",
|
"main": "dist/server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ export default async function invoicesPdfRoutes(
|
|||||||
return `<tr>
|
return `<tr>
|
||||||
<td class="row-num">${i + 1}</td>
|
<td class="row-num">${i + 1}</td>
|
||||||
<td class="desc">${escapeHtml(item.description)}</td>
|
<td class="desc">${escapeHtml(item.description)}</td>
|
||||||
<td class="center">${formatNum(qty, qtyDecimals)}</td>
|
<td class="center">${formatNum(qty, qtyDecimals)}${item.unit ? ` / ${escapeHtml(item.unit)}` : ""}</td>
|
||||||
<td class="right">${formatNum(unitPrice)}</td>
|
<td class="right">${formatNum(unitPrice)}</td>
|
||||||
<td class="right">${formatNum(lineSubtotal)}</td>
|
<td class="right">${formatNum(lineSubtotal)}</td>
|
||||||
<td class="center">${applyVat ? Math.floor(vatRate) : 0}%</td>
|
<td class="center">${applyVat ? Math.floor(vatRate) : 0}%</td>
|
||||||
@@ -944,9 +944,9 @@ ${indentCSS}
|
|||||||
<table class="items">
|
<table class="items">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="center" style="width:5%">${escapeHtml(t.col_no)}</th>
|
<th class="center" style="width:4%">${escapeHtml(t.col_no)}</th>
|
||||||
<th style="width:30%">${escapeHtml(t.col_desc)}</th>
|
<th style="width:28%">${escapeHtml(t.col_desc)}</th>
|
||||||
<th class="center" style="width:9%">${escapeHtml(t.col_qty)}</th>
|
<th class="center" style="width:12%">${escapeHtml(t.col_qty)}</th>
|
||||||
<th class="right" style="width:11%">${escapeHtml(t.col_unit_price)}</th>
|
<th class="right" style="width:11%">${escapeHtml(t.col_unit_price)}</th>
|
||||||
<th class="right" style="width:11%">${escapeHtml(t.col_price)}</th>
|
<th class="right" style="width:11%">${escapeHtml(t.col_price)}</th>
|
||||||
<th class="center" style="width:7%">${escapeHtml(t.col_vat_pct)}</th>
|
<th class="center" style="width:7%">${escapeHtml(t.col_vat_pct)}</th>
|
||||||
|
|||||||
@@ -1087,7 +1087,6 @@ export async function bulkCreateAttendance(data: BulkAttendanceData) {
|
|||||||
const dow = date.getDay();
|
const dow = date.getDay();
|
||||||
|
|
||||||
if (dow === 0 || dow === 6) continue;
|
if (dow === 0 || dow === 6) continue;
|
||||||
if (isHoliday(dateStr)) continue;
|
|
||||||
|
|
||||||
if (existingSet.has(`${userId}:${dateStr}`)) {
|
if (existingSet.has(`${userId}:${dateStr}`)) {
|
||||||
skipped++;
|
skipped++;
|
||||||
@@ -1095,6 +1094,20 @@ export async function bulkCreateAttendance(data: BulkAttendanceData) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const shiftDate = new Date(Date.UTC(yr, mo - 1, day, 12, 0, 0));
|
const shiftDate = new Date(Date.UTC(yr, mo - 1, day, 12, 0, 0));
|
||||||
|
|
||||||
|
if (isHoliday(dateStr)) {
|
||||||
|
await prisma.attendance.create({
|
||||||
|
data: {
|
||||||
|
user_id: userId,
|
||||||
|
shift_date: shiftDate,
|
||||||
|
leave_type: "holiday",
|
||||||
|
leave_hours: 8,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
inserted++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
await prisma.attendance.create({
|
await prisma.attendance.create({
|
||||||
data: {
|
data: {
|
||||||
user_id: userId,
|
user_id: userId,
|
||||||
|
|||||||
Reference in New Issue
Block a user