hr_lite 0.71.0 → 0.74.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 12ce663b358b8accecc12485aebc7543006d7e933dbf7fbf5ca3b2a01c1814cf
4
- data.tar.gz: b4633c9b5c5531a367470a83e5e586caf24f1d5e7dfeaa52fa4d377228e1c4ea
3
+ metadata.gz: 0b2109e141e5eecc5e10199caf0b1ac0e32e9ea87cd12f7b78a10a28d10aab88
4
+ data.tar.gz: b0513cc225cc973cc280e33c02a76eb1900ac9c33fb10db7584ca8cc8c90edec
5
5
  SHA512:
6
- metadata.gz: c4de23caaac94f39cb138e38eddda9ecd6fea9fbf5f18e9bcacaa9382c7a340bc5b35e92ec2812afc62919d25c42e3eb12fafc2eaf3e65eac925efb4f3548798
7
- data.tar.gz: 7cc7549ca269cd6a5c74db8b67ded123fd96824c884199bfc58d13122d05db5cef28e46b3e9cd2d75a207f839d5519963ab79f633037ee9dbe0120536f2784a2
6
+ metadata.gz: 24b25c03be5e0585056918e8e9d309415c560b541c7620197cc21159f44e9f0d5979bd996af7689fc5919eadbf645e38349707262241c3bf0694f7d33409e3f4
7
+ data.tar.gz: 26ab62d69fb38a81dc98ffcd2fc11fc135539762e1844391ac45d1f622ca49bc86593c7d9e5e9063827c169d1a780c0d0223b1b716ef8c8132015f3ccf362bae
data/CHANGELOG.md CHANGED
@@ -7,6 +7,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.74.0] - 2026-12-02
11
+
12
+ ### Added
13
+
14
+ - **Payroll can leave a deduction off one person's slip for one month.** A slip in review has a tick box per deduction: unpaid leave days, PF, ESI, professional tax, other deductions, loan repayment and TDS. An unticked one is not taken, a recompute keeps it off, and the audit log names it. "Pay full salary" unticks them all. A skipped loan instalment stays owed. One migration: `skipped_deductions` on salary slips.
15
+
16
+ ## [0.73.0] - 2026-12-02
17
+
18
+ ### Added
19
+
20
+ - A one-off deduction's note shows under it on the payslip and in the PDF. Slips computed before this keep no note until recomputed.
21
+ - Each row of a payroll run links to that person's attendance for the month.
22
+
23
+ No migrations.
24
+
25
+ ## [0.72.0] - 2026-12-02
26
+
27
+ ### Added
28
+
29
+ - **An award has a certificate.** Home links each award to its page, which opens the certificate as a PDF. The winner's email links there too. The certificate carries the award, the period, the winner's name and the company; it does not print the citation.
30
+ - **The winner can share it on LinkedIn.** The link opens a public page for that one certificate, reached by a signed id, with no login. It needs `config.public_url_base`.
31
+ - **The winner can ask for a printed copy.** It is an Ask HR request in the new "Award certificate" category, so the people who answer requests get the bell and the email.
32
+ - **The whole team hears who won.** A new `award.team_notice` bells and emails every active employee but the winner, with a link to the certificate page and no citation. Hosts can mute either channel in the notification matrix.
33
+
34
+ No migrations.
35
+
36
+ ## [0.71.1] - 2026-12-02
37
+
38
+ ### Fixed
39
+
40
+ - The change table in a leadership email shows text as it was written, with its line breaks. It printed the quotes and a literal `\r\n`.
41
+ - An event email keeps the paragraphs of its body. A multi-line award citation arrived as one block.
42
+
43
+ No migrations.
44
+
10
45
  ## [0.71.0] - 2026-11-20
11
46
 
12
47
  ### Added
@@ -41,16 +41,19 @@ module HrLite
41
41
  return redirect_to admin_salary_slip_path(slip), alert: "TDS cannot be negative."
42
42
  end
43
43
 
44
+ # Ticked boxes are the deductions to take; a post without them keeps the slip's own.
45
+ deduct = params[:pay_full] ? [] : params.dig(:salary_slip, :deduct)
46
+ skip = deduct ? SalarySlip::SKIPPABLE.keys - deduct : slip.skipped_deductions.split
44
47
  attributes = SlipBuilder.call(
45
48
  run: run, user: slip.user, structure: structure, profile: profile,
46
- lop_override: lop, tds_override: tds
49
+ lop_override: lop, tds_override: tds, skip: skip
47
50
  )
