<field name="vendacct" reporter:datatype="text" reporter:label="Vendor Account Number"/>
<field name="vendcode" reporter:datatype="text" reporter:label="Vendor Assigned Code"/>
<field name="attr_set" reporter:datatype="link" reporter:label="EDI Attribute Set"/>
+ <field name="use_attrs" reporter:datatype="bool" reporter:label="Use EDI Attributes"/>
</fields>
<links>
<link field="provider" reltype="has_a" key="id" map="" class="acqpro"/>
new_editor->retrieve_acq_provider($po->provider);
return 1 if
- ($po->state eq 'on-order' or
- $po->state eq 'retry' ) and
- $provider and
- $provider->edi_default and
- $U->is_true($provider->active);
+ ($po->state eq 'on-order' || $po->state eq 'retry')
+ and $provider
+ and $provider->edi_default
+ and $U->is_true($provider->active)
+ and !$U->is_true($provider->edi_default->use_attrs);
return 0;
}
in_dir TEXT, -- incoming messages dir (probably different than config.remote_account.path, the outgoing dir)
vendcode TEXT,
vendacct TEXT,
- attr_set INTEGER REFERENCES acq.edi_attr_set(id) -- NULL OK
+ attr_set INTEGER REFERENCES acq.edi_attr_set(id), -- NULL OK
+ use_attrs BOOLEAN NOT NULL DEFAULT FALSE
) INHERITS (config.remote_account);
-- We need a UNIQUE constraint here also, to support the FK from acq.provider.edi_default
-- An attr_set is not strictly required, since some edi_accounts/vendors
-- may not need to apply any attributes.
-ALTER TABLE acq.edi_account ADD COLUMN attr_set
- INTEGER REFERENCES acq.edi_attr_set(id);
+ALTER TABLE acq.edi_account
+ ADD COLUMN attr_set INTEGER REFERENCES acq.edi_attr_set(id),
+ ADD COLUMN use_attrs BOOLEAN NOT NULL DEFAULT FALSE;
COMMIT;
1. PO must be activated.
2. PO provider must be active.
3. PO must use a provider that supports EDI delivery (via edi_default)
- 4. PO must have no EDI ORDERS messages attached or, if it does,
+ 4. EDI account linked to provider must have 'use_attrs' set to true.
+ 5. PO must have no EDI ORDERS messages attached or, if it does,
the message has a status of "retry".
Usage:
type => 'left',
filter => {message_type => 'ORDERS'}
},
- acqpro => {}
+ acqpro => {
+ join => {
+ acqedi => {
+ }
+ }
+ }
}
},
where => {
active => 't',
edi_default => {'!=' => undef}
},
+ '+acqedi' => {
+ use_attrs => 't'
+ },
'+acqedim' => {
'-or' => [
{id => undef}, # no ORDERS message exists
. After moving to edi_order_pusher.pl, the JEDI Action/Trigger event
definition is no longer required. It can be disabled.
+Migration
++++++++++
+
+EDI accounts have a new boolean field "Use EDI Attributes" (use_attrs) that
+specifies whether PO's generated via the account should be built using
+EDI attributes or fall back to traditional JEDI A/T template generation.
+
+This allows sites to activate EDI attributes on a per-account basis, making
+it possible to migrate piecemeal to EDI attributes. For the initial roll
+out of this new features, no accounts will be configured to use EDI
+attributes by default.
+