You've already forked AstralRinth
forked from xxxOFFxxx/AstralRinth
Fix track1099 (#4405)
* don't parse datetime * fix import * update comments
This commit is contained in:
committed by
GitHub
parent
20281c4efc
commit
d41b31c775
@@ -1082,8 +1082,6 @@ async fn update_compliance_status(
|
||||
Ok(Some(avalara1099::DataWrapper {
|
||||
data: avalara1099::Data { attributes, .. },
|
||||
})) => {
|
||||
// It's unclear what timezone the DateTime is in (as it returns a naive RFC-3339 timestamp)
|
||||
// so we can just say it was signed now
|
||||
compliance.signed =
|
||||
(&attributes.entry_status == "signed").then(Utc::now);
|
||||
compliance.e_delivery_consented =
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use crate::database::models::{DBUserId, users_compliance::FormType};
|
||||
use crate::routes::ApiError;
|
||||
use ariadne::ids::base62_impl::to_base62;
|
||||
use chrono::{Datelike, NaiveDateTime};
|
||||
use chrono::Datelike;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::collections::HashMap;
|
||||
use std::fmt;
|
||||
@@ -33,12 +33,15 @@ pub struct FormResponse {
|
||||
pub company_name: String,
|
||||
pub company_email: String,
|
||||
pub reference_id: String,
|
||||
pub signed_at: Option<NaiveDateTime>,
|
||||
/// This is a DateTime, but it's not consistent wether it has a
|
||||
/// timezone or not, so we just parse it as a string and use [`Utc::now()`](fn@chrono::Utc::now)
|
||||
/// rather than using the provided DateTime.
|
||||
pub signed_at: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct W9FormsResponse {
|
||||
pub e_delivery_consented_at: Option<NaiveDateTime>,
|
||||
pub e_delivery_consented_at: Option<String>,
|
||||
pub tin_match_status: Option<String>,
|
||||
pub entry_status: String,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user