48
51
  slip.update!(attributes)
49
52
 
50
53
  AuditLog.record!(
51
54
  action: "override", subject: slip, actor: hr_current_user,
52
55
  changes: { "period" => run.label, "employee" => HrLite.display_name(slip.user),
53
- "lop_override" => lop_override || "cleared",
56
+ "lop_override" => lop_override || "cleared", "not_deducted" => skip.join(" ").presence || "none",
54
57
  "tds_override" => tds_override ? "[changed]" : "cleared" }
55
58
  )
56
59
  redirect_to admin_salary_slip_path(slip), notice: "Slip recomputed with overrides."
@@ -0,0 +1,37 @@
1
+ module HrLite
2
+ # An award's certificate: its page, its PDF, and the public page a winner shares.
3
+ class AwardsController < ApplicationController
4
+ # WHY no login on :shared: the winner posts this link on LinkedIn. The
5
+ # signed id in it opens that one certificate, which carries no citation.
6
+ skip_before_action :hr_authenticate!, only: :shared
7
+ skip_before_action HrLite.config.authenticate_method, only: :shared, raise: false
8
+
9
+ def show
10
+ @award = Award.find(params[:id])
11
+ @print_requested = HrRequest.open_requests.where(user_id: @award.user_id, subject: @award.print_subject).pick(:created_at)
12
+ certificate
13
+ end
14
+
15
+ def shared
16
+ @award = Award.find_signed(params[:token], purpose: :certificate) || raise(ActiveRecord::RecordNotFound)
17
+ certificate(layout: "hr_lite/public")
18
+ end
19
+
20
+ private
21
+
22
+ def certificate(layout: nil)
23
+ respond_to do |format|
24
+ format.html { render layout: layout if layout }
25
+ format.pdf do
26
+ name = HrLite.display_name(@award.user)
27
+ pdf = PdfRenderer.render(template: "hr_lite/awards/pdf", assigns: { award: @award },
28
+ cache_key: [ "hr_lite_award_v1", @award.id, @award.updated_at.to_i, name ].join("/"))
29
+ next head(:not_found) unless pdf
30
+
31
+ send_data pdf, filename: "#{@award.title.parameterize}-#{@award.period_start}.pdf",
32
+ type: "application/pdf", disposition: "inline"
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -24,6 +24,7 @@ module HrLite
24
24
  end
25
25
 
26
26
  def title = "Employee of the #{kind}"
27
+ def print_subject = "Printed certificate — #{title}, #{period_label}"
27
28
 
28
29
  def period_label
29
30
  case kind
@@ -44,7 +45,11 @@ module HrLite
44
45
 
45
46
  def notify
46
47
  Notifications.publish("award.won", title: "You are #{title} — #{period_label}", body: citation,
47
- path: "/timeline", bell_to: [ user ], email_to: [ user ])
48
+ path: "/awards/#{id}", bell_to: [ user ], email_to: [ user ])
49
+ # The team hears who won, not the citation: that is written to the winner.
50
+ team = HrLite.active_employees.reject { |member| member.id == user_id }
51
+ Notifications.publish("award.team_notice", title: "#{HrLite.display_name(user)} is #{title} — #{period_label}",
52
+ path: "/awards/#{id}", bell_to: team, email_to: team)
48
53
  end
49
54
  end
50
55
  end
@@ -8,7 +8,7 @@ module HrLite
8
8
 
9
9
  CATEGORIES = %w[
10
10
  salary_certificate employment_certificate address_change bank_change
11
- document_request payroll_query tax_query insurance_query policy_query id_card other
11
+ document_request payroll_query tax_query insurance_query policy_query award_certificate id_card other
12
12
  ].freeze
13
13
 
14
14
  belongs_to :user, class_name: HrLite.config.user_class
@@ -7,6 +7,10 @@ module HrLite
7
7
  class SalarySlip < ApplicationRecord
8
8
  include EncryptedMoney
9
9
 
10
+ # Deductions payroll may leave off one person's slip for one month.
11
+ SKIPPABLE = { "lop" => "Unpaid leave days", "pf" => "Provident fund", "esi" => "ESI", "pt" => "Professional tax",
12
+ "other" => "Other deductions", "loan" => "Loan repayment", "tds" => "Income tax (TDS)" }.freeze
13
+
10
14
  belongs_to :payroll_run
