comee_core 0.2.44 → 0.2.45

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0a5388d85c1ae2d3c4c16843203f97ae1eb4f43887e6fc9ce7e54d851844077
4
- data.tar.gz: f35b9ca46c598a6929c59c5b8a2fe9cf0eb2f244cd41392a0bf2af7fe752459b
3
+ metadata.gz: a1d7353fb7039356a39d2eedf68c094b9663f68f5ad0d0a191ce50c1e98ac3bb
4
+ data.tar.gz: fc932fba0284fd9500977c93d610436981fee065638701d34ca00612f82d2915
5
5
  SHA512:
6
- metadata.gz: b699bf44a44dd78cb2ab70795a342aa930b235706950978d5547b5caf1354b51211ec6c774619ad58f748859bd6d9a8a76acb99631d563a66bba973bb401bd1c
7
- data.tar.gz: 7a454118edcdf24e1ff36f538a48c05bc96179ba50ecd55a4dc116b0324a2d7b8b6c4cdd3a102c40291d9009a85814acf821f2a5fa1c7426b71a6cfd04f7c113
6
+ metadata.gz: c0ddba235217d36dc1a6ed7109cb6d07771b053953f03b0abd9952e7dc031a208a86c76170acf0a8d7c3078acbb4c6dc694834fbf475ad3b9aa9cd7498c07332
7
+ data.tar.gz: e1cbe900f0969cf6a78e8770ed2dcf6b144bf96063bb12b795b13657b1910e55831259ad7dccc2ad2d7641d3d6d13eaa29f2f0b5631f100b555abd5d9792bc19
@@ -4,6 +4,7 @@ module Comee
4
4
  belongs_to :supplier
5
5
  has_many :purchase_order_items
6
6
 
7
+ validates :po_number, presence: true, uniqueness: true
7
8
  validates :order_date, :delivery_address, :status, :delivery_date, presence: true
8
9
  enum status: {
9
10
  draft: 0,
@@ -1,6 +1,7 @@
1
1
  class CreateComeeCorePurchaseOrders < ActiveRecord::Migration[7.1]
2
2
  def change
3
3
  create_table :comee_core_purchase_orders do |t|
4
+ t.string :po_number, null: false
4
5
  t.references :supplier,
5
6
  null: false,
6
7
  index: {name: "suppliers_on_ccpo_indx"},
@@ -9,8 +10,10 @@ class CreateComeeCorePurchaseOrders < ActiveRecord::Migration[7.1]
9
10
  t.integer :status, default: 0
10
11
  t.string :delivery_address, null: false
11
12
  t.date :delivery_date, null: false
13
+ t.string :terms
12
14
 
13
15
  t.timestamps
14
16
  end
17
+ add_index :comee_core_purchase_orders, :po_number, unique: true
15
18
  end
16
19
  end
@@ -1,5 +1,5 @@
1
1
  module Comee
2
2
  module Core
3
- VERSION = "0.2.44".freeze
3
+ VERSION = "0.2.45".freeze
4
4
  end
5
5
  end
@@ -1,9 +1,11 @@
1
1
  FactoryBot.define do
2
2
  factory :purchase_order, class: "Comee::Core::PurchaseOrder" do
3
+ po_number { Faker::Alphanumeric.alpha(number: 20) }
3
4
  supplier
4
5
  order_date { Date.current }
5
6
  status { 0 }
6
7
  delivery_address { "Korsu warehouse address" }
7
8
  delivery_date { Date.current.advance(days: 10) }
9
+ terms { Faker::Lorem.sentence }
8
10
  end
9
11
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comee_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.44
4
+ version: 0.2.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-26 00:00:00.000000000 Z
11
+ date: 2024-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_model_serializers