11
15
  belongs_to :user, class_name: HrLite.config.user_class
12
16
 
@@ -63,7 +67,7 @@ module HrLite
63
67
 
64
68
  # Bump the version when the PDF template changes, or the old layout serves until the cache expires.
65
69
  def pdf_cache_key
66
- [ "hr_lite_slip_v3", id, updated_at.to_i, payroll_run.status,
70
+ [ "hr_lite_slip_v4", id, updated_at.to_i, payroll_run.status,
67
71
  user_profile&.updated_at.to_i ].join("/")
68
72
  end
69
73
 
@@ -42,7 +42,7 @@ module HrLite
42
42
  slip = @run.salary_slips.find_or_initialize_by(user_id: user.id)
43
43
  attributes = SlipBuilder.call(
44
44
  run: @run, user: user, structure: structure, profile: profile,
45
- lop_override: slip.lop_override, tds_override: slip.tds_override
45
+ lop_override: slip.lop_override, tds_override: slip.tds_override, skip: slip.skipped_deductions.split
46
46
  )
47
47
  if attributes[:total_deductions] > attributes[:gross_earnings]
48
48
  warnings << "Deductions exceed earnings for #{HrLite.display_name(user)} — " \
@@ -4,11 +4,13 @@ module HrLite
4
4
  # rounded by its own statutory rule exactly once; net pay is a plain
5
5
  # subtraction of already-rounded lines, so nothing can drift.
6
6
  class SlipBuilder
7
- def self.call(run:, user:, structure:, profile:, lop_override: nil, tds_override: nil)
8
- new(run, user, structure, profile, lop_override, tds_override).call
7
+ # `skip` holds SalarySlip::SKIPPABLE codes: deductions not taken this month.
8
+ def self.call(run:, user:, structure:, profile:, lop_override: nil, tds_override: nil, skip: [])
9
+ new(run, user, structure, profile, lop_override, tds_override, skip).call
9
10
  end
10
11
 
11
- def initialize(run, user, structure, profile, lop_override, tds_override)
12
+ def initialize(run, user, structure, profile, lop_override, tds_override, skip = [])
13
+ @skip = skip
12
14
  @run = run
13
15
  @user = user
14
16
  @structure = structure
@@ -24,6 +26,7 @@ module HrLite
24
26
  # Clamped defensively: a stored negative override (written before the
25
27
  # controller bounded them) would otherwise pay more days than the month has.
26
28
  lop = [ Money.d(@lop_override || summary[:lop_days]), BigDecimal(0) ].max
29
+ lop = BigDecimal(0) if @skip.include?("lop")
27
30
  # `upcoming` is normally zero — PayrollRun refuses a month that has not
28
31
  # ended — but subtracting it means a legacy run for an open month cannot
29
32
  # pay for days nobody has worked yet.
@@ -48,7 +51,7 @@ module HrLite
48
51
  deductions = []
49
52
  employer_costs = {}
50
53
 
51
- if @structure.pf_applicable
54
+ if @structure.pf_applicable && @skip.exclude?("pf")
52
55
  pf = Calculators::Pf.call(basic_earned: basic_earned,
53
56
  on_full_basic: @structure.pf_on_full_basic, rates: @rates[:pf])
54
57
  deductions << { code: "pf_employee", label: "Provident fund", amount: pf.employee,
@@ -60,7 +63,7 @@ module HrLite
60
63
  end
61
64
 
62
65
  esi = Calculators::Esi.call(monthly_gross: @structure.esi_reference_gross(@run.period_month), gross_earned: esi_gross,
63
- applicable: @structure.esi_applicable, rates: @rates[:esi])
66
+ applicable: @structure.esi_applicable && @skip.exclude?("esi"), rates: @rates[:esi])
64
67
  if esi.applicable?
65
68
  deductions << { code: "esi_employee", label: "ESI", amount: esi.employee }
66
69
  employer_costs[:esi_employer] = esi.employer
@@ -68,9 +71,9 @@ module HrLite
68
71
 
69
72
  pt = Calculators::ProfessionalTax.call(state: @structure.pt_state, gross_earned: gross_earned,
70
73
  period_month: @run.period_month, rates: @rates[:pt])
71
- deductions << { code: "pt", label: "Professional tax", amount: pt } if pt.positive?
74
+ deductions << { code: "pt", label: "Professional tax", amount: pt } if pt.positive? && @skip.exclude?("pt")
72
75
 
73
- deductions.concat(extra_deductions)
76
+ deductions.concat(extra_deductions) if @skip.exclude?("other")
74
77
 
75
78
  fy =SalarySlip.fy_to_date(@user, @run.period_month)
76
79
  tds = Calculators::Tds.call(
@@ -86,9 +89,9 @@ module HrLite
86
89
  months_remaining: months_remaining_in_fy,
87
90
  declared_annual_deductions: annual_deductions,
88
91
  rates: @rates[:income_tax],
89
- override: @tds_override
92
+ override: @skip.include?("tds") ? 0 : @tds_override
90
93
  )
91
- loan = loan_instalment(gross_earned - deductions.sum(BigDecimal(0)) { |row| row[:amount] } - tds.monthly)
94
+ loan = loan_instalment(gross_earned - deductions.sum(BigDecimal(0)) { |row| row[:amount] } - tds.monthly) if @skip.exclude?("loan")
92
95
  deductions << loan if loan
93
96
  deductions << { code: "tds", label: "Income tax (TDS)", amount: tds.monthly } if tds.monthly.positive?
94
97
 
@@ -109,6 +112,7 @@ module HrLite
109
112
  lop_days: Money.d(summary[:lop_days]),
110
113
  lop_override: @lop_override,
111
114
  tds_override: @tds_override,
115
+ skipped_deductions: @skip.join(" "),
112
116
  earnings: serialize_rows(earnings + claims),
113
117
  deductions: serialize_rows(deductions),
114
118
  employer_costs: employer_costs.transform_values { |v| v.to_s("F") }.to_json,
@@ -163,7 +167,7 @@ module HrLite
163
167
  end
164
168
  next unless amount.positive?
165
169
 
166
- row = { code: component.code, label: component.label, amount: amount }
170
+ row = { code: component.code, label: component.label, amount: amount, note: item.note.presence }.compact
167
171
  if component.earning?
168
172
  earnings << row.merge(excluded_from_esi: !component.counts_for_esi)
169
173
  else
@@ -82,7 +82,7 @@
82
82
  <td data-label="Gross" class="hrl-num"><%= hrl_money(slip.gross_earnings) %></td>
83
83
  <td data-label="Deductions" class="hrl-num"><%= hrl_money(slip.total_deductions) %></td>
84
84
  <td data-label="Net" class="hrl-num"><strong><%= hrl_money(slip.net_pay) %></strong></td>
85
- <td data-label=""><a class="hrl-btn" href="<%= hr_lite.admin_salary_slip_path(slip) %>">Detail</a></td>
85
+ <td data-label=""><a class="hrl-btn" href="<%= hr_lite.admin_salary_slip_path(slip) %>">Detail</a><% if hr_can?("attendance.view", scope: :all) %><a class="hrl-btn" href="<%= hr_lite.admin_attendance_path(slip.user_id, month: @run.period_month.strftime("%Y-%m")) %>">Attendance</a><% end %></td>
86
86
  </tr>
87
87
  <% end %>
88
88
  </tbody>
@@ -35,9 +35,25 @@
35
35
  <%= f.label :tds_override, "Monthly TDS override" %>
36
36
  <%= f.number_field :tds_override, step: 1, value: @slip.tds_override %>
37
37
  </div>
38
+ <fieldset class="hrl-field">
39
+ <legend>Deduct this month</legend>
40
+ <p class="hrl-small hrl-muted">Untick one to leave it off this slip. PF, ESI, professional tax and TDS stay owed by law; check with your CA.</p>
41
+ <%= hidden_field_tag "salary_slip[deduct][]", "" %>
42
+ <% HrLite::SalarySlip::SKIPPABLE.each do |code, label| %>
43
+ <div class="hrl-field hrl-field--check">
44
+ <%= check_box_tag "salary_slip[deduct][]", code, @slip.skipped_deductions.split.exclude?(code), id: "deduct_#{code}" %>
45
+ <%= label_tag "deduct_#{code}", label %>
46
+ </div>
47
+ <% end %>
48
+ </fieldset>
38
49
  <div class="hrl-form-actions">
39
50
  <%= f.submit "Recompute with overrides", class: "hrl-btn hrl-btn--primary" %>
40
51
  </div>
52
+ <%# Its own row: two long labels do not fit side by side on a phone. %>
53
+ <div class="hrl-form-actions">
54
+ <%= button_tag "Pay full salary", name: "pay_full", value: "1", class: "hrl-btn",
55
+ data: { turbo_confirm: "Take no deductions from this slip this month?" } %>
56
+ </div>
41
57
  <% end %>
42
58
  </section>
43
59
  <% end %>
@@ -0,0 +1,17 @@
1
+ <% company = HrLite.config.company.call %>
2
+ <% name = company[:brand].presence || company[:name] %>
3
+ <div style="border:3px double #111; padding:140px 40px; text-align:center; color:#111;">
4
+ <% if company[:logo_url].present? %>
5
+ <img src="<%= company[:logo_url] %>" alt="<%= name %>" style="height:64px;">
6
+ <% end %>
7
+ <div style="font-size:13px; letter-spacing:4px; color:#666; margin-top:100px;">CERTIFICATE OF RECOGNITION</div>
8
+ <div style="font-size:42px; font-weight:700; margin-top:28px;">Employee of the <%= @award.kind.capitalize %></div>
9
+ <div style="font-size:20px; margin-top:10px;"><%= @award.period_label %></div>
10
+ <div style="font-size:15px; color:#666; margin-top:120px;">Presented to</div>
11
+ <div style="font-size:36px; margin-top:14px; padding-bottom:14px; border-bottom:1px solid #111; display:inline-block;"><%= HrLite.display_name(@award.user) %></div>
12
+ <div style="font-size:15px; line-height:1.6; margin-top:28px;">in recognition of outstanding work and dedication.</div>
13
+ <div style="font-size:12px; color:#666; margin-top:190px;">
14
+ Issued by <%= company[:name].presence || name %> on <%= @award.created_at.to_date.strftime("%d %B %Y") %>
15
+ <% if (contact = company.values_at(:phone, :email, :website).compact_blank).any? %><br><%= contact.join(" · ") %><% end %>
16
+ </div>
17
+ </div>
@@ -0,0 +1,12 @@
1
+ <% title = "#{HrLite.display_name(@award.user)} — #{@award.title}, #{@award.period_label}" %>
2
+ <% content_for(:page_title) { title } %>
3
+ <% content_for(:head) do %>
4
+ <meta property="og:title" content="<%= title %>">
5
+ <meta property="og:description" content="Certificate of recognition from <%= HrLite.config.company.call[:name] %>.">
6
+ <% if (logo = HrLite.config.company.call[:email_logo_url]).present? %><meta property="og:image" content="<%= logo %>"><% end %>
7
+ <% end %>
8
+ <div class="hrl-page__head">
9
+ <h1 class="hrl-page__title"><%= @award.title %> — <%= @award.period_label %></h1>
10
+ <p class="hrl-page__sub">Awarded to <strong><%= HrLite.display_name(@award.user) %></strong> in recognition of outstanding work and dedication.</p>
11
+ </div>
12
+ <a class="hrl-btn hrl-btn--primary" href="<%= hr_lite.shared_award_path(params[:token], format: :pdf) %>">Open certificate</a>
@@ -0,0 +1,24 @@
1
+ <% content_for(:page_title) { "Certificate" } %>
2
+ <% share_url = HrLite.public_url("/awards/shared/#{@award.signed_id(purpose: :certificate)}") %>
3
+ <div class="hrl-page__head">
4
+ <h1 class="hrl-page__title"><%= @award.title %> — <%= @award.period_label %></h1>
5
+ <p class="hrl-page__sub">Awarded to <strong><%= hr_display_name(@award.user) %></strong>.</p>
6
+ </div>
7
+ <section class="hrl-card">
8
+ <div class="hrl-row">
9
+ <a class="hrl-btn hrl-btn--primary" href="<%= hr_lite.award_path(@award, format: :pdf) %>" target="_blank" rel="noopener">Open certificate</a>
10
+ <% if @award.user_id == hr_current_user.id %>
11
+ <% if share_url %>
12
+ <a class="hrl-btn" href="https://www.linkedin.com/sharing/share-offsite/?url=<%= CGI.escape(share_url) %>" target="_blank" rel="noopener">Share on LinkedIn</a>
13
+ <% end %>
14
+ <% unless @print_requested %>
15
+ <%= button_to "Request printed copy", hr_lite.hr_requests_path, class: "hrl-btn",
16
+ params: { hr_request: { category: "award_certificate", subject: @award.print_subject,
17
+ body: HrLite.public_url("/awards/#{@award.id}.pdf") } } %>
18
+ <% end %>
19
+ <% end %>
20
+ </div>
21
+ <% if @print_requested %>
22
+ <p class="hrl-small hrl-muted">Printed copy requested on <%= @print_requested.to_date.strftime("%d %b %Y") %>.</p>
23
+ <% end %>
24
+ </section>
@@ -1,5 +1,5 @@
1
1
  <h1><%= @heading %></h1>
2
- <% if @body.present? %><p><%= @body %></p><% end %>
2
+ <%= simple_format(@body) if @body.present? %>
3
3
  <% if @lines.any? %>
4
4
  <ul class="lines">
5
5
  <% @lines.each do |line| %><li><%= line %></li><% end %>
@@ -13,7 +13,9 @@
13
13
  <td><%= attr.to_s.humanize %></td>
14
14
  <td>
15
15
  <% if change.is_a?(Array) %>
16
- <%= change[0].inspect %> &rarr; <%= change[1].inspect %>
16
+ <%# Text as written, with its line breaks — .inspect printed the quotes and a literal \r\n. %>
17
+ <% shown = change.map { |v| v.is_a?(String) ? safe_join(v.split(/\r?\n/), tag.br) : v.inspect } %>
18
+ <%= shown[0] %> &rarr; <%= shown[1] %>
17
19
  <% else %>
18
20
  <%= change %>
19
21
  <% end %>
@@ -8,7 +8,7 @@
8
8
  <% if @diff.present? %>
9
9
  Changes:
10
10
  <% @diff.each do |attr, change| %>
11
- - <%= attr.to_s.humanize %>: <%= change.is_a?(Array) ? "#{change[0].inspect} -> #{change[1].inspect}" : change %>
11
+ - <%= attr.to_s.humanize %>: <%= change.is_a?(Array) ? change.map { |v| v.is_a?(String) ? v : v.inspect }.join(" -> ") : change %>
12
12
  <% end %>
13
13
  <% end %>
14
14
  <% if @cta_url %>
@@ -66,6 +66,7 @@
66
66
  <div class="hrl-row">
67
67
  <a class="hrl-card__link" href="<%= hr_lite.person_timeline_path(award.user_id) %>"><%= hr_display_name(award.user) %></a>
68
68
  <span class="hrl-badge"><%= award.title %> · <%= award.period_label %></span>
69
+ <a class="hrl-card__link" href="<%= hr_lite.award_path(award) %>">Certificate</a>
69
70
  </div>
70
71
  <div class="hrl-feed__meta"><%= award.citation %></div>
71
72
  </div>
@@ -31,7 +31,7 @@
31
31
  <table class="hrl-table">
32
32
  <tbody>
33
33
  <% slip.deductions_rows.each do |row| %>
34
- <tr><td><%= row["label"] %></td><td class="hrl-num"><%= hrl_money(row["amount"]) %></td></tr>
34
+ <tr><td><%= row["label"] %><% if row["note"] %><div class="hrl-small hrl-muted"><%= row["note"] %></div><% end %></td><td class="hrl-num"><%= hrl_money(row["amount"]) %></td></tr>
35
35
  <% end %>
36
36
  <tr><td><strong>Total deductions</strong></td><td class="hrl-num"><strong><%= hrl_money(slip.total_deductions) %></strong></td></tr>
37
37
  </tbody>
@@ -56,7 +56,7 @@
56
56
  <thead><tr><th>Deductions</th><th class="num">Amount</th></tr></thead>
57
57
  <tbody>
58
58
  <% @slip.deductions_rows.each do |row| %>
59
- <tr><td><%= row["label"] %></td><td class="num"><%= HrLite::Money.format(row["amount"]) %></td></tr>
59
+ <tr><td><%= row["label"] %><% if row["note"] %> (<%= row["note"] %>)<% end %></td><td class="num"><%= HrLite::Money.format(row["amount"]) %></td></tr>
60
60
  <% end %>
61
61
  <tr class="total"><td>Total deductions</td><td class="num"><%= HrLite::Money.format(@slip.total_deductions) %></td></tr>
62
62
  </tbody>
@@ -5,6 +5,7 @@
5
5
  <title><%= [ content_for(:page_title), company[:brand].presence || company[:name] ].compact.join(" · ") %></title>
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
7
7
  <meta name="robots" content="noindex, nofollow">
8
+ <%= yield :head %>
8
9
  <%= csrf_meta_tags %>
9
10
  <%= csp_meta_tag %>
10
11
  <%= stylesheet_link_tag "hr_lite/hr_lite", media: "all" %>
data/config/routes.rb CHANGED
@@ -60,6 +60,8 @@ HrLite::Engine.routes.draw do
60
60
  get "calendar", to: "calendar#show"
61
61
  get "search", to: "search#show", as: :search
62
62
  resources :salary_slips, only: %i[index show]
63
+ get "awards/shared/:token", to: "awards#shared", as: :shared_award
64
+ resources :awards, only: :show
63
65
  resource :employee_profile, only: :show, path: "profile"
64
66
  patch "id_card/photo", to: "id_cards#photo", as: :id_card_photo
65
67
  get "id_card(/:user_id)", to: "id_cards#show", as: :id_card
@@ -0,0 +1,7 @@
1
+ class AddSkippedDeductionsToHrLiteSalarySlips < ActiveRecord::Migration[8.1]
2
+ # Deductions payroll chose not to take from this person this month, as
3
+ # space-separated SalarySlip::SKIPPABLE codes.
4
+ def change
5
+ add_column :hr_lite_salary_slips, :skipped_deductions, :string, null: false, default: ""
6
+ end
7
+ end
@@ -35,6 +35,7 @@ module HrLite
35
35
  "pip.started" => { bell: true, email: true, leadership_email: false, leadership_bell: false },
36
36
  "pip.closed" => { bell: true, email: true, leadership_email: false, leadership_bell: false },
37
37
  "award.won" => { bell: true, email: true, leadership_email: false, leadership_bell: false },
38
+ "award.team_notice" => { bell: true, email: true, leadership_email: false, leadership_bell: false },
38
39
  "policy.changed" => { bell: false, email: false, leadership_email: true, leadership_bell: true },
39
40
  # An approval past its deadline. Leadership hears too — a decision
40
41
  # nobody is making is a process problem, not just one person's inbox.
@@ -1,3 +1,3 @@
1
1
  module HrLite
2
- VERSION = "0.71.0"
2
+ VERSION = "0.74.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hr_lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.71.0
4
+ version: 0.74.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kshitiz sinha
@@ -135,6 +135,7 @@ files:
135
135
  - app/controllers/hr_lite/appraisals_controller.rb
136
136
  - app/controllers/hr_lite/approvals_controller.rb
137
137
  - app/controllers/hr_lite/attendance_controller.rb
138
+ - app/controllers/hr_lite/awards_controller.rb
138
139
  - app/controllers/hr_lite/benefits_controller.rb
139
140
  - app/controllers/hr_lite/calendar_controller.rb
140
141
  - app/controllers/hr_lite/career_controller.rb
@@ -396,6 +397,9 @@ files:
396
397
  - app/views/hr_lite/attendance/_trail.html.erb
397
398
  - app/views/hr_lite/attendance/_work_mode.html.erb
398
399
  - app/views/hr_lite/attendance/show.html.erb
400
+ - app/views/hr_lite/awards/pdf.html.erb
401
+ - app/views/hr_lite/awards/shared.html.erb
402
+ - app/views/hr_lite/awards/show.html.erb
399
403
  - app/views/hr_lite/benefits/index.html.erb
400
404
  - app/views/hr_lite/calendar/show.html.erb
401
405
  - app/views/hr_lite/career/show.html.erb
@@ -549,6 +553,7 @@ files:
549
553
  - db/migrate/20261022090100_add_allow_sunday_to_hr_lite_hiring_campaigns.rb
550
554
  - db/migrate/20261022120000_add_purpose_to_hr_lite_hiring_templates.rb
551
555
  - db/migrate/20261116090000_backfill_hr_lite_enforced_permission_keys.rb
556
+ - db/migrate/20261202090000_add_skipped_deductions_to_hr_lite_salary_slips.rb
552
557
  - lib/generators/hr_lite/install/install_generator.rb
553
558
  - lib/generators/hr_lite/install/templates/AFTER_INSTALL
554
559
  - lib/generators/hr_lite/install/templates/initializer.rb